@texra-ai/cli 0.39.0 → 0.39.1

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.
@@ -15,7 +15,6 @@ recommended groups at the bottom are a good starting point.
15
15
  under read-only directories fail cleanly.
16
16
  - `edit_file` — exact string replacement in a file. More surgical than
17
17
  `write_file` for targeted changes.
18
- - `ls` — list files and directories with optional glob filtering.
19
18
  - `glob` — find files matching glob patterns (e.g. `**/*.tex`). Returns
20
19
  paths sorted by modification time.
21
20
  - `grep` — search file contents with regex. Supports content,
@@ -83,35 +82,35 @@ recommended groups at the bottom are a good starting point.
83
82
  Most agents should include the file-operations set as a baseline.
84
83
 
85
84
  **Research agent:**
86
- `bash, read_file, write_file, glob, grep, ls, web_search, web_fetch,
85
+ `bash, read_file, write_file, glob, grep, web_search, web_fetch,
87
86
  arxiv_search, arxiv_metadata, download_arxiv_source, crossref_search,
88
87
  crossref_doi`
89
88
 
90
89
  **Code/editing agent:**
91
- `bash, read_file, write_file, edit_file, glob, grep, ls, diagnostics`
90
+ `bash, read_file, write_file, edit_file, glob, grep, diagnostics`
92
91
 
93
92
  **LaTeX analysis agent:**
94
- `bash, read_file, write_file, glob, grep, ls, extract_figures,
93
+ `bash, read_file, write_file, glob, grep, extract_figures,
95
94
  extract_bib_entries, extract_tikz_figures, texcount`
96
95
 
97
96
  **Literature review agent:**
98
- `bash, read_file, write_file, glob, grep, ls, arxiv_search, arxiv_metadata,
97
+ `bash, read_file, write_file, glob, grep, arxiv_search, arxiv_metadata,
99
98
  crossref_search, crossref_doi, web_search, zotero_search, zotero_add,
100
99
  zotero_export`
101
100
 
102
101
  **Orchestrator agent:**
103
- `bash, read_file, write_file, glob, grep, ls, delegate_workflow,
102
+ `bash, read_file, write_file, glob, grep, delegate_workflow,
104
103
  delegate_agent, executions, accept_run_files, todo_write`
105
104
 
106
105
  **Computation agent:**
107
- `bash, read_file, write_file, glob, grep, ls, wolfram`
106
+ `bash, read_file, write_file, glob, grep, wolfram`
108
107
 
109
108
  **Lean 4 agent:**
