Skip to content

feat: add filter params everywhere#164

Merged
VVoruganti merged 10 commits into
mainfrom
ben/sdks-1.2.2-add-filters
Jul 21, 2025
Merged

feat: add filter params everywhere#164
VVoruganti merged 10 commits into
mainfrom
ben/sdks-1.2.2-add-filters

Conversation

@dr-frmr

@dr-frmr dr-frmr commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

fix: swap peerId/workspaceId in getSessions()

Summary by CodeRabbit

  • New Features

    • Added filtering capabilities to methods for retrieving peers, sessions, and workspaces in both Python and TypeScript SDKs. Users can now apply filters when listing these resources.
  • Chores

    • Updated the version numbers for the Python and TypeScript SDK packages.
    • Updated linting configuration to ignore an additional code style warning.
    • Replaced ESLint with Biome for linting and formatting in the TypeScript SDK, including new configuration and scripts.
    • Enhanced CI workflow with a new job for running TypeScript SDK tests using Bun runtime.

fix: swap peerId/workspaceId in getSessions()
@coderabbitai

coderabbitai Bot commented Jul 21, 2025

Copy link
Copy Markdown
Contributor
## Walkthrough

This update introduces optional filter parameters to peer, session, and workspace retrieval methods in both Python and TypeScript SDKs, allowing filtered queries. Corresponding method signatures are updated to accept filter objects. Additionally, version numbers are incremented in the respective package files for both SDKs. The TypeScript SDK transitions from ESLint to Biome for linting and formatting. GitHub Actions workflows are extended to include TypeScript SDK testing.

## Changes

| Files/Paths                                                  | Change Summary                                                                                                   |
|--------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| sdks/python/pyproject.toml, pyproject.toml, sdks/typescript/package.json     | Incremented SDK version numbers; added Ruff linting config ignoring COM812 in Python SDK; replaced ESLint with Biome in TypeScript SDK.                        |
| sdks/python/src/honcho/async_client/client.py,<br>sdks/python/src/honcho/client.py,<br>sdks/typescript/src/client.ts | Updated `get_peers`/`getPeers`, `get_sessions`/`getSessions`, and `get_workspaces`/`getWorkspaces` methods to accept optional filter parameters. |
| sdks/python/src/honcho/async_client/peer.py,<br>sdks/python/src/honcho/peer.py,<br>sdks/typescript/src/peer.ts      | Updated `get_sessions`/`getSessions` methods in peer classes to accept optional filter parameters.               |
| sdks/typescript/__tests__/client.test.ts,<br>sdks/typescript/__tests__/peer.test.ts | Adjusted test mocks to expect filter parameter in API calls.                                                    |
| .github/workflows/unittest.yml                               | Renamed Python test job; added new TypeScript test job using Bun runtime to run TypeScript SDK tests.            |
| sdks/typescript/biome.json                                   | Added Biome configuration file for formatting, linting, and assist features in TypeScript SDK.                   |
| sdks/typescript/src/index.ts,<br>sdks/typescript/src/pagination.ts,<br>sdks/typescript/src/session.ts,<br>sdks/typescript/src/session_context.ts,<br>sdks/typescript/src/peer.ts | Applied stylistic and formatting improvements; removed trailing semicolons; reordered imports and exports; no logic changes. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant HonchoClient
    participant API

    User->>HonchoClient: getPeers(filter)
    HonchoClient->>API: peers.list(filter)
    API-->>HonchoClient: Paginated Peer Results
    HonchoClient-->>User: AsyncPage/SyncPage of Peers

    User->>HonchoClient: getSessions(filter)
    HonchoClient->>API: sessions.list(filter)
    API-->>HonchoClient: Paginated Session Results
    HonchoClient-->>User: AsyncPage/SyncPage of Sessions

    User->>HonchoClient: getWorkspaces(filter)
    HonchoClient->>API: workspaces.list(filter)
    API-->>HonchoClient: List of Workspace IDs
    HonchoClient-->>User: List of Workspace IDs

Estimated code review effort

2 (~15 minutes)

Possibly related PRs

Suggested reviewers

  • dr-frmr
  • Rajat-Ahuja1997

Poem

A hop, a skip, a filter here,
Now queries bring results more clear.
Peers and sessions, workspaces too,
Filtered lists, just for you!
With version bumps and tidy code,
This rabbit cheers the lighter load! 🐇✨


