Skip to main content

KlapContext

El grafo es el producto.

Abrí un repositorio y explorá su arquitectura: nombre del proyecto → grafo interactivo → conexiones. Graphify genera los nodos y relaciones; KlapContext conserva contexto técnico verificable para agentes y analizadores nativos complementarios.

Instalación y primer uso

pip install klapcontext
cd mi-proyecto
klap init
klap open

El primer init prepara Graphify 0.9.102 en un entorno aislado bajo .klap/provider-runtime/ si no existe una instalación compatible. No modifica el Python global ni PATH. Una falla de instalación o extracción se informa; los analizadores nativos siguen generando contexto, sin presentar su salida como un grafo de Graphify.

klap update             # actualiza contexto y grafo
klap status             # comprueba vigencia
klap init --no-graphify # sólo contexto nativo, sin instalación externa
klap doctor --agent     # diagnóstico

También podés deshabilitar Graphify persistentemente en .klap/providers.json:

{"providers":{"graphify":{"enabled":false}}}

Portal local

El menú contiene únicamente Inicio y Git. Inicio muestra el nombre real del proyecto y un lienzo de grafo a pantalla completa, sin tarjetas de métricas.

  • Rueda: zoom. Arrastre del fondo: desplazamiento. Arrastre de nodo: posición.
  • Selección: nombre, tipo, archivo/línea cuando existen y relaciones resaltadas.
  • Buscar: archivos o símbolos de todo el grafo, incluso fuera de la vista actual.
  • Conexiones: enfocar los vecinos reales del nodo seleccionado.
  • Ajustar y Ver todo: reencuadrar o volver a la vista inicial.
  • Git: historial de cambios reciente, como en la versión anterior.

El HTML incluye los datos y el mismo motor de visualización que Graphify (vis-network 9.1.6, licencia MIT), sin CDN, servidor ni solicitudes de red. Podés abrir .klap/index.html directamente con file:// o copiar ese único archivo a otra máquina. No se agregan relaciones para mejorar el diseño.

En grafos grandes, la vista inicial muestra como máximo 350 nodos ordenados por grado y lo indica como vista parcial. La búsqueda sigue cubriendo todos los nodos; el enfoque muestra hasta 349 vecinos. Las conexiones dibujadas son exclusivamente las del grafo original cuyos extremos están visibles. No es un trazado de ejecución ni garantiza resolver llamadas dinámicas.

Contexto para agentes

La simplificación visual no elimina entradas, flujos, evidencias ni alcance del índice de los artefactos técnicos:

.klap/
├── index.html            # portal autónomo: Inicio + Git
├── context.json          # contexto estructurado, evidencia y relaciones
├── agent-context.md      # briefing progresivo
├── graphify-out/         # graph.json y exportaciones originales de Graphify
├── provider-runtime/     # entorno aislado de Graphify
├── provider-state.json   # estado del runtime
├── state.json            # snapshot y vigencia
├── scope.json            # reglas de alcance
└── mcp/                  # ejemplos de conexión Graphify MCP

AGENTS.md se genera con un bloque administrado, preservando contenido ajeno. Por defecto los artefactos privados se agregan a .git/info/exclude, nunca a .gitignore. Un AGENTS.md versionado requiere autorización para actualizarlo. Para compartirlo: klap init --shared.

klap scope
klap context "modificar autenticación" --json
klap agent
klap doctor --agent --probe-mcp

Se conserva el servidor MCP propio (mcp_server.py) y sus consultas de contexto, símbolos, definiciones, referencias, implementaciones, dependencias, impacto y flujos. Cada capacidad depende de los analizadores disponibles: devuelve UNSUPPORTED, UNKNOWN o errores explícitos cuando no puede resolverla, sin simular capacidades semánticas. No requiere ningún servidor semántico externo. Los ejemplos .klap/mcp/ siguen destinados a Graphify; no modifican configuraciones globales de agentes.

Ver arquitectura, proveedores y migración graph-first.

Desarrollo

python -m pip install -e ".[dev]"
python -m pytest
python -m build

La suite de navegador es opcional: pip install playwright, luego python -m playwright install chromium y python -m pytest tests/test_portal_browser.py. Usa HTML local y bloquea la red para comprobar que el portal es autónomo.

Licencia

Apache-2.0. Ver LICENSE. El renderizador distribuido conserva su licencia MIT.

Metadata

Release files for klapcontext 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for klapcontext 0.11.2
File Size Uploaded Provenance Actions
klapcontext-0.11.2.tar.gz 265.5 kB With provenance Details for klapcontext-0.11.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for klapcontext 0.11.2
File Interpreter ABI Platform Actions
klapcontext-0.11.2-py3-none-any.whl Python 3 none any Details for klapcontext-0.11.2-py3-none-any.whl

Total release size: 530.2 kB

Release files / klapcontext-0.11.2.tar.gz

Download URL klapcontext-0.11.2.tar.gz
Size 265.5 kB
Tags Source
SHA-256 checksum
How to use checksums
034f29f198551773f034ba8d09806f99f5cefe14e16d745b7a63a53705722c91
BLAKE2b-256 checksum
How to use checksums
c4b1b48345a571052c77fd9e7b2f4b6ff91e4132c902c884efb19242ef95baf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / klapcontext-0.11.2-py3-none-any.whl

Download URL klapcontext-0.11.2-py3-none-any.whl
Size 264.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5af62f8368e71e3b3342dce36b47cd146621d24b231766cb1f66d8e4fa858d61
BLAKE2b-256 checksum
How to use checksums
7dd9f398b8955468f9d074c57e7ee514eaacda43ad1b4b828254ea74e7aba628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for klapcontext 0.11.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for klapcontext-0.11.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page