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.
Files changed (44) hide show
  1. {klapcontext-0.3.1/src/klapcontext.egg-info → klapcontext-0.3.2}/PKG-INFO +1 -1
  2. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/__init__.py +1 -1
  3. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/cli.py +2 -1
  4. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/portal.py +1 -1
  5. {klapcontext-0.3.1 → klapcontext-0.3.2/src/klapcontext.egg-info}/PKG-INFO +1 -1
  6. {klapcontext-0.3.1 → klapcontext-0.3.2}/tests/test_klapcontext.py +11 -0
  7. {klapcontext-0.3.1 → klapcontext-0.3.2}/LICENSE +0 -0
  8. {klapcontext-0.3.1 → klapcontext-0.3.2}/README.md +0 -0
  9. {klapcontext-0.3.1 → klapcontext-0.3.2}/pyproject.toml +0 -0
  10. {klapcontext-0.3.1 → klapcontext-0.3.2}/setup.cfg +0 -0
  11. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/__init__.py +0 -0
  12. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/capabilities.py +0 -0
  13. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/compiler.py +0 -0
  14. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/impact.py +0 -0
  15. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/intents.py +0 -0
  16. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/models.py +0 -0
  17. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/planner.py +0 -0
  18. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/verification.py +0 -0
  19. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent/workflows.py +0 -0
  20. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/agent_context.py +0 -0
  21. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/context_builder.py +0 -0
  22. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/detector.py +0 -0
  23. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/evidence.py +0 -0
  24. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/__init__.py +0 -0
  25. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/base.py +0 -0
  26. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/fastapi.py +0 -0
  27. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/generic_php.py +0 -0
  28. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/laravel.py +0 -0
  29. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/frameworks/node.py +0 -0
  30. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/git.py +0 -0
  31. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/graphify.py +0 -0
  32. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/__init__.py +0 -0
  33. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/base.py +0 -0
  34. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/code_intelligence.py +0 -0
  35. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/graphify.py +0 -0
  36. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/javascript_intelligence.py +0 -0
  37. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/providers/python_intelligence.py +0 -0
  38. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/semantic.py +0 -0
  39. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext/system.py +0 -0
  40. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/SOURCES.txt +0 -0
  41. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/dependency_links.txt +0 -0
  42. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/entry_points.txt +0 -0
  43. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/requires.txt +0 -0
  44. {klapcontext-0.3.1 → klapcontext-0.3.2}/src/klapcontext.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: klapcontext
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Make your repository understandable to humans and AI.
5
5
  Author: Willy Cordon
6
6
  License-Expression: Apache-2.0
@@ -1,3 +1,3 @@
1
1
  """KlapContext local engineering-context generator."""
2
2
 
3
- __version__ = "0.3.1"
3
+ __version__ = "0.3.2"
@@ -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
- print(f"\nProject: {context['project']['name']}\nStack: {' / '.join(sum((v for v in context['stack'].values()), [])) or 'unknown'}\nContext: CURRENT\n\nHuman portal:\n.klap/index.html\n\nAgent context:\n.klap/agent-context.md")
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", [])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: klapcontext
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Make your repository understandable to humans and AI.
5
5
  Author: Willy Cordon
6
6
  License-Expression: Apache-2.0
@@ -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