<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgAzEmouNFp6ePgvGj5uZzRmZBIpFwB3WEoSUNjIErR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YUeYAlHiBoWQo/F3CNhdpPxA0ACwEKCsCosrASAAgWgEsFotfmIAQkhYAwFoAMB4guERICFFUvxAVgYUeIAsCwsLBoLuEVS6RegukXaA5l2kwlHwvSXYLKweS+efwvsWGAuFhKCsDQBMWlgAgLC9BYED4W0AFJuCwsAEC0mZLSwPC9BbCghQSASwaCx5ccvfncI3lxC55Z4shRPLCwFYPpHiCIWsLVF6C2gESBhWVgDAKK/lakjQWFgCURK4pdIshWworlpQAZZIC0mFgdJ9yxlYguYWFgRlkK7SegvQWlg5wMKINcGvyWFLUAPsL+f/N4xALtAPGMmFotAA= -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=plastic-labs/honcho&utm_content=164):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@dr-frmr dr-frmr requested a review from VVoruganti July 21, 2025 15:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔭 Outside diff range comments (5)
sdks/python/src/honcho/client.py (2)

156-173: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Static analysis suggests adding a trailing comma on line 169:

 peers_page = self._client.workspaces.peers.list(
-            workspace_id=self.workspace_id, filter=filter
+            workspace_id=self.workspace_id, filter=filter,
 )

209-228: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Static analysis suggests adding trailing commas on lines 210 and 223:

-    def get_sessions(
-        self, filter: dict[str, object] | None = None
-    ) -> SyncPage[Session]:
+    def get_sessions(
+        self, filter: dict[str, object] | None = None,
+    ) -> SyncPage[Session]:
         sessions_page = self._client.workspaces.sessions.list(
-            workspace_id=self.workspace_id, filter=filter
+            workspace_id=self.workspace_id, filter=filter,
         )
sdks/python/src/honcho/async_client/client.py (3)

172-191: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Static analysis suggests adding trailing commas on lines 173 and 187:

-    async def get_peers(
-        self, filter: dict[str, object] | None = None
-    ) -> AsyncPage[AsyncPeer]:
+    async def get_peers(
+        self, filter: dict[str, object] | None = None,
+    ) -> AsyncPage[AsyncPeer]:
         peers_page = await self._client.workspaces.peers.list(
-            workspace_id=self.workspace_id, filter=filter
+            workspace_id=self.workspace_id, filter=filter,
         )

231-250: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Static analysis suggests adding trailing commas on lines 232 and 245:

-    async def get_sessions(
-        self, filter: dict[str, object] | None = None
-    ) -> AsyncPage[AsyncSession]:
+    async def get_sessions(
+        self, filter: dict[str, object] | None = None,
+    ) -> AsyncPage[AsyncSession]:
         sessions_page = await self._client.workspaces.sessions.list(
-            workspace_id=self.workspace_id, filter=filter
+            workspace_id=self.workspace_id, filter=filter,
         )

284-301: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Static analysis suggests adding a trailing comma on line 285:

-    async def get_workspaces(
-        self, filter: dict[str, object] | None = None
-    ) -> list[str]:
+    async def get_workspaces(
+        self, filter: dict[str, object] | None = None,
+    ) -> list[str]:
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f464352 and 1a6a9c0.

📒 Files selected for processing (8)
  • sdks/python/pyproject.toml (1 hunks)
  • sdks/python/src/honcho/async_client/client.py (6 hunks)
  • sdks/python/src/honcho/async_client/peer.py (2 hunks)
  • sdks/python/src/honcho/client.py (6 hunks)
  • sdks/python/src/honcho/peer.py (2 hunks)
  • sdks/typescript/package.json (1 hunks)
  • sdks/typescript/src/client.ts (3 hunks)
  • sdks/typescript/src/peer.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
sdks/python/pyproject.toml (1)

Learnt from: VVoruganti
PR: #115
File: README.md:393-396
Timestamp: 2025-05-29T16:27:13.808Z
Learning: CONTRIBUTING.md exists at the repository root in the Honcho project and contains a comprehensive contributing guide. Automated verification scripts can sometimes fail to detect existing files, so manual verification may be needed when users dispute automated findings.

sdks/typescript/package.json (1)

Learnt from: dr-frmr
PR: #160
File: sdks/typescript/package.json:21-22
Timestamp: 2025-07-16T21:28:04.503Z
Learning: The user dr-frmr prefers exact version pinning for dependencies in the TypeScript SDK package.json rather than using semver ranges, indicating they want explicit control over dependency updates.

sdks/typescript/src/peer.ts (1)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

sdks/python/src/honcho/async_client/peer.py (1)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

sdks/python/src/honcho/peer.py (1)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

sdks/typescript/src/client.ts (1)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