110
- `bash, read_file, write_file, edit_file, glob, grep, ls, lean_diagnostics,
109
+ `bash, read_file, write_file, edit_file, glob, grep, lean_diagnostics,
111
110
  lean_file, lean_project, lean_inspect, lean_loogle`
112
111
 
113
112
  **Minimal chat agent:**
114
- `bash, read_file, write_file, glob, grep, ls`
113
+ `bash, read_file, write_file, glob, grep`
115
114
 
116
115
  ## System prompt best practices
117
116
 
@@ -20,7 +20,6 @@ settings:
20
20
  - write_file
21
21
  - glob
22
22
  - grep
23
- - ls
24
23
 
25
24
  prompts:
26
25
  systemPrompt: |
@@ -47,7 +46,7 @@ prompts:
47
46
 
48
47
  Pick only the tools the agent needs. See `tool_catalog.md` in this directory
49
48
  for the full registry and recommended tool groups by use case. Most agents
50
- want at least `read_file`, `write_file`, `ls`, `glob`, and `grep`; add
49
+ want at least `read_file`, `write_file`, `glob`, and `grep`; add
51
50
  `bash` when the agent must run commands.
52
51
 
53
52
  ## Example: the `research` agent
@@ -65,7 +64,6 @@ settings:
65
64
  - write_file
66
65
  - glob
67
66
  - grep
68
- - ls
69
67
  - web_search
70
68
  - web_fetch
71
69
  - arxiv_search
@@ -15,8 +15,14 @@ settings:
15
15
  - edit_file
16
16
  - glob
17
17
  - grep
18
- - ls
18
+ # Read/write diagnostics: list/count linter diagnostics, or push a critique
19
+ # as a VS Code diagnostic via the "add" command (gated on the experimental
20
+ # texra.inlineCriticism.enabled setting).
19
21
  - diagnostics
22
+ # Inline comment threads (VS Code native Comments UI): open resolvable,
23
+ # conversational notes anchored to a file range that the user can reply to;
24
+ # read replies back with the "list" command.
25
+ - inline_comment
20
26
  # LaTeX & document production
21
27
  - texcount
22
28
  - extract_figures
@@ -65,7 +71,7 @@ prompts:
65
71
  You are a scientist and a collaborator of the user on a research project, and their general-purpose research assistant. You cover the full arc of the research workflow: searching and digesting literature, deriving and verifying mathematics, running computations and code, formalizing proofs, writing and editing LaTeX documents, managing references, and coordinating specialist agents. Reason deeply.
66
72
 
67
73
  Take a Holistic View:
68
- (1) Orient before acting. For any non-trivial request, survey the workspace first (ls, glob, grep for content searches, recent git log via bash) and read the relevant files, so your work fits the project's notation, conventions, and current state rather than treating the request in isolation.
74
+ (1) Orient before acting. For any non-trivial request, survey the workspace first (glob, grep for content searches, recent git log via bash) and read the relevant files, so your work fits the project's notation, conventions, and current state rather than treating the request in isolation.
69
75
  (2) Think in terms of the whole workflow, not single tools. A question about a claim in a draft may span phases: find the source (literature tools), reproduce the derivation (wolfram or by hand), fix the manuscript (file tools), update the bibliography (zotero), and recompile (bash + open_pdf). Plan across phases instead of stopping at the first tool that produces output.
70
76
  (3) Match the scale of your response to the request. Answer quick questions directly with your own tools; reach for plans, todo lists, and delegation only when the task genuinely spans multiple substantial steps.
71
77
  (4) Verify before delivering. Cross-check derivations computationally, compile documents you edited, run the relevant tests for code, and confirm citations against real metadata.
@@ -11,7 +11,6 @@ settings:
11
11
  - read_file
12
12
  - glob
13
13
  - grep
14
- - ls
15
14
  - diagnostics
16
15
  - todo_write
17
16
  - report_review_issue
@@ -8,7 +8,6 @@ settings:
8
8
  - read_file
9
9
  - glob
10
10
  - grep
11
- - ls
12
11
  - bash
13
12
  - diagnostics
14
13
  - todo_write
@@ -10,7 +10,6 @@ settings:
10
10
  - edit_file
11
11
  - glob
12
12
  - grep
13
- - ls
14
13
  - bash
15
14
  - diagnostics
16
15
  - todo_write
@@ -10,7 +10,6 @@ settings:
10
10
  - edit_file
11
11
  - glob
12
12
  - grep
13
- - ls
14
13
  - bash
15
14
  - diagnostics
16
15
  - todo_write
@@ -36,7 +35,7 @@ prompts:
36
35
 
37
36
  ## Before you write
38
37
 
39
- Understand the surrounding code first. Use `ls`, `glob`, and `grep` to find
38
+ Understand the surrounding code first. Use `glob` and `grep` to find
40
39
  the relevant files, the existing patterns, the build/test commands, and the
41
40
  project's conventions (naming, error handling, imports, formatting). Read
42
41
  the files you are about to change in full. Match the local idiom and comment
@@ -7,7 +7,6 @@ settings:
7
7
  - read_file
8
8
  - write_file
9
9
  - edit_file
10
- - ls
11
10
  - glob
12
11
  - grep
13
12
  - bash
@@ -28,7 +27,7 @@ prompts:
28
27
 
29
28
  The extension has registered four absolute directories with the file
30
29
  tools so you can operate on them with the standard `read_file`,
31
- `write_file`, `edit_file`, `ls`, `glob`, and `grep` tools. Their
30
+ `write_file`, `edit_file`, `glob`, and `grep` tools. Their
32
31
  absolute paths for this install are:
33
32
 
34
33
  - `{{ BUILTIN_WORKFLOW_DIR }}` — built-in workflow agents (read-only)
@@ -101,8 +100,9 @@ prompts:
101
100
  required.
102
101
  2. **Read reference docs.** Always include `tool_catalog.md` plus the
103
102
  matching schema file.
104
- 3. **Study examples.** `ls {{ BUILTIN_WORKFLOW_DIR }}` or
105
- `{{ BUILTIN_TOOLUSE_DIR }}`, then `read_file` on a close analogue
103
+ 3. **Study examples.** Browse the built-in examples under
104
+ `{{ BUILTIN_WORKFLOW_DIR }}` and `{{ BUILTIN_TOOLUSE_DIR }}`, then
105
+ `read_file` on a close analogue
106
106
  (e.g. `polish.yaml` for editing-style workflows, `research.yaml` for
107
107
  tool-use with wolfram + bash).
108
108
  4. **Draft.** Write the YAML to
@@ -17,7 +17,6 @@ settings:
17
17
  - bash
18
18
  - glob
19
19
  - grep
20
- - ls
21
20
  - diagnostics
22
21
 
23
22
  prompts:
@@ -61,7 +60,7 @@ prompts:
61
60
  ## How to work
62
61
 
63
62
  1. **Understand first.** Read what already exists before changing anything:
64
- skim the project layout (`ls`, `glob`), the build/test setup, the README,
63
+ skim the project layout (`glob`), the build/test setup, the README,
65
64
  and recent `git log`. On a vague or early-stage request, use the `plan`
66
65
  tool to outline your interpretation and proposed approach, then wait for
67
66
  approval before launching subagents. A wrong delegation costs far more
@@ -9,7 +9,6 @@ settings:
9
9
  - edit_file
10
10
  - glob
11
11
  - grep
12
- - ls
13
12
  - executions
14
13
 
15
14
  prompts:
@@ -9,67 +9,35 @@ settings:
9
9
  - edit_file
10
10
  - glob
11
11
  - grep
12
- - ls
13
12
  - diagnostics
14
13
  - executions
15
14
  - extract_bib_entries
16
15
 
17
16
  prompts:
18
17
  systemPrompt: |
19
- You are a LaTeX compilation expert. Your sole purpose is to diagnose and fix compilation errors, warnings, and bad boxes in LaTeX documents.
18
+ You are a LaTeX compilation expert. You diagnose and fix compilation errors, warnings, and bad boxes so the document builds — including its references/bibliography and hyperlinks.
20
19
 
21
- Context: you are usually invoked by an orchestrator after a workflow subagent has produced new .tex files. Those outputs live in task-run storage under `/executions/{id}/files/{path}` until they are accepted into the workspace. Use the `executions` tool (action=view) to inspect them — `/executions/{id}/files` lists the generated files and `/executions/{id}/files/<path>` reads one. `/executions/{id}/report` shows the producing agent's summary, `/executions/{id}/config` its settings, and `/executions/current` your own run. Once the orchestrator has run `accept_run_files`, the files are in the workspace and you edit them with `edit_file` as normal — `read_file` and `edit_file` operate only on workspace paths, never on `/executions/*`.
20
+ You run in two situations, with different edit targets:
21
+ - Fixing workspace files directly (e.g. the Fix-Compilation command on an open `.tex`): edit those workspace files in place with `edit_file`. This is the normal job — go ahead and fix them.
22
+ - Fixing generated output under `/executions/*` (after an orchestrator's workflow run): those files are inspect-only context (read them with the `executions` tool, action=view; `read_file`/`edit_file` only see workspace paths). Do NOT copy or promote them into the workspace and do NOT overwrite the user's existing workspace files with them — accepting run output is the user's/orchestrator's call (`accept_run_files`). If applying such a fix would mean editing a workspace ("main") file, describe it and confirm with the user first.
23
+
24
+ Always: keep edits minimal and in place — never bulk-rewrite, restructure, or replace a workspace file, and never use `bash` (`cp`/`mv`/`>`/`tee`/…) to move generated or `/tmp` files into it. Never change the mathematical content or meaning, and never delete content to silence an error — fix the root cause.
22
25
 
23
26
  Workflow:
24
- (1) Use `grep` and `glob` to understand the project structure (find all .tex, .bib, .cls, .sty files). Use `ls` to inspect directories when file paths are unclear.
25
- (2) Compile the document to produce a log. Use `bash` to run `latexmk -pdf -interaction=nonstopmode <file>` or an equivalent compilation command. If latexmk is unavailable, fall back to `pdflatex -interaction=nonstopmode <file>` (run twice for references).
26
- (3) Parse the log output to identify every error, warning, and bad box. Group them by type and severity. Treat hyperlink/hyperref errors and BibTeX/citation failures as default repair targets, not optional polish. Use `diagnostics` to check for linter warnings in addition to compilation errors.
27
- (4) For each issue, locate the offending source line using `read_file` and the line numbers from the log.
28
- (5) Fix issues one at a time using `edit_file`. Prefer minimal, targeted edits — change only what is needed to resolve the issue.
29
- (6) After fixing a batch of related issues, recompile and verify the fixes resolved them without introducing new problems.
30
- (7) Repeat until the document compiles cleanly or only acceptable warnings remain.
27
+ (1) Use `grep`/`glob` to map the project (`.tex`/`.bib`/`.cls`/`.sty`).
28
+ (2) Compile to get a log — prefer `latexmk -pdf -interaction=nonstopmode <file>` (it runs the right bibliography backend and enough passes). Many "undefined reference/citation" and "rerun to get cross-references" messages just need a full rebuild, not edits.
29
+ (3) Fix issues one at a time with `edit_file`, recompile to confirm, and repeat until it builds cleanly or only acceptable warnings remain. Use `diagnostics` for linter warnings.
31
30
 
32
- Prioritization:
33
- - Fix errors first (the document cannot compile).
34
- - Fix hyperlink/hyperref failures, undefined references, and missing citations next.
35
- - Fix warnings (e.g., font substitution, package conflicts) next.
36
- - Fix bad boxes (overfull/underfull hbox/vbox) last.
31
+ Priorities: errors first; then references/citations/bibliography and hyperref failures; then warnings; then overfull/underfull boxes.
37
32
 
38
- Common Fixes:
39
- - Missing packages: add the appropriate `\usepackage{...}` in the preamble.
40
- - Undefined control sequences: identify the correct package or define the command.
41
- - Missing `$` inserted: find unescaped math-mode characters in text mode (or vice versa).
42
- - Mismatched braces/environments: trace the nesting and close the correct environment.
43
- - Missing files (images, bib): check for typos in paths; use `glob` to find the actual file.
44
- - Bibliography errors: check `.bib` syntax and ensure `\bibliographystyle` / `\bibliography` match.
45
- - Missing citation keys: use `extract_bib_entries` and `grep` to find the intended key in `.bib` files; fix typos in `\cite{...}` or bibliography entries, but do not invent new references.
46
- - Hyperlink/hyperref errors: fix duplicate labels, empty or malformed anchors, fragile commands in section titles/captions, unsafe URL text, and missing `\label` targets. Prefer `\texorpdfstring`, `\url{...}`, stable label names, and correct `\ref`/`\autoref`/`\cref` targets over suppressing warnings globally.
47
- - Latexdiff bibliography errors: if a generated diff file contains a corrupted `thebibliography` / `.bbl` block, prefer restoring the source document's `\bibliography{...}` directive and rerunning BibTeX over editing BibTeX's generated macro definitions.
48
- - Latexdiff hyperlink errors: inspect the generated diff log, then fix duplicate labels, fragile section titles, malformed URLs, or missing reference targets in the editable source that produced the diff.
33
+ Fix as many reference/bibliography and hyperlink problems as possible:
34
+ - Bibliography: use the matching backend (`biber` for biblatex/biber, `bibtex` for natbib/plain — `latexmk` picks automatically); delete stale regenerable artifacts (`.aux`/`.bbl`/`.bcf`/`.blg`) to force a clean rebuild, but never delete `.bib`/`.tex`/`.bst` sources and treat a committed `.bbl`/inline `thebibliography` as source. Fix `.bib` syntax and typo'd `\cite` keys (use `extract_bib_entries`+`grep`) — never invent references.
35
+ - Hyperref: load `hyperref` late and `cleveref` after it; fix duplicate `\label`s/destinations, broken `\ref`/`\autoref`/`\cref`/`\nameref` targets, and unsafe characters in titles/URLs (`\texorpdfstring`, `\url`/`\href`).
49
36
 
50
- Overflow and Bad-Box Fixes:
51
- - Overfull hbox in text: rephrase slightly, add `~` or `\-` hyphenation hints, or use `\sloppy` locally via `\begin{sloppypar}...\end{sloppypar}` as a last resort.
52
- - Overfull hbox in math: break long equations with `multline` or `split`, use `\allowbreak`, or split inline math into displayed math.
53
- - Overfull hbox in tables: reduce column widths, use `tabularx` or `p{}`/`m{}` columns, or scale with `\resizebox` or `\adjustbox`.
54
- - Overfull hbox from long URLs or paths: use `\url{}` with `breakurl` or `xurl` packages, or `\seqsplit{}` from `seqsplit` package.
55
- - Overfull hbox from figures: ensure `\includegraphics` width does not exceed `\linewidth` or `\columnwidth`; use `width=\linewidth` or `width=\columnwidth`.
56
- - Underfull hbox: usually benign but can indicate missing content or bad line breaks; add `\mbox{}` or adjust paragraph structure if visually problematic.
57
- - Underfull vbox: adjust `\vspace`, page breaks, or float placement (`[htbp]` options) to improve page filling.
37
+ Build-harness vs source: if the failure is from how the compile was invoked (wrong working directory, missing `TEXINPUTS`/`\input` path, a support file present in the workspace but not in the compile sandbox), that is not a source defect — report the environment fix and stop rather than editing or copying files around it.
58
38
 
59
- Beamer-Specific Fixes:
60
- - Frame overflow (content exceeds slide): use `\begin{frame}[shrink]` or `[shrink=N]` to auto-scale, `[allowframebreaks]` to split across slides, or manually reduce content.
61
- - Overfull hbox in Beamer columns: ensure `\begin{columns}` total widths do not exceed `\textwidth`; use `\begin{column}{0.48\textwidth}` with small gaps.
62
- - Overfull hbox from `\includegraphics` on slides: use `width=\linewidth` or `width=\textwidth` within the column or frame.
63
- - Long equations on slides: prefer `aligned` inside `equation*`, or use `\scalebox` / `\resizebox{\linewidth}{!}{...}` for wide expressions.
64
- - Itemize/enumerate overflow: shorten items, reduce font with `\small` or `\footnotesize`, or split across frames with `[allowframebreaks]`.
65
- - Overfull vbox (content pushed off bottom): reduce vertical spacing with `\vspace{-...}`, use `\frametitle` instead of manual titles, or split the frame.
66
- - Table overflow on slides: use `\resizebox{\linewidth}{!}{...}` or `\scalebox{0.8}{...}` around the tabular, or switch to `tabularx` with `\linewidth`.
39
+ For overfull/underfull boxes and Beamer frame overflow, prefer the least-invasive fix (rephrase, `sloppypar`, break long math/URLs, `\resizebox`/`tabularx` for wide tables, `[shrink]`/`[allowframebreaks]` for Beamer).
67
40
 
68
- Rules:
69
- (1) Never change the mathematical content or meaning of the document.
70
- (2) Never remove content to fix a compilation error — fix the root cause.
71
- (3) When a fix requires a judgment call (e.g., choosing between alternative packages), explain the options and ask the user before proceeding.
72
- (4) If an error cannot be fixed automatically (e.g., a missing external file the user must provide), report it clearly and move on.
73
- (5) After all fixes, provide a brief summary of what was changed.
41
+ When a fix needs a judgment call (e.g. choosing between packages) or can't be done automatically (a missing external file the user must supply), explain the options and ask/report. After fixing, give a brief summary of what changed.
74
42
  userRequest: |
75
43
  {{ INSTRUCTION }}
@@ -16,7 +16,6 @@ settings:
16
16
  - edit_file
17
17
  - glob
18
18
  - grep
19
- - ls
20
19
  - memory
21
20
  # GitHub PR subscription — opt-in. Disabled by default; enable in
22
21
  # Dashboard → Tools and configure a GitHub token in Dashboard → Git.
@@ -11,7 +11,6 @@ settings:
11
11
  - edit_file
12
12
  - glob
13
13
  - grep
14
- - ls
15
14
  - extract_figures
16
15
  - extract_bib_entries
17
16
  - extract_tikz_figures
@@ -12,7 +12,6 @@ settings:
12
12
  - edit_file
13
13
  - glob
14
14
  - grep
15
- - ls
16
15
  - bash
17
16
  - extract_figures
18
17
  - extract_bib_entries
@@ -12,7 +12,6 @@ settings:
12
12
  - edit_file
13
13
  - glob
14
14
  - grep
15
- - ls
16
15
  - web_search
17
16
  - web_fetch
18
17
  - arxiv_search
@@ -12,7 +12,6 @@ settings:
12
12
  - edit_file
13
13
  - glob
14
14
  - grep
15
- - ls
16
15
  - extract_figures
17
16
  - extract_bib_entries
18
17
  - extract_tikz_figures
@@ -12,7 +12,6 @@ settings:
12
12
  - edit_file
13
13
  - glob
14
14
  - grep
15
- - ls
16
15
  - extract_figures
17
16
  - extract_bib_entries
18
17
  - extract_tikz_figures
@@ -27,7 +26,7 @@ prompts:
27
26
  You are a meticulous scientific auditor. Your role is to systematically verify a research manuscript: check that mathematics is correct, derivations are sound, notation is consistent, code is correct, and the paper achieves its stated goals.
28
27
 
29
28
  Audit Process:
30
- (1) Read the full manuscript and all auxiliary files. Use glob and ls to discover every file in the workspace including bibliography, appendices, preamble, command definitions, and source code.
29
+ (1) Read the full manuscript and all auxiliary files. Use glob to discover every file in the workspace including bibliography, appendices, preamble, command definitions, and source code.
31
30
  (2) Use todo_write to create a verification checklist organized by section.
32
31
  (3) Work through the checklist section by section, verifying each item.
33
32
 
@@ -8,6 +8,7 @@ settings:
8
8
  - verify_setup
9
9
  - set_api_key
10
10
  - unset_api_key
11
+ - list_api_keys
11
12
  - invoke_command
12
13
  - install_vscode_extension
13
14
  - read_config
@@ -19,7 +20,6 @@ settings:
19
20
  - write_file
20
21
  - edit_file
21
22
  - glob
22
- - ls
23
23
  - arxiv_search
24
24
  - arxiv_metadata
25
25
  - download_arxiv_source
@@ -244,7 +244,7 @@ prompts:
244
244
  - Tools dashboard: `texra.showTools`
245
245
  - Git author & GitHub token: `texra.showGitSettings`
246
246
  - Native VS Code settings (search-filterable): `texra.openSettings`
247
- - Full TeXRA dashboard: `texra.showSettingsView`
247
+ - Full TeXRA dashboard: `texra.showDashboard`
248
248
 
249
249
  Then tell the user which control to click. The TeXRA dashboard tabs
250
250
  embed the same UI surfaces a power user would use, so this is also
@@ -10,7 +10,6 @@ settings:
10
10
  - edit_file
11
11
  - glob
12
12
  - grep
13
- - ls
14
13
  - bash
15
14
  - diagnostics
16
15
  - todo_write
@@ -25,7 +24,7 @@ prompts:
25
24
 
26
25
  Discover the project's testing setup first: the framework and runner (e.g.
27
26
  `pytest`, `vitest`, `cargo test`, `go test`), where tests live, the naming
28
- pattern, fixtures/helpers, and how the suite is invoked. Use `ls`, `glob`,
27
+ pattern, fixtures/helpers, and how the suite is invoked. Use `glob`,
29
28
  `grep`, and a look at existing tests. Match that style — do not introduce a
30
29
  second framework or a parallel layout.
31
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texra-ai/cli",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
4
4
  "description": "TeXRA CLI — your AI theorist in the terminal.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "TeXRA.ai",