Files
humanlayer/humanlayer-ts-vercel-ai-sdk
Allison Durham da079ca3b2 Complete InterruptSession implementation and enable resume during running status (#230)
* Complete InterruptSession implementation

- Fix syscall import compilation error in claudecode-go
- Add proper race condition handling in session manager
- Move InterruptSessionRequest to types.go for consistency
- Add InterruptSessionResponse with success/status fields
- Add 'completing' status for graceful shutdown semantics
- Update event publishing to use completing status
- Add TypeScript types for interrupt operations
- Update Rust client with proper response handling
- Fix unit tests for new completing status
- All 109 tests passing with full type safety

* git ignore test-results.json

* Enable resume during running status

- Allow continueSession to accept running sessions in addition to completed
- Interrupt running sessions before resuming to ensure clean state transitions
- Reorder validation to check claude_session_id before attempting interrupt
- Provide clear error messages for orphaned sessions (running but no claude_session_id)
- Add comprehensive unit and integration tests for new resume-during-running functionality
- Maintain backward compatibility for existing completed session resume workflow

* fix: force bash shell in CI to prevent shell compatibility errors

The CI was using /bin/sh which doesn't support bash-specific syntax
like [[ ]] used in hack/run_silent.sh lines 73 and 88. This caused
'/bin/sh: [[: not found' errors that made tests appear to pass when
they may not have actually run properly.

* add fail-fast shell syntax validation to prevent silent CI failures

- Added 'set -e' to hack/run_silent.sh to exit on any command failure
- Added 'bash -n' syntax validation before sourcing shell scripts in Makefile
- This ensures CI will fail immediately if shell scripts have syntax errors
- Prevents scenarios where malformed scripts cause tests to appear to pass
  when they may not have actually executed properly

* fix: resolve Claude Code streaming JSON schema compatibility issues

- Fix pointer-to-loop-variable bug in streaming test event collection
- Add missing system event fields (CWD, Model, PermissionMode, APIKeySource)
- Update Usage struct to match current Claude Code schema (ServerToolUse, ServiceTier)
- Fix cost field mapping from TotalCost to CostUSD throughout codebase
- Improve message event validation to handle user vs assistant differences
- All schema compatibility tests now pass

* fix: complete TotalCost to CostUSD field migration across codebase

- Remove deprecated TotalCost field assignments in session manager
- Update TUI to display CostUSD instead of TotalCost
- Remove TotalCost test assertions in result population tests
- Completes schema consistency with Claude Code SDK changes

* fix: make shell scripts POSIX-compliant to prevent CI failures

- Replace bash-specific [[ with POSIX [ syntax in run_silent.sh
- Replace == with = for POSIX compatibility
- Simplify test-ts to use run_silent instead of complex JSON parsing
- Remove SHELL := /bin/bash from all Makefiles (no longer needed)
- Remove shell: bash from GitHub Actions (no longer needed)
- Keep set -e for fail-fast behavior and syntax validation
- Scripts now work consistently in both bash and sh environments

* fix: use sh -n instead of bash -n for syntax validation

Since scripts are now POSIX-compliant, use sh for syntax validation
to match the target shell environment and ensure consistency.
2025-06-23 08:47:55 -07:00
..
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 00:23:49 -08:00
2025-01-05 01:30:31 -08:00
2025-01-05 01:30:31 -08:00

humanlayer-ts-vercel-ai-sdk

HumanLayer typescript client for integrating with the Vercel AI SDK.

Usage

check out the example in the examples/ts_vercel_ai_sdk directory.