sdks/python/src/honcho/client.py (2)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

Learnt from: CR
PR: plastic-labs/honcho#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T14:51:09.893Z
Learning: Applies to src/models.py : Feature flags on workspace, peer, and session levels

🧬 Code Graph Analysis (2)
sdks/typescript/src/peer.ts (3)
sdks/typescript/src/pagination.ts (1)
  • Page (5-77)
sdks/typescript/src/index.ts (2)
  • Page (8-8)
  • Session (6-6)
sdks/typescript/src/session.ts (1)
  • Session (21-283)
sdks/python/src/honcho/async_client/peer.py (5)
sdks/python/src/honcho/client.py (1)
  • get_sessions (209-228)
sdks/python/src/honcho/peer.py (1)
  • get_sessions (115-138)
sdks/python/src/honcho/async_client/client.py (1)
  • get_sessions (231-250)
src/routers/sessions.py (1)
  • get_sessions (78-95)
sdks/python/src/honcho/async_client/pagination.py (1)
  • AsyncPage (11-91)
🪛 Ruff (0.12.2)
sdks/python/src/honcho/async_client/peer.py

136-136: Trailing comma missing

Add trailing comma

(COM812)

sdks/python/src/honcho/peer.py

116-116: Trailing comma missing

Add trailing comma

(COM812)

sdks/python/src/honcho/async_client/client.py

173-173: Trailing comma missing

Add trailing comma

(COM812)


187-187: Trailing comma missing

Add trailing comma

(COM812)


232-232: Trailing comma missing

Add trailing comma

(COM812)


245-245: Trailing comma missing

Add trailing comma

(COM812)


285-285: Trailing comma missing

Add trailing comma

(COM812)

sdks/python/src/honcho/client.py

169-169: Trailing comma missing

Add trailing comma

(COM812)


210-210: Trailing comma missing

Add trailing comma

(COM812)


223-223: Trailing comma missing

Add trailing comma

(COM812)

🔇 Additional comments (12)
sdks/typescript/package.json (2)

3-3: LGTM! Version bump aligns with Python SDK.

The version increment to 1.2.2 correctly reflects the addition of filtering capabilities across the SDK.


21-21: Verify and bump @honcho-ai/core to match SDK version

The TypeScript SDK is at version 1.2.2 but still depends on

"@honcho-ai/core": "1.2.0"

To keep versions aligned and ensure the core package includes the new filtering features, please:

  • Confirm that @honcho-ai/core@1.2.2 has been published and includes the filtering updates.
  • Update sdks/typescript/package.json:
    - "@honcho-ai/core": "1.2.0"
    + "@honcho-ai/core": "1.2.2"
sdks/python/pyproject.toml (1)

3-3: LGTM! Version bump is consistent across SDKs.

The increment to 1.2.2 properly reflects the filtering enhancements and aligns with the TypeScript SDK version.

sdks/typescript/src/peer.ts (1)

52-52: LGTM! Filter parameter addition enhances querying capabilities.

The optional filter parameter allows for more targeted session retrieval while maintaining backward compatibility.

sdks/python/src/honcho/peer.py (2)

115-117: LGTM! Filter parameter enhances session querying.

The optional filter parameter addition is well-implemented and maintains backward compatibility.


130-134: LGTM! API call properly passes filter parameter.

The filter parameter is correctly passed to the underlying API call using named parameters.

sdks/python/src/honcho/async_client/peer.py (2)

135-137: LGTM! Consistent async implementation of filter parameter.

The filter parameter addition mirrors the synchronous version and maintains API consistency across async/sync clients.


150-154: LGTM! API call correctly implements filtering.

The async API call properly passes the filter parameter using named parameters, maintaining consistency with the synchronous implementation.

sdks/typescript/src/client.ts (3)

53-56: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.


71-74: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.


94-101: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

sdks/python/src/honcho/client.py (1)

262-274: Filter parameter addition looks good.

The optional filter parameter is correctly typed and properly passed to the underlying API client. The implementation maintains backward compatibility while adding new filtering functionality.

Comment thread sdks/python/src/honcho/async_client/peer.py
Comment thread sdks/python/src/honcho/peer.py
Comment thread sdks/typescript/src/peer.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (2)
sdks/typescript/__tests__/client.test.ts (1)

110-149: Consider adding test coverage for actual filter functionality.

The current tests only verify the default behavior where filter: undefined. Consider adding tests that verify actual filter objects are properly passed to the API calls.

Example test case to add:

