htmlgraph 0.26.4__py3-none-any.whl → 0.26.5__py3-none-any.whl

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.
htmlgraph/__init__.py CHANGED
@@ -95,7 +95,7 @@ from htmlgraph.types import (
95
95
  )
96
96
  from htmlgraph.work_type_utils import infer_work_type, infer_work_type_from_id
97
97
 
98
- __version__ = "0.26.4"
98
+ __version__ = "0.26.5"
99
99
  __all__ = [
100
100
  # Exceptions
101
101
  "HtmlGraphError",
@@ -755,18 +755,40 @@ def track_event(hook_type: str, hook_input: dict[str, Any]) -> dict[str, Any]:
755
755
  # Override detected agent for subagent context
756
756
  detected_agent = f"{subagent_type}-spawner"
757
757
  else:
758
- # Normal orchestrator/parent context - use global session cache
759
- active_session = manager.get_active_session()
760
- if not active_session:
761
- # No active HtmlGraph session yet; start one (stable internal id).
762
- try:
763
- active_session = manager.start_session(
764
- session_id=None,
765
- agent=detected_agent,
766
- title=f"Session {datetime.now().strftime('%Y-%m-%d %H:%M')}",
767
- )
768
- except Exception:
769
- return {"continue": True}
758
+ # Normal orchestrator/parent context
759
+ # CRITICAL: Use session_id from hook_input (Claude Code provides this)
760
+ # Only fall back to manager.get_active_session() if not in hook_input
761
+ hook_session_id = hook_input.get("session_id") or hook_input.get("sessionId")
762
+
763
+ if hook_session_id:
764
+ # Claude Code provided session_id - use it directly
765
+ # Check if session already exists
766
+ existing = manager.session_converter.load(hook_session_id)
767
+ if existing:
768
+ active_session = existing
769
+ else:
770
+ # Create new session with Claude's session_id
771
+ try:
772
+ active_session = manager.start_session(
773
+ session_id=hook_session_id,
774
+ agent=detected_agent,
775
+ title=f"Session {datetime.now().strftime('%Y-%m-%d %H:%M')}",
776
+ )
777
+ except Exception:
778
+ return {"continue": True}
779
+ else:
780
+ # Fallback: No session_id in hook_input - use global session cache
781
+ active_session = manager.get_active_session()
782
+ if not active_session:
783
+ # No active HtmlGraph session yet; start one
784
+ try:
785
+ active_session = manager.start_session(
786
+ session_id=None,
787
+ agent=detected_agent,
788
+ title=f"Session {datetime.now().strftime('%Y-%m-%d %H:%M')}",
789
+ )
790
+ except Exception:
791
+ return {"continue": True}
770
792
 
771
793
  active_session_id = active_session.id
772
794
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: htmlgraph
3
- Version: 0.26.4
3
+ Version: 0.26.5
4
4
  Summary: HTML is All You Need - Graph database on web standards
5
5
  Project-URL: Homepage, https://github.com/Shakes-tzd/htmlgraph
6
6
  Project-URL: Documentation, https://github.com/Shakes-tzd/htmlgraph#readme
@@ -1,4 +1,4 @@
1
- htmlgraph/__init__.py,sha256=h9uelDCHKeohN_sFsqoIGi2NON0c_yL9W_WUlXNnslY,5717
1
+ htmlgraph/__init__.py,sha256=lTOHlwvGdBU3m7T0pGEBDB3_NgYPVzgzVnRL3NnK1Kw,5717
2
2
  htmlgraph/agent_detection.py,sha256=wEmrDv4hssPX2OkEnJZBHPbalxcaloiJF_hOOow_5WE,3511
3
3
  htmlgraph/agent_registry.py,sha256=Usa_35by7p5gtpvHO7K3AcGimnorw-FzgPVa3cWTQ58,9448
4
4
  htmlgraph/agents.py,sha256=Yvu6x1nOfrW2WhRTAHiCuSpvqoVJXx1Mkzd59kwEczw,33466
@@ -171,7 +171,7 @@ htmlgraph/hooks/cigs_pretool_enforcer.py,sha256=Lyp4DDaw_sVHEcW-kzdegldyfXjvVD25
171
171
  htmlgraph/hooks/concurrent_sessions.py,sha256=qOiwDfynphVG0-2pVBakEzOwMORU8ebN1gMjcN4S0z0,6476
172
172
  htmlgraph/hooks/context.py,sha256=tJ4dIL8uTFHyqyuuMc-ETDuOikeD5cN3Mdjmfg6W0HE,13108
173
173
  htmlgraph/hooks/drift_handler.py,sha256=QckL5U5ooku51kI6mppGLsXzaKVt1Yx5uNu-iXZrgSk,17602
174
- htmlgraph/hooks/event_tracker.py,sha256=HhgIc2664ZeZM6YSB_0Ybp3fsEEFcKAUa7nTff1dQV0,40114
174
+ htmlgraph/hooks/event_tracker.py,sha256=bcoEKBM38QK4j--e_UwfPEoGWDmDOz0UFaQhzjgbOKM,41169
175
175
  htmlgraph/hooks/hooks-config.example.json,sha256=tXpk-U-FZzGOoNJK2uiDMbIHCYEHA794J-El0fBwkqg,197
176
176
  htmlgraph/hooks/installer.py,sha256=nOctCFDEV7BEh7ZzxNY-apu1KZG0SHPMq74UPIOChqY,11756
177
177
  htmlgraph/hooks/orchestrator.py,sha256=wV9n4lHxpxfvGnipFFfrtzmhonijHDo59HE8lNFYtog,19837
@@ -215,12 +215,12 @@ htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4be
215
215
  htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
216
216
  htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
217
217
  htmlgraph/templates/orchestration-view.html,sha256=DlS7LlcjH0oO_KYILjuF1X42t8QhKLH4F85rkO54alY,10472
218
- htmlgraph-0.26.4.data/data/htmlgraph/dashboard.html,sha256=Y0w6qoXEPVmWETxi-_GwBNiWlCMP1Ur0OD5EL5uH7P4,30027
219
- htmlgraph-0.26.4.data/data/htmlgraph/styles.css,sha256=oDUSC8jG-V-hKojOBO9J88hxAeY2wJrBYTq0uCwX_Y4,7135
220
- htmlgraph-0.26.4.data/data/htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4bet1H4ZsDpI,7642
221
- htmlgraph-0.26.4.data/data/htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
222
- htmlgraph-0.26.4.data/data/htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
223
- htmlgraph-0.26.4.dist-info/METADATA,sha256=6k8OvC_AwpcVuqQpTUSxY3FC_s5_KBTWJ5PsNgmhYqU,10236
224
- htmlgraph-0.26.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
225
- htmlgraph-0.26.4.dist-info/entry_points.txt,sha256=EaUbjA_bbDwEO_XDLEGMeK8aQP-ZnHiUTkLshyKDyB8,98
226
- htmlgraph-0.26.4.dist-info/RECORD,,
218
+ htmlgraph-0.26.5.data/data/htmlgraph/dashboard.html,sha256=Y0w6qoXEPVmWETxi-_GwBNiWlCMP1Ur0OD5EL5uH7P4,30027
219
+ htmlgraph-0.26.5.data/data/htmlgraph/styles.css,sha256=oDUSC8jG-V-hKojOBO9J88hxAeY2wJrBYTq0uCwX_Y4,7135
220
+ htmlgraph-0.26.5.data/data/htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4bet1H4ZsDpI,7642
221
+ htmlgraph-0.26.5.data/data/htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
222
+ htmlgraph-0.26.5.data/data/htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
223
+ htmlgraph-0.26.5.dist-info/METADATA,sha256=XOWt_1YkmvPWRV699ILvOqQBUWJr1XsuJ5r0VzEW4ck,10236
224
+ htmlgraph-0.26.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
225
+ htmlgraph-0.26.5.dist-info/entry_points.txt,sha256=EaUbjA_bbDwEO_XDLEGMeK8aQP-ZnHiUTkLshyKDyB8,98
226
+ htmlgraph-0.26.5.dist-info/RECORD,,