forgexa-cli 1.15.5__tar.gz → 1.15.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.15.5
3
+ Version: 1.15.6
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License: MIT
@@ -1,2 +1,2 @@
1
1
  """forgexa-cli — Forgexa command-line client."""
2
- __version__ = "1.15.5"
2
+ __version__ = "1.15.6"
@@ -523,7 +523,7 @@ except (ImportError, ModuleNotFoundError):
523
523
  # DAEMON_VERSION is the protocol/logic version of the daemon code.
524
524
  # Kept in sync with pyproject.toml version via bump-version.sh.
525
525
  # CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
526
- DAEMON_VERSION = "1.15.5"
526
+ DAEMON_VERSION = "1.15.6"
527
527
 
528
528
 
529
529
  def _detect_client_type() -> str:
@@ -862,6 +862,53 @@ def _daemon_extract_copilot_output(raw: str) -> str:
862
862
  return raw
863
863
 
864
864
 
865
+ def _daemon_extract_codex_output(raw: str) -> str:
866
+ """Extract assistant text from Codex JSONL output."""
867
+ assistant_messages: list[str] = []
868
+ fallback_parts: list[str] = []
869
+
870
+ for line in raw.split("\n"):
871
+ line = line.strip()
872
+ if not line:
873
+ continue
874
+ try:
875
+ data = json.loads(line)
876
+ except json.JSONDecodeError:
877
+ fallback_parts.append(line)
878
+ continue
879
+ if not isinstance(data, dict):
880
+ continue
881
+ if data.get("type") != "message" or data.get("role") != "assistant":
882
+ continue
883
+
884
+ content = data.get("content", [])
885
+ if isinstance(content, str) and content.strip():
886
+ assistant_messages.append(content.strip())
887
+ continue
888
+ if not isinstance(content, list):
889
+ continue
890
+
891
+ texts: list[str] = []
892
+ for block in content:
893
+ if not isinstance(block, dict):
894
+ continue
895
+ if block.get("type") not in ("text", "output_text"):
896
+ continue
897
+ text = block.get("text") or block.get("content") or ""
898
+ if isinstance(text, str) and text.strip():
899
+ texts.append(text)
900
+
901
+ joined = "\n".join(texts).strip()
902
+ if joined:
903
+ assistant_messages.append(joined)
904
+
905
+ if assistant_messages:
906
+ return assistant_messages[-1]
907
+
908
+ fallback = "\n".join(fallback_parts).strip()
909
+ return fallback or raw
910
+
911
+
865
912
  def _daemon_extract_claude_output(raw: str) -> str:
866
913
  """Extract result text from Claude CLI JSON/stream-json output."""
867
914
  raw = raw.strip()
@@ -990,6 +1037,8 @@ def _daemon_extract_agent_output(agent_id: str, raw: str) -> str:
990
1037
  return _daemon_extract_claude_output(raw)
991
1038
  if agent_id == "copilot":
992
1039
  return _daemon_extract_copilot_output(raw)
1040
+ if agent_id == "codex":
1041
+ return _daemon_extract_codex_output(raw)
993
1042
  if agent_id == "opencode":
994
1043
  return _daemon_extract_opencode_output(raw)
995
1044
  return raw
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.15.5
3
+ Version: 1.15.6
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "forgexa-cli"
3
- version = "1.15.5"
3
+ version = "1.15.6"
4
4
  description = "Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform"
5
5
  requires-python = ">=3.9"
6
6
  license = { text = "MIT" }
File without changes
File without changes