it('should pass filter parameters to API call', async () => {
  const filterOptions = { status: 'active' };
  mockClient.workspaces.peers.list.mockResolvedValue(mockPeersData);

  await honcho.getPeers(filterOptions);

  expect(mockClient.workspaces.peers.list).toHaveBeenCalledWith('test-workspace', { filter: filterOptions });
});

Also applies to: 170-208

sdks/typescript/__tests__/peer.test.ts (1)

169-211: Consider adding test coverage for peer-specific filter functionality.

Similar to the client tests, consider adding tests that verify actual filter objects are properly passed to the peer's getSessions() method.

Example test case:

it('should pass filter parameters for peer sessions', async () => {
  const filterOptions = { status: 'active', recent: true };
  mockClient.workspaces.peers.sessions.list.mockResolvedValue(mockSessionsData);

  await peer.getSessions(filterOptions);

  expect(mockClient.workspaces.peers.sessions.list).toHaveBeenCalledWith(
    'test-workspace',
    'test-peer', 
    { filter: filterOptions }
  );
});
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a6a9c0 and d45bc45.

📒 Files selected for processing (4)
  • pyproject.toml (1 hunks)
  • sdks/python/pyproject.toml (2 hunks)
  • sdks/typescript/__tests__/client.test.ts (3 hunks)
  • sdks/typescript/__tests__/peer.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
sdks/python/pyproject.toml (3)

Learnt from: VVoruganti
PR: #164
File: sdks/python/src/honcho/async_client/peer.py:136-136
Timestamp: 2025-07-21T15:53:20.954Z
Learning: The honcho repository should have COM812 (trailing comma missing) rule disabled in the root pyproject.toml Ruff configuration by adding it to the existing ignore list: ignore = ["E501", "B008", "COM812"]. The maintainers do not want trailing comma suggestions in code reviews.

Learnt from: VVoruganti
PR: #115
File: README.md:393-396
Timestamp: 2025-05-29T16:27:13.808Z
Learning: CONTRIBUTING.md exists at the repository root in the Honcho project and contains a comprehensive contributing guide. Automated verification scripts can sometimes fail to detect existing files, so manual verification may be needed when users dispute automated findings.

Learnt from: VVoruganti
PR: #164
File: sdks/python/src/honcho/async_client/peer.py:136-136
Timestamp: 2025-07-21T15:53:20.954Z
Learning: The honcho repository maintainers do not want trailing comma suggestions or complaints from static analysis tools like Ruff. The COM812 rule should be disabled in the Ruff configuration to avoid these suggestions in future reviews.

pyproject.toml (4)

Learnt from: VVoruganti
PR: #164
File: sdks/python/src/honcho/async_client/peer.py:136-136
Timestamp: 2025-07-21T15:53:20.954Z
Learning: The honcho repository should have COM812 (trailing comma missing) rule disabled in the root pyproject.toml Ruff configuration by adding it to the existing ignore list: ignore = ["E501", "B008", "COM812"]. The maintainers do not want trailing comma suggestions in code reviews.

Learnt from: VVoruganti
PR: #164
File: sdks/python/src/honcho/async_client/peer.py:136-136
Timestamp: 2025-07-21T15:53:20.954Z
Learning: The honcho repository maintainers do not want trailing comma suggestions or complaints from static analysis tools like Ruff. The COM812 rule should be disabled in the Ruff configuration to avoid these suggestions in future reviews.

Learnt from: Rajat-Ahuja1997
PR: #144
File: src/embeddings.py:217-224
Timestamp: 2025-06-26T18:33:10.167Z
Learning: In the plastic-labs/honcho project, the user's linter enforces spaces around colons in slice notation (e.g., encoded_tokens[i : i + max_tokens]), which conflicts with Flake8's E203 rule but is valid Python syntax and preferred by Black formatter.

Learnt from: CR
PR: plastic-labs/honcho#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T14:51:09.893Z
Learning: Applies to src/**/*.py : Follow isort conventions with absolute imports preferred

sdks/typescript/__tests__/peer.test.ts (1)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

🔇 Additional comments (6)
sdks/typescript/__tests__/client.test.ts (2)

126-126: LGTM! Filter parameter test updates are correct.

The test correctly verifies that getPeers() calls include the filter parameter with undefined as the default value. This ensures the API signature change is properly tested.

Also applies to: 141-141


186-186: LGTM! Consistent filter parameter testing.

The test update correctly verifies that getSessions() includes the filter parameter. This change is consistent with the other filter parameter additions in the client tests.

sdks/typescript/__tests__/peer.test.ts (1)

186-189: LGTM! Parameter order appears correct after the fix.

