Skip to content

feat: sync SDK with current worker ZIP contract and agentic retrieval API#82

Merged
suguanYang merged 1 commit into
mainfrom
feat/wangbinqi/sync-worker-contract-and-agentic-api
May 15, 2026
Merged

feat: sync SDK with current worker ZIP contract and agentic retrieval API#82
suguanYang merged 1 commit into
mainfrom
feat/wangbinqi/sync-worker-contract-and-agentic-api

Conversation

@suguanYang
Copy link
Copy Markdown
Contributor

Summary

Syncs the Node SDK with two server-side changes (same as Python SDK #23).

Issue #80 — Align ParseResult ZIP types with current worker output

  • DocNav typesDocNavSection, DocNavResources, DocNavResourceItem for doc_nav.json (sections tree + resource summaries)
  • Manifest HIERARCHY — exposed as HIERARCHY?: Record<string, unknown> (all-caps runtime key preserved since keysToCamel() doesn't transform it)
  • documentTopSummary — parsed from chunk metadata on all chunk types
  • Legacy deprecationtableType, chunksSlim, hierarchy, tocHierarchies, kbCsv, hierarchyViewHtml marked @deprecated
  • save() writes doc_nav.json when present

Issue #81 — Add agentic retrieval response fields

  • useAgentic on RetrievalQueryParams
  • answerText and referencedChunks on RetrievalQueryResponse
  • All new fields optional for backward compatibility

Test plan

  • All 243 existing + new tests pass (11 test files)
  • doc_nav.json round-trips through parse + save
  • HIERARCHY exposed from manifest
  • documentTopSummary on text, image, and table chunks
  • Parsing succeeds without chunks_slim.json or hierarchy.json
  • useAgentic sent correctly; answerText / referencedChunks parsed
  • Legacy response (no agentic fields) parses without error

🤖 Generated with Claude Code

@suguanYang suguanYang force-pushed the feat/wangbinqi/sync-worker-contract-and-agentic-api branch 7 times, most recently from f941781 to eb5fea4 Compare May 15, 2026 11:52
… API

Add typed ChunkMetadata interface for known worker metadata fields with
index signature for forward compatibility.

Issue #80 — ParseResult ZIP types
Issue #81 — Agentic retrieval API
@suguanYang suguanYang force-pushed the feat/wangbinqi/sync-worker-contract-and-agentic-api branch from eb5fea4 to c454a57 Compare May 15, 2026 12:15
@suguanYang suguanYang merged commit 256527c into main May 15, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request May 15, 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.

1 participant