oh-langfuse 0.1.74 → 0.1.75

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.
@@ -748,6 +748,10 @@ def _skill_agent_path(agent: str, detected_by: str) -> str:
748
748
  return "codex_skill_script_exec"
749
749
  if detected_by == "codex_implicit_doc_read":
750
750
  return "codex_skill_doc_read"
751
+ if detected_by == "codex_skill_tool":
752
+ return "codex_skill_tool_invoke"
753
+ if detected_by == "codex_skill_doc_read":
754
+ return "codex_skill_doc_read_tool"
751
755
  if detected_by == "tool_call":
752
756
  return "codex_unsupported_skill_tool"
753
757
  if detected_by == "skill_file_path":
@@ -758,7 +762,7 @@ def _skill_agent_path(agent: str, detected_by: str) -> str:
758
762
  def _skill_invocation_mode(agent: str, detected_by: str) -> str:
759
763
  if agent == "codex" and detected_by == "codex_explicit_injection":
760
764
  return "explicit"
761
- if agent == "codex" and detected_by in ("codex_implicit_script", "codex_implicit_doc_read"):
765
+ if agent == "codex" and detected_by in ("codex_implicit_script", "codex_implicit_doc_read", "codex_skill_tool", "codex_skill_doc_read"):
762
766
  return "implicit"
763
767
  return "detected"
764
768
 
@@ -766,7 +770,7 @@ def _skill_invocation_mode(agent: str, detected_by: str) -> str:
766
770
  def _skill_event_type(detected_by: str, agent: str = "unknown") -> str:
767
771
  if agent == "codex" and detected_by == "tool_call":
768
772
  return "detected"
769
- return "invoked" if detected_by in ("codex_explicit_injection", "codex_implicit_script", "codex_implicit_doc_read") else "detected"
773
+ return "invoked" if detected_by in ("codex_explicit_injection", "codex_implicit_script", "codex_implicit_doc_read", "codex_skill_tool", "codex_skill_doc_read") else "detected"
770
774
 
771
775
 
772
776
  def _skill_id_segment(name: str) -> str:
@@ -837,7 +841,31 @@ def _detect_codex_skill_command(command: str, known_skills: set) -> List[Dict[st
837
841
  def detect_skill_usages(tool_calls: List[Dict[str, Any]], known_skills: set) -> List[Dict[str, str]]:
838
842
  found: List[Dict[str, str]] = []
839
843
  for call in tool_calls or []:
844
+ call_name = str(call.get("name") or "").strip().lower()
840
845
  input_obj = call.get("input") if isinstance(call.get("input"), (dict, list, str)) else {}
846
+
847
+ if call_name == "skill":
848
+ skill_input_name = None
849
+ if isinstance(input_obj, dict):
850
+ skill_input_name = str(input_obj.get("name") or "").strip()
851
+ if skill_input_name:
852
+ name = _accept_known_skill(skill_input_name, known_skills)
853
+ if name:
854
+ found.append(_skill_usage(name, "codex_skill_tool"))
855
+ continue
856
+
857
+ if call_name == "read":
858
+ if isinstance(input_obj, dict):
859
+ file_path = str(input_obj.get("filePath") or "").strip()
860
+ if file_path:
861
+ doc_pattern = r"[\\/](?:skills|skill)[\\/]([^\\/\"'\s]+)[\\/]SKILL\.md$"
862
+ match = re.search(doc_pattern, file_path, re.IGNORECASE)
863
+ if match:
864
+ name = _accept_known_skill(match.group(1), known_skills)
865
+ if name:
866
+ found.append(_skill_usage(name, "codex_skill_doc_read"))
867
+ continue
868
+
841
869
  found.extend(_detect_codex_skill_command(_command_from_tool_input(input_obj), known_skills))
842
870
  return found
843
871
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-langfuse",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Use npm scripts to configure Claude Code / OpenCode / Codex with Langfuse tracing.",