The test correctly verifies the three-parameter call: workspace ID, peer ID, and options object with filter. This appears to align with the PR objective of fixing the parameter order in getSessions() - the current order (workspace first, peer second) seems logical and consistent.

sdks/python/pyproject.toml (2)

3-3: Ensure version bump is reflected everywhere & changelog updated

version = "1.2.2" looks good, but please double-check that:

  1. The runtime package exposes the same string via honcho/__init__.py (or equivalent) so import honcho; honcho.__version__ reports 1.2.2.
  2. The release notes / CHANGELOG mention the new optional-filter feature and the peerId/workspaceId swap fix.

41-43: 👍 Added COM812 to ignore list matches maintainer guidance

Including COM812 alongside E501 & B008 aligns the SDK-level Ruff rules with the repo’s agreed style (no trailing-comma warnings).

pyproject.toml (1)

61-61: Root Ruff ignore list now includes COM812 – good alignment

ignore = ["E501", "B008", "COM812"] mirrors the SDK config and enforces the no-trailing-comma rule consistently across the monorepo.

Comment thread sdks/python/pyproject.toml
VVoruganti and others added 2 commits July 21, 2025 12:08
Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>
Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>
Comment thread .github/workflows/unittest.yml Fixed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 9

♻️ Duplicate comments (1)
sdks/typescript/src/peer.ts (1)

64-76: LGTM! Parameter order is correct.

The getSessions method correctly implements the expected API signature with workspaceId first, then peerId, followed by the options object containing the filter. This aligns with the API definition mentioned in previous reviews.

Note: As mentioned in the previous review, ensure the test assertions in sdks/typescript/__tests__/peer.test.ts match this parameter order.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d45bc45 and 21cdcf2.

⛔ Files ignored due to path filters (1)
  • sdks/typescript/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/unittest.yml (2 hunks)
  • sdks/typescript/biome.json (1 hunks)
  • sdks/typescript/package.json (3 hunks)
  • sdks/typescript/src/client.ts (6 hunks)
  • sdks/typescript/src/index.ts (1 hunks)
  • sdks/typescript/src/pagination.ts (1 hunks)
  • sdks/typescript/src/peer.ts (7 hunks)
  • sdks/typescript/src/session.ts (4 hunks)
  • sdks/typescript/src/session_context.ts (5 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: dr-frmr
PR: plastic-labs/honcho#160
File: sdks/typescript/package.json:21-22
Timestamp: 2025-07-16T21:28:04.503Z
Learning: The user dr-frmr prefers exact version pinning for dependencies in the TypeScript SDK package.json rather than using semver ranges, indicating they want explicit control over dependency updates.
sdks/typescript/src/peer.ts (1)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

sdks/typescript/src/session.ts (2)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

sdks/typescript/src/session_context.ts (2)

Learnt from: dr-frmr
PR: #131
File: src/routers/sessions.py:206-213
Timestamp: 2025-06-18T20:42:06.458Z
Learning: The get_or_create_session function in this codebase is designed to handle both session creation and adding peers to existing sessions. When called with peers, it will add those peers to an existing session rather than creating a duplicate session.

Learnt from: CR
PR: plastic-labs/honcho#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T14:51:09.893Z
Learning: Applies to src/utils/history.py : Session history summarization: short every 20 messages, long every 60

sdks/typescript/src/client.ts (1)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

🧬 Code Graph Analysis (2)
sdks/typescript/src/pagination.ts (3)
sdks/python/src/honcho/async_client/pagination.py (2)
  • items (43-47)
  • data (69-74)
sdks/python/src/honcho/pagination.py (1)
  • data (61-65)
sdks/typescript/src/index.ts (1)
  • Page (5-5)
sdks/typescript/src/session_context.ts (3)
sdks/typescript/src/peer.ts (2)
  • message (81-87)
  • Peer (8-167)
sdks/python/src/honcho/async_client/peer.py (1)
  • message (161-184)
sdks/python/src/honcho/peer.py (2)
  • message (141-164)
  • Peer (16-245)
🪛 Biome (1.9.4)
sdks/typescript/biome.json

[error] 9-9: Found an unknown key includes.

Known keys:

(deserialize)


[error] 47-47: Found an unknown key assist.

Known keys:

(deserialize)

sdks/typescript/src/session.ts

[error] 55-55: Reassigning a function parameter is confusing.

The parameter is declared here:

Use a local variable instead.

(lint/style/noParameterAssign)


[error] 98-98: Reassigning a function parameter is confusing.

The parameter is declared here:

Use a local variable instead.

(lint/style/noParameterAssign)

🪛 GitHub Check: CodeQL
.github/workflows/unittest.yml

[warning] 64-85: Workflow does not contain permissions
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}

