Skip to content

Commit 1f634bb

Browse files
committed
Fix multi-agent CLI invocation and clean docs
1 parent 73769f2 commit 1f634bb

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

run_rag_verification.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -610,13 +610,17 @@ def script_help_text(script: Path) -> str:
610610
def determine_flag(script: Path, candidates: Sequence[str]) -> str | None:
611611
help_text = script_help_text(script)
612612
advertised = _advertised_flags(help_text)
613+
for flag in candidates:
614+
if flag and flag in advertised:
615+
return flag
616+
613617
try:
614618
source = script.read_text(encoding="utf-8")
615619
except (OSError, UnicodeDecodeError):
616-
return None
620+
source = ""
617621
for flag in candidates:
618622
if flag and flag in source:
619-
return flag
623+
return flag
620624
return None
621625

622626

@@ -861,15 +865,12 @@ def build_question_invocation(
861865
if script is None:
862866
raise RuntimeError("No asker script available")
863867
route = "multi" if use_multi else "asker"
864-
def _append_flag(script_path: Path, args: list[str], candidates: list[str], value: str) -> None:
868+
def _append_flag(
869+
script_path: Path, args: list[str], candidates: list[str], value: str
870+
) -> None:
865871
flag = determine_flag(script_path, candidates)
866-
if not flag:
867-
# Typer-based CLIs such as multi_agent.py require running via ``-m`` to
868-
# expose subcommand help. When invoked as a script from the harness the
869-
# ``--help`` probe used by ``determine_flag`` fails, so fall back to the
870-
# primary candidate.
871-
flag = candidates[0]
872-
args.extend([flag, value])
872+
if flag:
873+
args.extend([flag, value])
873874

874875
if not use_multi:
875876
base_args: List[str] = []

src/research/clients/docs/arxiv_api.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<<<<<<< ours
21
# arXiv API Documentation
32

43
[See the entire API documentation site here](https://info.arxiv.org/help/api/user-manual.html)
@@ -219,14 +218,14 @@ print_r($response);
219218
* Use `id_list=cond-mat/0207270` for latest version
220219
* Use `id_list=cond-mat/0207270v1` for specific version
221220

222-
=======
223-
# ArXiv API
221+
---
222+
223+
## 🔄 Integration Notes
224224

225-
The metadata scanner uses the [ArXiv API](https://arxiv.org/help/api/user-manual) as a fallback
226-
when a DOI cannot be resolved via Crossref. The API is queried at
227-
`https://export.arxiv.org/api/query` with the `id_list` parameter set to the
228-
arXiv identifier extracted from a DOI like `10.48550/arXiv.XXXX`.
225+
The metadata scanner uses the [arXiv API](https://arxiv.org/help/api/user-manual)
226+
as a fallback when a DOI cannot be resolved via Crossref. The API is queried at
227+
`https://export.arxiv.org/api/query` with the `id_list` parameter set to the arXiv
228+
identifier extracted from a DOI such as `10.48550/arXiv.XXXX`.
229229

230230
The response is an Atom feed. The scanner parses the first entry to obtain
231231
fields such as title, authors, publication date, and DOI.
232-
>>>>>>> theirs

0 commit comments

Comments
 (0)