google-trends-for-agent 0.2.41 → 0.2.43
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/AGENTS.md +24 -20
- package/CHANGELOG.md +17 -0
- package/README.md +36 -19
- package/README.zh-CN.md +36 -19
- package/dist/dsh-client.js +1 -1
- package/docs/assets/demo-dsh-install-en.svg +361 -0
- package/docs/assets/demo-dsh-install-zh.svg +361 -0
- package/docs/clients/claude.md +3 -3
- package/docs/clients/codex.md +3 -3
- package/docs/clients/cursor-vscode.md +1 -1
- package/docs/clients/dots.md +3 -3
- package/docs/clients/dsh.md +18 -4
- package/docs/clients/openclaw.md +11 -5
- package/docs/reference.md +13 -11
- package/docs/releasing.md +9 -3
- package/package.json +1 -1
package/docs/reference.md
CHANGED
|
@@ -4,9 +4,13 @@ Operational detail for the CLI, the MCP server, the dsh plugin, and the numbers
|
|
|
4
4
|
|
|
5
5
|
## CLI surface
|
|
6
6
|
|
|
7
|
-
The package installs `gtfa` for the CLI and `gtfa-mcp` for the MCP server.
|
|
7
|
+
The package installs `gtfa` for the CLI and `gtfa-mcp` for the MCP server (Node.js 20+). Use `npx -y -p google-trends-for-agent` for zero-install execution, or install globally from npm:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm install -g google-trends-for-agent
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or build from a local source checkout:
|
|
10
14
|
|
|
11
15
|
```sh
|
|
12
16
|
git clone https://github.com/meka-im/google-trends-for-agent.git
|
|
@@ -15,7 +19,7 @@ npm ci
|
|
|
15
19
|
npm install -g "$(npm pack | tail -1)"
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Pin a published npm version or git commit if a review process requires an immutable source revision.
|
|
19
23
|
|
|
20
24
|
| Command | Flags | Purpose |
|
|
21
25
|
| --- | --- | --- |
|
|
@@ -26,7 +30,7 @@ The clone follows the repository's default `main` branch. If a review process ne
|
|
|
26
30
|
| `gtfa baselines` | `--sync`, `--store DIR`, `--json`, `--pretty`, `--help` | Inspect active MEKA v1 calibration baselines status or manually sync from `meka.im`. |
|
|
27
31
|
| `gtfa doctor` | `--timeout MS`, `--json`, `--pretty`, `--help` | Checks Node.js >= 20, Google Trends reachability, proxy mode, and one live `gpts` US 24h fetch. `--timeout` accepts 1000–60000 and defaults to 8000 ms for each network check; a challenge or HTTP 429 skips the live fetch. Exit 0 only when all checks pass. |
|
|
28
32
|
|
|
29
|
-
Examples below assume a global `gtfa`; without one, replace `gtfa` with `npx -y -p
|
|
33
|
+
Examples below assume a global `gtfa`; without one, replace `gtfa` with `npx -y -p google-trends-for-agent gtfa`. `--types` accepts `interestOverTime`, `interestByCity`, `interestByMetro`, `interestBySubregion`, `relatedQueries`, or `relatedTopics`. `--start` and `--end` must be used together; do not combine Explore URLs with `--query`. Defaults are US, `now 7-d`, web, category 0, except where a command says otherwise. `compare` and the default `--query` mode honor omitted `geo`, `time`, `category`, `property`, and `locale` (`hl`) from `gtfa.config.json`; `GTFA_GEO` and `GTFA_TIME` supply their respective environment defaults. Explore URL plans keep the URL's filters, and explicit dates keep their dates. Chart time zones resolve as explicit `--tz` / `tz`, then `GTFA_TZ`, then `UTC`.
|
|
30
34
|
|
|
31
35
|
```sh
|
|
32
36
|
gtfa ask "nano banana" --validate --diff --json
|
|
@@ -100,27 +104,25 @@ After the persistent install, use this config (or an absolute path to `gtfa-mcp`
|
|
|
100
104
|
Check both package-download and data-fetch connectivity:
|
|
101
105
|
|
|
102
106
|
```sh
|
|
103
|
-
curl -I https://
|
|
107
|
+
curl -I https://registry.npmjs.org
|
|
104
108
|
curl -I https://trends.google.com
|
|
105
109
|
```
|
|
106
110
|
|
|
107
|
-
If `npx …` exits
|
|
111
|
+
If `npx …` exits non-zero with empty stdout/stderr, the npm package fetch failed before gtfa started; inspect the npm debug log (typically `~/.npm/_logs/`). **MCP fails to start** means npx/npm errors or EOF before the handshake. **MCP started but a tool fetch failed** means the handshake and `tools/list` succeed, but the tool returns `NETWORK_ERROR`, `RATE_LIMITED`, or another upstream error. Use `gtfa doctor --json` for the latter.
|
|
108
112
|
|
|
109
113
|
## dsh plugin
|
|
110
114
|
|
|
111
|
-
Prerequisites: dsh
|
|
115
|
+
Prerequisites: DeepSeek Harness Desktop for macOS or `dsh` CLI (**Node >=24.9** and **pnpm >=10** on `PATH`; `npm i -g @deepseek-ai/dsh pnpm@10`). The gtfa CLI/MCP alone require Node 20+ (`engines.node: >=20`).
|
|
112
116
|
|
|
113
|
-
`
|
|
117
|
+
Installing `google-trends-for-agent` from npm (either via Desktop **Plugins → + Install plugin → `google-trends-for-agent`** or `dsh plugin --profile web add google-trends-for-agent`) mounts the bundle directly with zero manual `allowBuilds` setup. The bundle registers four native in-process tools and a `gtfa` skill. By default it does not use MCP, the Actor endpoint, the `gtfa` CLI, or `@modelcontextprotocol/sdk`; the `actor-public` and `actor-own` egress routes call an Actor.
|
|
114
118
|
|
|
115
|
-
|
|
119
|
+
When installing unreleased commits from GitHub `main` (`dsh plugin --profile web add github:meka-im/google-trends-for-agent`), the first run usually prints a build-approval key and fails; append that key (ending in the commit hash) as an `allowBuilds:` map with `: true` (never an `onlyBuiltDependencies:` list) to `$DSH_HOME/profiles/web/pnpm-workspace.yaml` (keeping existing keys) and re-run:
|
|
116
120
|
|
|
117
121
|
```yaml
|
|
118
122
|
allowBuilds:
|
|
119
123
|
"google-trends-for-agent@https://codeload.github.com/meka-im/google-trends-for-agent/tar.gz/<commit>": true
|
|
120
124
|
```
|
|
121
125
|
|
|
122
|
-
pnpm suggests an `onlyBuiltDependencies:` list; dsh profiles require an `allowBuilds:` map with `: true` (a list under `allowBuilds` fails). The key changes whenever main moves; re-add it after updates.
|
|
123
|
-
|
|
124
126
|
The plugin is enabled by default after install. In dsh 0.2.2-rc.1, open **dsh web → Plugins → Google Trends** (the installed-plugin card), then under **Components** click the **Google Trends / gtfa** row to open the settings page. In the **Connection** section, use the three-way **Egress** control to pick **Local (this machine)**, **Public Actor**, or **My own Actor**. Click **Save** to apply egress changes; no restart is needed.
|
|
125
127
|
|
|
126
128
|
### Apify OAuth and credential resolution
|
package/docs/releasing.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# Release and acceptance
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`google-trends-for-agent` is published on [npm](https://www.npmjs.com/package/google-trends-for-agent) and [Apify Store](https://apify.com/meka.im/google-trends-for-agent). Use one source commit and one tarball for the checks below; record their SHA-256, package version, Node version, client version and actual execution path.
|
|
4
|
+
|
|
5
|
+
## Standard release flow (GitHub → npm → Apify)
|
|
6
|
+
|
|
7
|
+
1. **Sync versions and documentation.** Update `package.json`, `package-lock.json` (root and `packages[""]`), `.actor/actor.json`, and `CHANGELOG.md` to the target `x.y.z` version. Verify `README.md`, `README.zh-CN.md`, `AGENTS.md`, and `docs/clients/*.md` reflect the current install/usage instructions—remember that the npm package page displays the `README.md` packed at release time.
|
|
8
|
+
2. **PR and CI gate.** Push a branch and open a pull request into `main`. Confirm all checks in `CI required` (Node 20 & 24, `check:docs`, `npm audit`, `check:package`, and `test:compat`) pass before merging.
|
|
9
|
+
3. **Publish GitHub Release `v<x.y.z>`.** Creating and publishing the GitHub Release from `main` automatically triggers `.github/workflows/publish-npm.yml`, which re-runs all verification checks and publishes `--provenance --access public` to npm (via `NPM_TOKEN` or Trusted Publishing).
|
|
10
|
+
4. **Rebuild Apify Public Actor and probe health.** Rebuild `meka.im/google-trends-for-agent` (assigning `latest` tag), then run `.github/workflows/apify-health.yml` (`force_probe=true`) to verify live execution and `notice: NONE`.
|
|
11
|
+
5. **Post-release verification.** Confirm `https://registry.npmjs.org/google-trends-for-agent` serves `latest: x.y.z` with provenance attestations and updated README, Apify `GTFA_RUNTIME` reports `x.y.z`, and GitHub repo homepage/topics match.
|
|
6
12
|
|
|
7
13
|
## Local gate
|
|
8
14
|
|