🔇 Additional comments (6)
sdks/typescript/src/pagination.ts (1)

60-63: Avoid double traversal in data()
data() first resolves items, then maps again if a transform is present. Since the upstream may already return a new array, using map creates a second copy. Minor, but for large payloads you can transform in-place:

-const data = typeof items === 'function' ? await items() : items
-return this._transformFunc ? data.map(this._transformFunc) : data
+const data = typeof items === 'function' ? await items() : items
+return this._transformFunc ? data.map(this._transformFunc) : [...data]

Likely an incorrect or invalid review comment.

sdks/typescript/src/session_context.ts (1)

53-57: No change needed: peer_name is the canonical field
The MessageCreate schema defines peer_name as the actual property, with peer_id only serving as an alias when instantiating messages. Using message.peer_name here is correct, so no update to peerId is required.

Likely an incorrect or invalid review comment.

sdks/typescript/src/client.ts (3)

54-62: LGTM! Filter parameter implementation is consistent.

The addition of the optional filter parameter to getPeers follows a consistent pattern and correctly passes the filter to the underlying API call.


77-88: LGTM! Consistent filter implementation.

The getSessions method properly implements the optional filter parameter with the same pattern as getPeers.


110-119: LGTM! Filter parameter added consistently.

The getWorkspaces method correctly implements the optional filter parameter, maintaining consistency across all list retrieval methods.

sdks/typescript/src/index.ts (1)

4-8: Confirm re-export reordering won’t affect module side-effect order

export { X } from './module' causes each referenced module to be executed in the textual order they appear. By reordering these re-exports you implicitly change that evaluation sequence.
If any of client, pagination, peer, session, or session_context performs side-effectful work during module initialisation (e.g., global polyfills, env checks, singleton registration), behaviour could subtly change.

Please double-check that none of those modules rely on being evaluated before/after another, or keep the original order to stay risk-free.

