pi-tandem 0.6.3 → 0.6.5
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.
- package/README.md +2 -1
- package/package.json +1 -1
- package/prompt.md +8 -1
- package/runtime/cli-tools.mjs +2 -2
package/README.md
CHANGED
|
@@ -48,11 +48,12 @@ The plugin notices which CLI tools are actually installed on your machine, and f
|
|
|
48
48
|
- `html2text` (Python, e.g. via `pipx install html2text`) - read web pages as markdown instead of raw markup
|
|
49
49
|
- `lynx` - plain-text fallback for web pages when the Python `html2text` is not installed
|
|
50
50
|
- `pdftotext` (poppler) - extract text from PDFs
|
|
51
|
-
-
|
|
51
|
+
- Chromium or Google Chrome - headless-render fallback for JS-heavy or bot-blocked pages
|
|
52
52
|
- `pandoc` - convert docx/odt/rtf to markdown
|
|
53
53
|
- `osascript` (macOS only) - drive the user's real browser sessions via AppleScript
|
|
54
54
|
- `jira`, `aws`, `saml2aws` - if your workflow includes them
|
|
55
55
|
- `gcx` (Grafana CLI) - query Grafana logs and metrics from the terminal
|
|
56
|
+
- `slackcli` (`brew install shaharia-lab/tap/slackcli`) - read Slack channels, DMs and threads from the terminal
|
|
56
57
|
- `tmux` or `paseo` - run the main session inside one of these to enable [interactive subagents](#interactive-subagents)
|
|
57
58
|
|
|
58
59
|
## Attribution
|
package/package.json
CHANGED
package/prompt.md
CHANGED
|
@@ -38,6 +38,9 @@ Never write: "Great question!", "Let me know if...", "Let's dive in", "Here's wh
|
|
|
38
38
|
|
|
39
39
|
A number of CLI tools are installed on this laptop and fully authenticated, you're encouraged to use them when the situation calls for it.
|
|
40
40
|
|
|
41
|
+
<!--cli:rg-->
|
|
42
|
+
- Use `rg` instead of `grep`
|
|
43
|
+
<!--/cli-->
|
|
41
44
|
<!--cli:gh-->
|
|
42
45
|
- Use `gh` for anything GitHub: managing repos, issues, PRs, releases, workflows, API calls. For endpoints the CLI does not cover, use `gh api`
|
|
43
46
|
- Don't hammer GitHub with repeated gh calls for reading code - instead check whether repo is already cloned locally to a sibling folder, if not clone it, and grep locally
|
|
@@ -50,6 +53,10 @@ A number of CLI tools are installed on this laptop and fully authenticated, you'
|
|
|
50
53
|
- Use `gcx` to query Grafana logs and metrics: `gcx logs query '<logql>' --since 1h`, `gcx metrics query '<promql>' --since 1h`
|
|
51
54
|
- Use the `--jq '<expr>'` flag to filter or reshape gcx JSON output
|
|
52
55
|
<!--/cli-->
|
|
56
|
+
<!--cli:slackcli-->
|
|
57
|
+
- Use `slackcli` to read Slack: `slackcli conversations read <channel-or-slack-url>`, `slackcli search messages '<query>'`; add `--json` when you process the output
|
|
58
|
+
- Always include the message permalink, so the user can open and reply to it in Slack
|
|
59
|
+
<!--/cli-->
|
|
53
60
|
<!--cli:aws-->
|
|
54
61
|
- Use `aws` when you need to check what's happening in AWS accounts
|
|
55
62
|
- When using AWS CLI always pass --profile and --region explicitly. The profile is usually clear from context - if it is not, ask, never guess
|
|
@@ -67,7 +74,7 @@ A number of CLI tools are installed on this laptop and fully authenticated, you'
|
|
|
67
74
|
- Unless your task requires seeing actual tags, always convert HTML fetched from the web to plain text instead of reading it raw, for example when using `curl`: `curl -s <url> | lynx -stdin -dump` (link URLs are kept in a References list).
|
|
68
75
|
<!--/cli-->
|
|
69
76
|
<!--cli:browser-->
|
|
70
|
-
- Use a real headless browser when you need to read a JS-rendered or bot-blocked page:
|
|
77
|
+
- Use a real headless browser when you need to read a JS-rendered or bot-blocked page: `d=$(mktemp -d); <browser-binary> --headless=new --disable-gpu --timeout=10000 --user-data-dir="$d" --dump-dom --virtual-time-budget=5000 <url> 2>/dev/null; rm -rf "$d"`. An empty or half-rendered body means the page outlasted the timeout: drop this URL and look for a faster source instead of retrying.
|
|
71
78
|
- When in doubt, always try `curl` first before resorting to a headless browser
|
|
72
79
|
<!--/cli-->
|
|
73
80
|
<!--cli:pandoc-->
|
package/runtime/cli-tools.mjs
CHANGED
|
@@ -27,11 +27,11 @@ export function isOnPath(binary) {
|
|
|
27
27
|
|
|
28
28
|
// Chromium-family binary for the headless-render fallback; PATH first, then app bundles
|
|
29
29
|
function findBrowserBinary() {
|
|
30
|
-
for (const name of ["
|
|
30
|
+
for (const name of ["chromium", "chromium-browser", "google-chrome", "google-chrome-stable"]) {
|
|
31
31
|
if (isOnPath(name)) return name;
|
|
32
32
|
}
|
|
33
33
|
if (process.platform === "darwin") {
|
|
34
|
-
for (const app of ["
|
|
34
|
+
for (const app of ["Chromium", "Google Chrome"]) {
|
|
35
35
|
const bin = `/Applications/${app}.app/Contents/MacOS/${app}`;
|
|
36
36
|
try {
|
|
37
37
|
if (statSync(bin).isFile()) return bin;
|