Skip to content

feat(sdk): improve read_url error diagnostics and html table extraction - #1122

Closed
nilaymallikk wants to merge 8801 commits into
CodebuffAI:mainfrom
nilaymallikk:feature/read-url-diagnostics
Closed

feat(sdk): improve read_url error diagnostics and html table extraction#1122
nilaymallikk wants to merge 8801 commits into
CodebuffAI:mainfrom
nilaymallikk:feature/read-url-diagnostics

Conversation

@nilaymallikk

Copy link
Copy Markdown

Summary

Closes #1121.

Enhances the read_url tool in @codebuff/sdk and common tool schemas:

  • Structured Error Diagnostics: Adds typed error classifications (errorCode such as HTTP_ERROR, BLOCKED_ADDRESS, INVALID_URL, TOO_MANY_REDIRECTS, UNSUPPORTED_CONTENT_TYPE, RESPONSE_TOO_LARGE, TIMEOUT, ABORTED) and forwards HTTP status codes (e.g. 404, 429, 500) so caller agents can differentiate retryable rate-limits from permanent errors.
  • HTML Table Extraction: Added formatHtmlTables pre-processor during HTML readable text extraction to transform <table> elements into structured GitHub-Flavored Markdown tables instead of flattening cells into unformatted lines.

Scope

All changes are strictly scoped within:

  • sdk/src/tools/read-url.ts
  • sdk/src/__tests__/read-url.test.ts
  • common/src/tools/params/tool/read-url.ts

Verification

  • Passed unit tests: bun test sdk/src/__tests__/read-url.test.ts (21 pass)
  • Passed full SDK test suite: bun test sdk/src/__tests__/ (470 pass)
  • Passed CI build and packaging: bun run ci
  • Passed binary smoke test: bun cli/scripts/smoke-binary.ts cli/bin/freebuff

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:triaged Classified by the community triage bot pr:needs-work Right idea, not mergeable as written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error diagnostics and tabular content extraction in read_url tool

3 participants