Comment thread .github/workflows/unittest.yml
Comment thread sdks/typescript/biome.json
Comment thread sdks/typescript/biome.json
Comment thread sdks/typescript/package.json Outdated
Comment thread sdks/typescript/package.json
Comment on lines +22 to 25
const items = this._originalPage.items || this._originalPage.data || []
for (const item of items) {
yield this._transformFunc ? this._transformFunc(item) : item;
yield this._transformFunc ? this._transformFunc(item) : item
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Async iterator ignores lazy items() functions
items may be a function (you handle this in data()), but the iterator treats it as a plain array, so lazily-loaded pages won’t work:

const items = this._originalPage.items || this._originalPage.data || []
for (const item of items) {  }

Add the same callable check you already have in data():

-const items = this._originalPage.items || this._originalPage.data || []
-for (const item of items) {
+const raw = this._originalPage.items || this._originalPage.data || []
+const items = typeof raw === 'function' ? await raw() : raw
+for (const item of items) {
🤖 Prompt for AI Agents
In sdks/typescript/src/pagination.ts around lines 22 to 25, the async iterator
treats this._originalPage.items as a plain array, but it may be a function that
returns the items lazily. To fix this, check if this._originalPage.items is a
function and call it to get the items array, similar to the existing check in
the data() method. Then iterate over the resulting array or fallback to
this._originalPage.data or an empty array.

Comment thread sdks/typescript/src/session_context.ts
Comment thread sdks/typescript/src/session.ts Outdated
Comment thread sdks/typescript/src/session.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

♻️ Duplicate comments (2)
sdks/typescript/package.json (2)

22-30: Caret ranges re-introduced—pin exact versions as per repo convention

Past PRs established strict version pinning for deterministic installs. Please drop the ^ prefix on every dependency/devDependency (e.g. "@types/node": "24.0.1", "@biomejs/biome": "2.1.2", etc.).

-    "@types/node": "^24.0.1",
+    "@types/node": "24.0.1",
...
-    "@biomejs/biome": "^2.1.2",
+    "@biomejs/biome": "2.1.2",

14-16: Consolidate overlapping Biome scripts

lint:fix and format both run biome … --write, mutating the same files in two passes. One entry-point is enough; keep either lint:fix or format to avoid redundant CI work.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21cdcf2 and 9e3ec75.

📒 Files selected for processing (6)
  • .gitignore (1 hunks)
  • docs/changelog/compatibility-guide.mdx (1 hunks)
  • docs/changelog/introduction.mdx (2 hunks)
  • sdks/python/CHANGELOG.md (1 hunks)
  • sdks/typescript/CHANGELOG.md (1 hunks)
  • sdks/typescript/package.json (3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: dr-frmr
PR: plastic-labs/honcho#160
File: sdks/typescript/package.json:21-22
Timestamp: 2025-07-16T21:28:04.503Z
Learning: The user dr-frmr prefers exact version pinning for dependencies in the TypeScript SDK package.json rather than using semver ranges, indicating they want explicit control over dependency updates.
sdks/python/CHANGELOG.md (2)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

Learnt from: Rajat-Ahuja1997
PR: #131
File: migrations/versions/d429de0e5338_adopt_peer_paradigm.py:438-441
Timestamp: 2025-06-18T16:44:57.733Z
Learning: In the Honcho database schema, messages.app_id references workspaces.public_id (string nanoid), not workspaces.id (integer primary key). This means that during migrations when workspaces.public_id is renamed to workspaces.id, the foreign key relationship with messages.app_id remains valid.

sdks/typescript/CHANGELOG.md (2)

Learnt from: Rajat-Ahuja1997
PR: #131
File: src/crud.py:503-505
Timestamp: 2025-06-18T14:50:59.967Z
Learning: The Honcho project prefers upsert behavior for update operations across all resources (sessions, peers, workspaces). Update operations should create the resource if it doesn't exist rather than failing fast. This is an explicit design decision that differs from typical REST semantics but provides a more forgiving API experience.

Learnt from: Rajat-Ahuja1997
PR: #131
File: migrations/versions/d429de0e5338_adopt_peer_paradigm.py:438-441
Timestamp: 2025-06-18T16:44:57.733Z
Learning: In the Honcho database schema, messages.app_id references workspaces.public_id (string nanoid), not workspaces.id (integer primary key). This means that during migrations when workspaces.public_id is renamed to workspaces.id, the foreign key relationship with messages.app_id remains valid.

sdks/typescript/package.json (1)

Learnt from: dr-frmr
PR: #160
File: sdks/typescript/package.json:21-22
Timestamp: 2025-07-16T21:28:04.503Z
Learning: The user dr-frmr prefers exact version pinning for dependencies in the TypeScript SDK package.json rather than using semver ranges, indicating they want explicit control over dependency updates.

🪛 LanguageTool
sdks/python/CHANGELOG.md

[grammar] ~8-~8: Use correct spacing
Context: ...ing](http://semver.org/). ## [1.2.2] - 2025-07-21 ### Added - Filter parameter to various end...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~12-~12: Use correct spacing
Context: ...## Added - Filter parameter to various endpoints ## [1.2.1] - 2025-07-17 ### Fixed - honch...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~14-~14: Use correct spacing
Context: ...eter to various endpoints ## [1.2.1] - 2025-07-17 ### Fixed - honcho utils import path ## [1...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~18-~18: Use correct spacing
Context: ...07-17 ### Fixed - honcho utils import path ## [1.2.0] - 2025-07-16 ### Added - Get/p...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

sdks/typescript/CHANGELOG.md

[grammar] ~8-~8: Use correct spacing
Context: ...ing](http://semver.org/). ## [1.2.1] - 2025-07-21 ### Fixed - Order of parameters in `getSess...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~12-~12: Use correct spacing
Context: ... - Order of parameters in getSessions endpoint ### Added - Linting via biome - Adding filt...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~17-~17: Use correct spacing
Context: ...me - Adding filter parameter to various endpoints ## [1.2.0] - 2025-07-16 ### Added - Get/p...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

docs/changelog/compatibility-guide.mdx

[grammar] ~34-~34: Use correct spacing
Context: ... ## Version Compatibility Table | Honcho API Version | TypeScript SDK | ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🔇 Additional comments (1)
docs/changelog/compatibility-guide.mdx (1)

38-38: Double-check compatibility table accuracy

The row for v2.1.0 was updated, but the rows for v2.0.5 / v2.0.4 still show SDK v1.1.0.
If those older API versions are also compatible with the newly-released SDKs, the table should be updated; if not, consider adding a footnote explaining why.

Comment thread .gitignore
Comment thread docs/changelog/compatibility-guide.mdx
Comment thread docs/changelog/compatibility-guide.mdx
Comment thread docs/changelog/introduction.mdx Outdated
Comment thread sdks/python/CHANGELOG.md
Comment thread sdks/typescript/CHANGELOG.md
Comment thread sdks/typescript/CHANGELOG.md Outdated
@VVoruganti VVoruganti merged commit 54fc522 into main Jul 21, 2025
8 of 9 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26bdba5 and 871b0c7.

📒 Files selected for processing (1)
  • .github/workflows/unittest.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: dr-frmr
PR: plastic-labs/honcho#160
File: sdks/typescript/package.json:21-22
Timestamp: 2025-07-16T21:28:04.503Z
Learning: The user dr-frmr prefers exact version pinning for dependencies in the TypeScript SDK package.json rather than using semver ranges, indicating they want explicit control over dependency updates.
.github/workflows/unittest.yml (1)

Learnt from: VVoruganti
PR: #115
File: README.md:393-396
Timestamp: 2025-05-29T16:27:13.808Z
Learning: CONTRIBUTING.md exists at the repository root in the Honcho project and contains a comprehensive contributing guide. Automated verification scripts can sometimes fail to detect existing files, so manual verification may be needed when users dispute automated findings.

🔇 Additional comments (1)
.github/workflows/unittest.yml (1)

9-10: 👍 Global permissions block closes the CodeQL warning

Adding a top-level permissions: { contents: read } satisfies GitHub’s least-privilege recommendation and removes the earlier CodeQL alert.
No further action required here.

Comment on lines +66 to +88
test-typescript:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install TypeScript SDK dependencies
run: |
cd sdks/typescript
bun install

- name: Run TypeScript SDK tests
run: |
cd sdks/typescript
bun run test
env:
HONCHO_API_KEY: test-key
HONCHO_BASE_URL: http://localhost:8000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Add caching & working-directory to speed up the TypeScript job

bun install re-downloads dependencies on every run, which noticeably slows CI.
You can shave ~30-60 s off each build by caching Bun’s global store and the project’s node_modules.
Additionally, using working-directory avoids the repetitive cd lines.

-    steps:
+    steps:
       - uses: actions/checkout@v4

+      - name: Cache bun store
+        uses: actions/cache@v4
+        with:
+          path: ~/.bun/install/cache/
+          key: ${{ runner.os }}-bun-${{ hashFiles('sdks/typescript/bun.lockb') }}
+          restore-keys: |
+            ${{ runner.os }}-bun-
+
       - name: Setup bun
         uses: oven-sh/setup-bun@v1
         with:
           bun-version: latest

       - name: Install TypeScript SDK dependencies
-        run: |
-          cd sdks/typescript
-          bun install
+        working-directory: sdks/typescript
+        run: bun install --frozen-lockfile

       - name: Run TypeScript SDK tests
-        run: |
-          cd sdks/typescript
-          bun run test
+        working-directory: sdks/typescript
+        run: bun run test

This keeps the workflow readable and materially reduces CI time.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install TypeScript SDK dependencies
run: |
cd sdks/typescript
bun install
- name: Run TypeScript SDK tests
run: |
cd sdks/typescript
bun run test
env:
HONCHO_API_KEY: test-key
HONCHO_BASE_URL: http://localhost:8000
test-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache bun store
uses: actions/cache@v4
with:
path: ~/.bun/install/cache/
key: ${{ runner.os }}-bun-${{ hashFiles('sdks/typescript/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install TypeScript SDK dependencies
working-directory: sdks/typescript
run: bun install --frozen-lockfile
- name: Run TypeScript SDK tests
working-directory: sdks/typescript
run: bun run test
env:
HONCHO_API_KEY: test-key
HONCHO_BASE_URL: http://localhost:8000
🤖 Prompt for AI Agents
In .github/workflows/unittest.yml between lines 66 and 88, the TypeScript job
currently runs `bun install` and tests by manually changing directories with
`cd`, and it does not cache dependencies, causing slower CI runs. To fix this,
add caching steps for Bun’s global store and the project's `node_modules` to
avoid re-downloading dependencies each time. Also, replace the `cd` commands by
setting the `working-directory` property on the relevant steps to simplify the
script and improve readability.

This was referenced Jul 21, 2025
This was referenced Jul 30, 2025
@dr-frmr dr-frmr deleted the ben/sdks-1.2.2-add-filters branch October 1, 2025 18:40
ranc1 pushed a commit to ranc1/honcho that referenced this pull request Apr 16, 2026
* feat: add filter params everywhere
fix: swap peerId/workspaceId in getSessions()

* chore: add eslint and prettier dev dependencies with scripts

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* fix: update tests, chore: ignore trailing commas

* fix (sdks): Add Linting to Typescript SDK

* feat: add TypeScript SDK tests to CI workflow

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* ci: remove postgres service and switch to bun for typescript tests

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* chore (docs): Update Changelog for SDKs

* chore (sdk): Code Rabbit Nitpicks

* chore (action): Fix Typescript SDK Test Action

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>
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.

3 participants