Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v5

Expand All @@ -156,6 +155,54 @@ jobs:
working-directory: packages/hdp-langchain
run: pytest tests/ -v

test-llama-index-callbacks-hdp:
name: Test llama-index-callbacks-hdp (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
working-directory: packages/llama-index-callbacks-hdp
run: pip install -e ".[dev]"

- name: Run tests
working-directory: packages/llama-index-callbacks-hdp
run: pytest tests/ -v

test-hdp-llamaindex:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Test hdp-llamaindex (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
needs: test-llama-index-callbacks-hdp
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install primary package
working-directory: packages/llama-index-callbacks-hdp
run: pip install -e ".[dev]"

- name: Install metapackage
working-directory: packages/hdp-llamaindex
run: pip install -e .

- name: Verify metapackage imports
run: python -c "from hdp_llamaindex import HdpCallbackHandler, HdpInstrumentationHandler, HdpNodePostprocessor, verify_chain; print('hdp-llamaindex imports OK')"

test-hdp-physical-py:
name: Test hdp-physical-py (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- 'python/hdp-langchain/v*'
- 'python/hdp-autogen/v*'
- 'python/hdp-physical/v*'
- 'python/llama-index-callbacks-hdp/v*'
- 'python/hdp-llamaindex/v*'
- 'node/hdp-autogen/v*'
- 'node/hdp-physical/v*'

Expand Down Expand Up @@ -707,6 +709,169 @@ jobs:
packages-dir: dist/
skip-existing: true

# ── llama-index-callbacks-hdp ─────────────────────────────────────────────

test-llama-index-callbacks-hdp:
name: Test llama-index-callbacks-hdp
if: startsWith(github.ref, 'refs/tags/python/llama-index-callbacks-hdp/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
working-directory: packages/llama-index-callbacks-hdp
run: pip install -e ".[dev]"

- name: Run tests
working-directory: packages/llama-index-callbacks-hdp
run: pytest tests/ -v

vet-llama-index-callbacks-hdp:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Build & Vet llama-index-callbacks-hdp (ReleaseGuard)
needs: test-llama-index-callbacks-hdp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install build tools
run: pip install build

- name: Build distribution
working-directory: packages/llama-index-callbacks-hdp
run: python -m build

- name: Vet artifacts with ReleaseGuard
uses: Helixar-AI/ReleaseGuard@94c067008f3ad516d4b61a6e7163d9d5518a4548
with:
path: packages/llama-index-callbacks-hdp/dist
config: packages/llama-index-callbacks-hdp/.releaseguard.yml
sbom: 'true'
fix: 'true'
format: sarif
artifact-name: releaseguard-evidence-llama-index-callbacks-hdp

- name: Upload vetted distribution
uses: actions/upload-artifact@v4
with:
name: llama-index-callbacks-hdp-dist
path: packages/llama-index-callbacks-hdp/dist/
retention-days: 1

publish-llama-index-callbacks-hdp:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Publish llama-index-callbacks-hdp to PyPI
needs: vet-llama-index-callbacks-hdp
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: pypi-llama-index-callbacks-hdp
url: https://pypi.org/project/llama-index-callbacks-hdp/
steps:
- name: Download vetted distribution
uses: actions/download-artifact@v4
with:
name: llama-index-callbacks-hdp-dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

# ── hdp-llamaindex (metapackage) ───────────────────────────────────────────

test-hdp-llamaindex:
name: Test hdp-llamaindex
if: startsWith(github.ref, 'refs/tags/python/hdp-llamaindex/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install primary package
working-directory: packages/llama-index-callbacks-hdp
run: pip install -e ".[dev]"

- name: Install metapackage
working-directory: packages/hdp-llamaindex
run: pip install -e .

- name: Verify metapackage imports
run: python -c "from hdp_llamaindex import HdpCallbackHandler, HdpInstrumentationHandler, HdpNodePostprocessor, verify_chain; print('OK')"

vet-hdp-llamaindex:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Build & Vet hdp-llamaindex (ReleaseGuard)
needs: test-hdp-llamaindex
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install build tools
run: pip install build

- name: Build distribution
working-directory: packages/hdp-llamaindex
run: python -m build

- name: Vet artifacts with ReleaseGuard
uses: Helixar-AI/ReleaseGuard@94c067008f3ad516d4b61a6e7163d9d5518a4548
with:
path: packages/hdp-llamaindex/dist
config: packages/hdp-llamaindex/.releaseguard.yml
sbom: 'true'
fix: 'true'
format: sarif
artifact-name: releaseguard-evidence-hdp-llamaindex

- name: Upload vetted distribution
uses: actions/upload-artifact@v4
with:
name: hdp-llamaindex-dist
path: packages/hdp-llamaindex/dist/
retention-days: 1

publish-hdp-llamaindex:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Publish hdp-llamaindex to PyPI
needs: vet-hdp-llamaindex
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: pypi-hdp-llamaindex
url: https://pypi.org/project/hdp-llamaindex/
steps:
- name: Download vetted distribution
uses: actions/download-artifact@v4
with:
name: hdp-llamaindex-dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

# ── hdp-physical (TypeScript) ─────────────────────────────────────────────

test-hdp-physical:
Expand Down
58 changes: 58 additions & 0 deletions packages/hdp-llamaindex/.releaseguard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ReleaseGuard policy for hdp-llamaindex Python artifacts
# https://github.com/Helixar-AI/ReleaseGuard
#
# Scans the built wheel and sdist before they are published to PyPI.
# Run locally: releaseguard check ./dist
version: 2

project:
name: hdp-llamaindex
mode: release

inputs:
- path: ./dist
type: directory

sbom:
enabled: true
ecosystems: [python]
formats: [cyclonedx]
enrich_cve: false

scanning:
secrets:
enabled: true
metadata:
enabled: true
fail_on_source_maps: false
fail_on_internal_urls: false
fail_on_build_paths: false
unexpected_files:
enabled: true
deny:
- ".env"
- "*.bak"
- "*.tmp"
- "*.key"
- "*.pem"
licenses:
enabled: true
require:
- LICENSE

transforms:
add_checksums: false
add_manifest: false

policy:
fail_on:
- severity: critical
- category: secret
warn_on:
- severity: high

output:
reports:
- cli
- sarif
directory: ./.releaseguard
11 changes: 11 additions & 0 deletions packages/hdp-llamaindex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# hdp-llamaindex

Metapackage for users who discover HDP first.

```bash
pip install hdp-llamaindex
```

This installs `llama-index-callbacks-hdp` and re-exports all classes from the `hdp_llamaindex` namespace.

For full documentation see [llama-index-callbacks-hdp](../llama-index-callbacks-hdp/README.md).
21 changes: 21 additions & 0 deletions packages/hdp-llamaindex/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "hdp-llamaindex"
version = "0.1.0"
description = "HDP (Human Delegation Provenance) integration for LlamaIndex — metapackage"
readme = "README.md"
license = { text = "CC-BY-4.0" }
requires-python = ">=3.10"
dependencies = [
"llama-index-callbacks-hdp>=0.1.0",
]

[project.urls]
Homepage = "https://github.com/Helixar-AI/HDP"
Repository = "https://github.com/Helixar-AI/HDP"

[tool.hatch.build.targets.wheel]
packages = ["src/hdp_llamaindex"]
43 changes: 43 additions & 0 deletions packages/hdp-llamaindex/src/hdp_llamaindex/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""hdp-llamaindex — convenience re-export of the HDP LlamaIndex integration.

Install via `pip install hdp-llamaindex` if you discover HDP first.
All classes are importable from here or from `llama_index.callbacks.hdp`.
"""

from llama_index.callbacks.hdp import (
DataClassification,
HdpCallbackHandler,
HdpInstrumentationHandler,
HdpNodePostprocessor,
HdpPrincipal,
HdpScope,
HdpToken,
HDPScopeViolationError,
HopRecord,
HopVerification,
ScopePolicy,
VerificationResult,
clear_token,
get_token,
set_token,
verify_chain,
)

__all__ = [
"DataClassification",
"HdpCallbackHandler",
"HdpInstrumentationHandler",
"HdpNodePostprocessor",
"HdpPrincipal",
"HdpScope",
"HdpToken",
"HDPScopeViolationError",
"HopRecord",
"HopVerification",
"ScopePolicy",
"VerificationResult",
"clear_token",
"get_token",
"set_token",
"verify_chain",
]
Loading
Loading