Skip to content

feat: add llama-index-callbacks-hdp and hdp-llamaindex packages#22

Merged
asiridalugoda merged 2 commits intomainfrom
feat/llamaindex-integration
Apr 8, 2026
Merged

feat: add llama-index-callbacks-hdp and hdp-llamaindex packages#22
asiridalugoda merged 2 commits intomainfrom
feat/llamaindex-integration

Conversation

@asiridalugoda
Copy link
Copy Markdown
Contributor

Summary

  • Adds llama-index-callbacks-hdp — three-layer HDP integration for LlamaIndex following the LlamaHub implicit namespace convention (from llama_index.callbacks.hdp import ...)
  • Adds hdp-llamaindex — thin metapackage re-exporting for users who discover HDP first (pip install hdp-llamaindex)
  • Fills the last major gap in HDP's Python framework coverage (MCP, CrewAI, AutoGen, Grok/xAI, LangChain already supported)

Integration layers

Layer 1 — Modern instrumentation dispatcher (HdpInstrumentationHandler): hooks QueryStartEvent, AgentToolCallEvent, LLMChatStartEvent, QueryEndEvent via the root dispatcher. Recommended for LlamaIndex ≥0.10.20.

Layer 2 — Legacy CallbackManager (HdpCallbackHandler): hooks start_trace, end_trace, on_event_start/end. Drop-in via Settings.callback_manager.

Layer 3 — Node postprocessor (HdpNodePostprocessor): records retrieval as a signed hop and optionally enforces data_classification scope against node metadata. Used inline in RAG pipelines.

All three layers share a ContextVar for token state — asyncio-safe, no cross-request leakage.

Test Plan

  • 43 tests passing across session isolation, chain verification, callback handler, and postprocessor
  • Package installs and all imports verified against Python 3.13 + llama-index-core 0.12.x
  • verify_chain() confirms tamper-evident chain integrity end-to-end
  • Strict and observe modes verified for scope violations and data classification enforcement

@asiridalugoda asiridalugoda force-pushed the feat/llamaindex-integration branch from f280894 to e1a65b3 Compare April 8, 2026 13:20
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Three-layer integration providing cryptographic authorization provenance
for LlamaIndex agents and RAG pipelines:

- Layer 1: HdpInstrumentationHandler — modern dispatcher integration
  (LlamaIndex >=0.10.20), hooks QueryStartEvent, AgentToolCallEvent,
  LLMChatStartEvent, QueryEndEvent via root dispatcher
- Layer 2: HdpCallbackHandler — legacy CallbackManager integration,
  hooks start_trace, end_trace, on_event_start/end for all FUNCTION_CALL
  and LLM events
- Layer 3: HdpNodePostprocessor — inline retrieval hop recording and
  data classification enforcement in the RAG pipeline

Shared ContextVar session state isolates tokens across concurrent async
tasks. All crypto primitives bundled inline (Ed25519 + RFC 8785 JCS),
consistent with all other HDP Python packages.

hdp-llamaindex is a thin metapackage re-exporting from the llama_index
namespace for users who discover HDP first.

43 tests passing across session isolation, chain verification, callback
handler, and postprocessor.
…dp-llamaindex

- CI: adds test matrix jobs (Python 3.10/3.11/3.12) for both packages
- Release: adds tag-triggered test → vet (ReleaseGuard) → PyPI publish
  pipelines for python/llama-index-callbacks-hdp/v* and python/hdp-llamaindex/v*
- Adds .releaseguard.yml to both packages (matches existing policy)

Two GitHub PyPI environments required before release tags can fire:
  pypi-llama-index-callbacks-hdp
  pypi-hdp-llamaindex
@asiridalugoda asiridalugoda force-pushed the feat/llamaindex-integration branch from 09c95bb to 8721224 Compare April 8, 2026 13:58
@asiridalugoda asiridalugoda merged commit fc6ad34 into main Apr 8, 2026
29 checks passed
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