Skip to content

Add Run resource and runs.test.ts#44

Closed
luke-lombardi wants to merge 1 commit intomainfrom
add-run-resource
Closed

Add Run resource and runs.test.ts#44
luke-lombardi wants to merge 1 commit intomainfrom
add-run-resource

Conversation

@luke-lombardi
Copy link
Copy Markdown

@luke-lombardi luke-lombardi commented Mar 4, 2026

Summary

  • Adds lib/types/run.ts with RunData interface and ERunStatus enum (mirrors TaskData/ETaskStatus)
  • Adds lib/resources/run.ts with Runs manager (get, list, cancel) and Run class (refresh, cancel)
  • Adds tests/runs.test.ts with 17 tests covering all public methods, serialization, and edge cases
  • Updates lib/index.ts to export Run classes and types

Test plan

  • All 17 tests in runs.test.ts pass (npx jest tests/runs.test.ts)
  • Verify ERunStatus values match backend API statuses
  • Confirm /api/v1/run/{workspaceId} endpoints exist in the backend

🤖 Generated with Claude Code


Summary by cubic

Adds a Run resource to the SDK, mirroring the Task pattern, so clients can fetch, list, refresh, and cancel runs. Exports Run types/classes and includes tests covering all public methods and serialization.

  • New Features
    • RunData interface and ERunStatus enum (lib/types/run.ts).
    • Runs manager (get/list/cancel) and Run class (refresh/cancel) (lib/resources/run.ts).
    • Cancel uses DELETE /api/v1/run/{workspaceId} with ids[]; get/list use workspace-scoped URLs with filters.
    • Exports added in lib/index.ts and 17 Jest tests for methods, edge cases, and serialization.

Written for commit 2c53f79. Summary will update on new commits.

Adds a Run resource mirroring the Task pattern:
- lib/types/run.ts: RunData interface and ERunStatus enum
- lib/resources/run.ts: Runs manager (get/list/cancel) and Run class (refresh/cancel)
- tests/runs.test.ts: 17 tests covering all public methods and serialization
- lib/index.ts: exports Run classes and types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@cooper-grc cooper-grc closed this Mar 4, 2026
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