agent-sh 0.14.10 → 0.14.11

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.
Files changed (60) hide show
  1. package/README.md +47 -20
  2. package/dist/agent/agent-loop.js +20 -15
  3. package/dist/agent/events.d.ts +2 -1
  4. package/dist/agent/index.js +38 -7
  5. package/dist/agent/live-view.d.ts +3 -3
  6. package/dist/agent/live-view.js +15 -7
  7. package/dist/agent/providers/openrouter.js +9 -0
  8. package/dist/agent/subagent.js +1 -1
  9. package/dist/cli/install.js +10 -1
  10. package/dist/shell/events.d.ts +3 -0
  11. package/dist/shell/shell.js +3 -0
  12. package/dist/utils/diff-renderer.d.ts +4 -0
  13. package/dist/utils/diff-renderer.js +15 -20
  14. package/examples/extensions/ads/SKILL.md +170 -0
  15. package/examples/extensions/ash-scheme/index.ts +332 -672
  16. package/examples/extensions/ash-scheme/package.json +1 -1
  17. package/examples/extensions/ashi/EXTENDING.md +116 -0
  18. package/examples/extensions/ashi/README.md +10 -54
  19. package/examples/extensions/ashi/package.json +6 -2
  20. package/examples/extensions/ashi/src/autocomplete-controller.ts +95 -0
  21. package/examples/extensions/ashi/src/autocomplete.ts +1 -23
  22. package/examples/extensions/ashi/src/capture.ts +9 -3
  23. package/examples/extensions/ashi/src/chat/assistant.ts +87 -0
  24. package/examples/extensions/ashi/src/chat/lines.ts +20 -0
  25. package/examples/extensions/ashi/src/chat/thinking.ts +42 -0
  26. package/examples/extensions/ashi/src/chat/tool-group.ts +84 -0
  27. package/examples/extensions/ashi/src/chat/user-message.ts +20 -0
  28. package/examples/extensions/ashi/src/cli.ts +56 -10
  29. package/examples/extensions/ashi/src/clipboard-image.ts +41 -0
  30. package/examples/extensions/ashi/src/commands.ts +11 -1
  31. package/examples/extensions/ashi/src/display-config.ts +9 -1
  32. package/examples/extensions/ashi/src/frontend.ts +340 -259
  33. package/examples/extensions/ashi/src/hooks.ts +33 -40
  34. package/examples/extensions/ashi/src/renderer.ts +222 -0
  35. package/examples/extensions/ashi/src/renderers/pi-tui/app.ts +122 -0
  36. package/examples/extensions/ashi/src/renderers/pi-tui/index.ts +23 -0
  37. package/examples/extensions/ashi/src/renderers/pi-tui/nodes.ts +133 -0
  38. package/examples/extensions/ashi/src/renderers/pi-tui/schema-mount.ts +193 -0
  39. package/examples/extensions/ashi/src/renderers/pi-tui/theme-adapters.ts +48 -0
  40. package/examples/extensions/ashi/src/renderers/pi-tui/tool-group.ts +21 -0
  41. package/examples/extensions/ashi/src/schema.ts +43 -205
  42. package/examples/extensions/ashi/src/status-footer.ts +15 -23
  43. package/examples/extensions/ashi/src/terminal-mode.ts +9 -0
  44. package/examples/extensions/ashi/src/theme.ts +1 -47
  45. package/examples/extensions/ashi-ink/README.md +59 -0
  46. package/examples/extensions/ashi-ink/package.json +30 -0
  47. package/examples/extensions/ashi-ink/src/index.ts +6 -0
  48. package/examples/extensions/ashi-ink/src/ink-renderer.tsx +865 -0
  49. package/examples/extensions/ashi-ink/src/shims.d.ts +5 -0
  50. package/examples/extensions/ashi-ink/test/render.test.tsx +408 -0
  51. package/examples/extensions/ashi-ink/tsconfig.json +14 -0
  52. package/examples/extensions/ashi-scheme-render.ts +4 -10
  53. package/examples/extensions/ashi-shell-passthrough.ts +95 -0
  54. package/examples/extensions/latex-images.ts +22 -19
  55. package/examples/extensions/terminal-buffer.ts +4 -2
  56. package/package.json +3 -9
  57. package/examples/extensions/ashi/src/components.ts +0 -238
  58. package/examples/extensions/ollama.ts +0 -108
  59. package/examples/extensions/opencode-provider.ts +0 -251
  60. package/examples/extensions/zai-coding-plan.ts +0 -35
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: ads
3
+ description: >-
4
+ Full ADS query syntax reference and search strategy for the ads_search, ads_paper, ads_citations,
5
+ and ads_download_pdf tools. Load this before composing ADS queries — the tool descriptions only
6
+ cover basic field prefixes. Contains: fielded search syntax, date/class filters (entdate, arxiv_class),
7
+ citation operators, wildcards, positional search, properties, doctypes, daily arXiv listing patterns,
8
+ and query recipes.
9
+ ---
10
+
11
+ # ADS Query Syntax & Search Strategy
12
+
13
+ Reference: <https://ui.adsabs.harvard.edu/help/search/>
14
+
15
+ ## Query Basics
16
+
17
+ - Space = AND, `OR`, `NOT` / `-` (exclude), `()` group, `"phrase"`
18
+ - Precedence: `NOT` > `AND` > `OR` > implicit-AND > `-`
19
+
20
+ ## Fielded Search
21
+
22
+ ### Text Fields
23
+
24
+ | Field | Syntax |
25
+ |-------|--------|
26
+ | Title+Abstract+Keywords | `abs:"phrase"` |
27
+ | Title only | `title:"phrase"` |
28
+ | Abstract only | `abstract:"phrase"` |
29
+ | Keywords | `keyword:"phrase"` |
30
+ | Full text (body+abs+title+ack+kw) | `full:"phrase"` |
31
+ | Body only | `body:"phrase"` |
32
+ | Acknowledgements | `ack:"phrase"` |
33
+
34
+ ### Author
35
+
36
+ | Syntax | Meaning |
37
+ |--------|---------|
38
+ | `author:"Last, F"` | Greedy match (initials, variations) |
39
+ | `author:"Last, First M"` | More precise (recommended) |
40
+ | `author:"^Last, F"` | First-author only |
41
+ | `=author:"Last, F"` | Exact match, no synonym expansion |
42
+
43
+ Precision: `author:"murray, s"` (broadest) → `"murray, stephen"` → `"murray, stephen s"` (tightest)
44
+
45
+ ### Identifiers & Publication
46
+
47
+ `bibcode:ID`, `doi:DOI`, `arXiv:ID`, `identifier:ID`, `bibstem:ApJ`, `volume:N`, `issue:N`, `page:N`, `year:YYYY` or `year:YYYY-YYYY`, `pubdate:[YYYY-MM TO YYYY-MM]`
48
+
49
+ ### Affiliation
50
+
51
+ `aff:"phrase"` (raw), `inst:"Harvard U"` (curated, matches variants), `inst:"UCLA/IGPP"` (department), `aff_id:ID`
52
+
53
+ ### Object & Position
54
+
55
+ `object:Andromeda` (SIMBAD+NED), `object:"(SMC OR LMC) AND M31"` (combined), cone search: `object:"RA Dec:radius"` (decimal deg or sexagesimal, default 2', max 60')
56
+
57
+ ### Classification & Counts
58
+
59
+ `database:astronomy|physics|general`, `doctype:type`, `arxiv_class:"class"`, `property:flag`, `bibgroup:name`, `citation_count:[10 TO 100]`, `author_count:[10 TO 100]`, `read_count:N`, `facility:/regex/`, `orcid:ID`, `grant:agency`
60
+
61
+ ## Synonyms & Case Sensitivity
62
+
63
+ - lowercase → matches variations + synonyms (e.g. `title:star` → star, stars, stellar…)
64
+ - UPPERCASE → acronym-only (`title:STAR` → only "STAR")
65
+ - `=field:` prefix → exact match, no synonym expansion
66
+
67
+ ## Wildcards & Proximity
68
+
69
+ | Syntax | Meaning |
70
+ |--------|---------|
71
+ | `*` / `?` | Multi/single-char wildcard |
72
+ | `NEAR[N]` | ≤N words apart, any order |
73
+ | `"term1 term2"~N` | In-order proximity within N positions |
74
+ | `/regex/` | Lucene regex on indexed tokens |
75
+
76
+ ## Positional Search — `pos(query, positions...)`
77
+
78
+ Works on: `author`, `aff`, `title`. Examples: `pos(author:"Oort, J", 2)` (2nd author), `pos(author:"Oort", 1,3)` (1st–3rd), `pos(author:"Oort", -1)` (last), `pos(aff:"harvard", 1)` (1st author at Harvard)
79
+
80
+ ## Citation & Reference Operators
81
+
82
+ `citations(query)` = papers citing query results, `references(query)` = papers cited by query results. Nestable with other terms.
83
+
84
+ ## Second-Order Operators
85
+
86
+ `similar(query)` (textually similar), `trending(query)` (read by same readers), `useful(query)` (frequently cited by results), `reviews(query)` (citing papers ranked by freq), `topn(N, query, sort)`
87
+
88
+ Tip: `similar()` excludes originals; use disjoint `entdate` ranges to control overlap.
89
+
90
+ ## Properties
91
+
92
+ `refereed`, `notrefereed`, `article`, `nonarticle`, `openaccess`, `ads_openaccess`, `pub_openaccess`, `eprint_openaccess`, `author_openaccess`, `data`, `esource`, `inspire`, `toc`
93
+
94
+ ## Document Types
95
+
96
+ `article`, `eprint`, `inproceedings`, `inbook`, `abstract`, `book`, `bookreview`, `catalog`, `circular`, `erratum`, `mastersthesis`, `newsletter`, `obituary`, `phdthesis`, `pressrelease`, `proceedings`, `proposal`, `software`, `talk`, `techreport`, `misc`
97
+
98
+ ## Bibliographic Groups
99
+
100
+ Institutional: ARI, CfA, CFHT, Leiden, USNO | Telescope: ALMA, CXC, ESO, Gemini, Herschel, HST, ISO, IUE, JCMT, Keck, Magellan, NOIRLab, NRAO, ROSAT, SDO, SMA, Spitzer, Subaru, Swift, UKIRT, XMM
101
+
102
+ ## Daily arXiv Listings
103
+
104
+ Use `entdate` (day-resolution) with `doctype:eprint` and `arxiv_class`. Note: `pubdate` is month-resolution only.
105
+
106
+ ```
107
+ # Today's astro-ph.CO (±2 day window)
108
+ arxiv_class:"astro-ph.CO" entdate:[2026-04-07 TO 2026-04-09] doctype:eprint
109
+
110
+ # All astro-ph classes
111
+ arxiv_class:("astro-ph.CO" OR "astro-ph.GA" OR "astro-ph.HE" OR "astro-ph.IM" OR "astro-ph.EP" OR "astro-ph.SR") entdate:[2026-04-07 TO 2026-04-09] doctype:eprint
112
+ ```
113
+
114
+ Subclasses: `CO` (Cosmology), `EP` (Earth & Planetary), `GA` (Galaxy Astrophysics), `HE` (High Energy), `IM` (Instrumentation), `SR` (Solar & Stellar).
115
+
116
+ ## Search Strategy: Simplicity First
117
+
118
+ - Start with 2–3 core nouns. If too many results, add constraints (year, author, title:). Don't start with a sentence.
119
+ - ADS is keyword/metadata matching, not semantic search. Overloading queries kills recall.
120
+ - Use `detail='full'` on fewer results rather than compact on many — abstracts often contain the answer.
121
+
122
+ ### Common Pitfalls
123
+
124
+ **1. Compound multi-concept queries → zero results.**
125
+ Fix: 1–2 core terms + `sort_by` + `year_from:`. Scan abstracts for specifics.
126
+ ```
127
+ # Bad: "Population III He II helium 1640 JWST metal-poor galaxy candidate"
128
+ # Good: "Population III JWST" sort_by:date year_from:2024
129
+ ```
130
+
131
+ **2. Non-article doctypes polluting results.**
132
+ Fix: `doctype:article` or `property:refereed`.
133
+
134
+ **3. Iterative reformulation without simplifying.**
135
+ If 2+ zero-result queries on the same topic: strip to 1–2 broadest terms, or use `web_search` first to find titles/authors, then look up in ADS.
136
+
137
+ **4. Use `web_search` → ADS as a two-step pipeline.**
138
+ For complex/emerging topics, start with `web_search` (plural `queries`, 2–4 varied angles) to identify key papers/arXiv IDs, then verify via `ads_paper` or targeted `ads_search`.
139
+
140
+ ### When Keyword Search Fails, Use Citation Networks
141
+
142
+ For interdisciplinary connections, find a known paper then walk citations (`ads_citations`) or references. Citation chains beat keyword matching for cross-domain discovery.
143
+
144
+ ## Quick Query Recipes
145
+
146
+ ```
147
+ # Recent refereed articles on a topic
148
+ abs:"dark energy" year:2023-2025 property:refereed doctype:article
149
+
150
+ # Papers by first author at an institution
151
+ author:"^smith, john" inst:"MIT"
152
+
153
+ # Highly-cited reviews
154
+ reviews("machine learning astronomy") property:refereed
155
+
156
+ # Papers citing a specific work, sorted by citations
157
+ citations(bibcode:2023ApJ...950L..12A) sort:citation_count
158
+
159
+ # Object in specific journal
160
+ object:Andromeda bibstem:ApJ
161
+
162
+ # Open access with data links
163
+ property:openaccess property:data keyword:"gravitational waves"
164
+
165
+ # Exclude preprints, keep only journal articles
166
+ abs:"transiting exoplanet" doctype:article -arxiv_class:*
167
+
168
+ # Cone search
169
+ object:"12h30m49.4s +12d29m40s:5"
170
+ ```