klapcontext 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {klapcontext-0.3.1/src/klapcontext.egg-info → klapcontext-0.3.2}/PKG-INFO +1 -1
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/__init__.py +1 -1
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/cli.py +2 -1
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/portal.py +1 -1
- {klapcontext-0.3.1 → klapcontext-0.3.2/src/klapcontext.egg-info}/PKG-INFO +1 -1
- {klapcontext-0.3.1 → klapcontext-0.3.2}/tests/test_klapcontext.py +11 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/LICENSE +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/README.md +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/pyproject.toml +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/setup.cfg +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/__init__.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/capabilities.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/compiler.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/impact.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/intents.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/models.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/planner.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/verification.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/workflows.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent_context.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/context_builder.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/detector.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/evidence.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/__init__.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/base.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/fastapi.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/generic_php.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/laravel.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/node.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/git.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/graphify.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/__init__.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/base.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/code_intelligence.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/graphify.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/javascript_intelligence.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/python_intelligence.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/semantic.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/system.py +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/SOURCES.txt +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/dependency_links.txt +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/entry_points.txt +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/requires.txt +0 -0
- {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/top_level.txt +0 -0
|
@@ -30,7 +30,8 @@ def cmd_init(args):
|
|
|
30
30
|
except (RuntimeError, GraphifyError) as e:
|
|
31
31
|
print(f"✗ {e}", file=sys.stderr); return 1
|
|
32
32
|
print("✓ Git repository detected\n✓ Graphify available\n✓ Graph generated\n✓ Engineering context generated\n✓ Agent context generated\n✓ Human portal generated")
|
|
33
|
-
|
|
33
|
+
stack_items = [item for values in context["stack"].values() if isinstance(values, list) for item in values]
|
|
34
|
+
print(f"\nProject: {context['project']['name']}\nStack: {' / '.join(stack_items) or 'unknown'}\nContext: CURRENT\n\nHuman portal:\n.klap/index.html\n\nAgent context:\n.klap/agent-context.md")
|
|
34
35
|
return 0
|
|
35
36
|
|
|
36
37
|
def cmd_update(args):
|
|
@@ -63,7 +63,7 @@ def section(title: str, content: str, view: str, icon: str) -> str:
|
|
|
63
63
|
def render(context: dict, agent_text: str, graphify_files: list[str]) -> str:
|
|
64
64
|
project = context["project"]
|
|
65
65
|
system = context.get("system_model", {})
|
|
66
|
-
stack = [item for values in context.get("stack", {}).values() for item in values]
|
|
66
|
+
stack = [item for values in context.get("stack", {}).values() if isinstance(values, list) for item in values]
|
|
67
67
|
points = system.get("entry_points", [])
|
|
68
68
|
flows = system.get("main_flows", [])
|
|
69
69
|
evidence = context.get("evidence", [])
|
|
@@ -73,6 +73,17 @@ def test_portal_has_dashboard_and_real_views(tmp_path):
|
|
|
73
73
|
assert "Copiar contexto" in page
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
def test_cli_and_portal_ignore_scalar_stack_metadata(tmp_path, monkeypatch, capsys):
|
|
77
|
+
context = build(fixture_repo(tmp_path), {"nodes": []})
|
|
78
|
+
monkeypatch.setattr(cli, "generate_all", lambda root: context)
|
|
79
|
+
assert cli.cmd_init(type("Args", (), {"path": str(tmp_path)})()) == 0
|
|
80
|
+
output = capsys.readouterr().out
|
|
81
|
+
assert "Stack: PHP / Laravel" in output
|
|
82
|
+
assert "backend-api" not in output
|
|
83
|
+
page = render_portal(context, render_agent(context), [])
|
|
84
|
+
assert "<span>backend-api</span>" not in page
|
|
85
|
+
|
|
86
|
+
|
|
76
87
|
def test_exclude_klap_is_idempotent(tmp_path, monkeypatch):
|
|
77
88
|
root = fixture_repo(tmp_path)
|
|
78
89
|
monkeypatch.setattr("klapcontext.git.run_git", lambda root, *args: ".git" if args == ("rev-parse", "--git-dir") else "true")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/javascript_intelligence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|