google-trends-for-agent 0.2.42 → 0.2.44

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 CHANGED
@@ -76,21 +76,24 @@ For local MCP, restart the client, then call `trends_ask` with a single term. `t
76
76
 
77
77
  ## dsh plugin
78
78
 
79
- Prerequisites: dsh requires **Node >=24.9** and **pnpm >=10** on PATH (`allowBuilds` needs pnpm 10; tested with 10.34.6). Install dsh with `npm i -g @deepseek-ai/dsh` and pnpm with `npm i -g pnpm@10`. The gtfa CLI/MCP alone require Node 20+ (`engines.node: >=20`). Without pnpm on PATH, plugin installation fails with `spawn pnpm ENOENT` / `pnpm was not found`.
79
+ Prerequisites: dsh 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 only require Node 20+ (`engines.node: >=20`).
80
+
81
+ Install from npm (no manual `allowBuilds` required):
82
+
83
+ - **DeepSeek Harness Desktop:** Plugins → `+ Install plugin` → enter `google-trends-for-agent` directly (do not paste a full `npmjs.com` web URL).
84
+ - **dsh CLI:**
80
85
 
81
86
  ```sh
82
- dsh plugin --profile web add github:meka-im/google-trends-for-agent
87
+ dsh plugin --profile web add google-trends-for-agent
83
88
  ```
84
89
 
85
- The first run usually prints a key and fails; a cached build in the pnpm store may pass immediately. Append the block below, using the exact key pnpm prints (ending in the commit hash), to the YAML dsh already generated at `$DSH_HOME/profiles/web/pnpm-workspace.yaml` (`DSH_HOME` defaults to `~/.dsh`). Keep all existing keys; do not overwrite the file. Then re-run the command. For another profile, replace `web` in both the command and the path:
90
+ If installing unreleased commits from GitHub `main` (`dsh plugin --profile web add github:meka-im/google-trends-for-agent`), the first run usually prints a key and fails; append the printed key as an `allowBuilds:` map with `: true` (not an `onlyBuiltDependencies:` list) to `$DSH_HOME/profiles/web/pnpm-workspace.yaml` (keeping existing keys) and re-run:
86
91
 
87
92
  ```yaml
88
93
  allowBuilds:
89
94
  "google-trends-for-agent@https://codeload.github.com/meka-im/google-trends-for-agent/tar.gz/<commit>": true
90
95
  ```
91
96
 
92
- 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.
93
-
94
97
  The plugin provides four native in-process tools (`trends_ask`, `trends_snapshot`, `trends_compare`, `trends_now`) and a `gtfa` skill. By default it does not start an MCP server, run the `gtfa` CLI, or call the Actor. 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. Egress defaults to `local`; `actor-public` relays through the public `meka.im/google-trends-for-agent` Actor, and `actor-own` relays through a deployment in your own account (deploy or pick it on the same page). Both Actor routes run on demand with the residential proxy inside the Actor.
95
98
 
96
99
  When the dsh Host provides its credentials service, both Actor routes use Apify device OAuth first. Click **Sign in with Apify**; the page displays Apify's official authorization link and user code. The user confirms on Apify's official page, then the plugin stores the token through `ctx.credentials`; login needs no Save. Pending login checks Host status every 2 seconds, and the Host follows Apify's polling interval including `slow_down`. Closing the page pauses polling, reopening resumes, and expiry requires starting again. Apify's current device OAuth scope is only `full_api_access`: tell the user this grants full Apify API access, not access limited to this Actor or tool.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.44 — 2026-11-26
4
+
5
+ ### dsh UI polish, local-failure Actor CTA & 1-click settings
6
+ - Keep the plugin details README separated from the settings form (`plugins.row.config`) while adding a 1-click in-panel Settings view (`renderSettings` with a back button) accessible from **Plugin settings**, the topbar route pill, and failure CTAs (`src/client/index.tsx`, `src/client/dashboard.tsx`, docs aligned).
7
+ - Restore the blue gradient `$5` monthly free-credit card with trend-curve artwork in Apify Actor settings (`src/client/theme.ts`, `src/client/index.tsx`).
8
+ - Add a compact **Local direct request** failure alert banner (`RATE_LIMITED`, `BLOCKED`, and generic local failures) with a 1-click **Switch Actor** CTA that automatically hides once current egress is switched away from `local`, plus a dedicated Actor auth/config setup banner (`INVALID_INPUT`) with a **Go to settings** CTA (`src/client/dashboard.tsx`, `src/client/dashboard-locale.ts`, `src/client/dashboard-theme.ts`).
9
+ - Add the MEKA baseline dataset source link (`https://meka.im/datasets/google-trends-anchors`) to calibration anchor cards, and immediately clear prior query results and reset `metric` to `interest` with a 2-column loading skeleton on new query submission (`src/client/dashboard-state.ts`, `src/client/dashboard.tsx`).
10
+ - Polish failed-query and dark-mode details: remove the `.gd-error` `!important` margin override, keep **Query details** labels single-line with raw error tucked inside expanded details, scope ChoicePicker overrides to dashboard toolbars, and update `GTFA_UPGRADE_COMMAND` to `dsh plugin --profile web add google-trends-for-agent@latest` (`src/client/dashboard-theme.ts`, `src/version-check.ts`).
11
+
12
+ ## 0.2.43 — 2026-11-26
13
+
14
+ ### dsh install walkthrough & docs alignment
15
+ - Add animated bilingual DeepSeek Harness (macOS) installation walkthrough SVGs (`docs/assets/demo-dsh-install-en.svg`, `docs/assets/demo-dsh-install-zh.svg`) embedded in `README.md`, `README.zh-CN.md`, and `docs/clients/dsh.md`.
16
+ - Simplify primary dsh install docs (`README.md`, `README.zh-CN.md`, `AGENTS.md`, `docs/reference.md`, `docs/clients/dsh.md`) to direct npm package installation (`google-trends-for-agent`), keeping GitHub `main` + `allowBuilds` as an optional development alternative.
17
+
3
18
  ## 0.2.42 — 2026-11-26
4
19
 
5
20
  ### npm release & documentation alignment
package/README.md CHANGED
@@ -151,26 +151,41 @@ If `npx …` exits non-zero with empty stdout/stderr, the npm package fetch fail
151
151
 
152
152
  ## dsh plugin
153
153
 
154
- Prerequisites: dsh requires **Node >=24.9** and **pnpm >=10** on PATH (`allowBuilds` needs pnpm 10; tested with 10.34.6). Install dsh with `npm i -g @deepseek-ai/dsh` and pnpm with `npm i -g pnpm@10`. The gtfa CLI/MCP alone require Node 20+ (`engines.node: >=20`). Without pnpm on PATH, plugin installation fails with `spawn pnpm ENOENT` / `pnpm was not found`.
154
+ <p align="center">
155
+ <img src="docs/assets/demo-dsh-install-en.svg" alt="Animated walkthrough of installing google-trends-for-agent in DeepSeek Harness for macOS" width="800">
156
+ </p>
157
+ <p align="center"><sub>DeepSeek Harness (macOS): open <b>Plugins → + Install plugin</b>, enter <code>google-trends-for-agent</code> directly (no npmjs.com URL), then restart to load the backend.</sub></p>
158
+
159
+ - **DeepSeek Harness Desktop (macOS):** open **Plugins → + Install plugin**, enter the npm package name **`google-trends-for-agent`** directly (do not paste a full `npmjs.com` web URL), and install with one click—no manual `allowBuilds` editing required.
160
+ - **dsh CLI (`dsh web`):** requires **Node >=24.9** and **pnpm >=10** on `PATH` (install dsh with `npm i -g @deepseek-ai/dsh` and pnpm with `npm i -g pnpm@10`; CLI/MCP alone only require Node 20+):
155
161
 
156
162
  ```sh
157
- dsh plugin --profile web add github:meka-im/google-trends-for-agent
163
+ dsh plugin --profile web add google-trends-for-agent
158
164
  ```
159
165
 
160
166
  After installing or upgrading the plugin, fully quit and reopen dsh to load its backend. Saving plugin settings applies them immediately.
161
167
 
162
- The first run usually prints a key and fails; a cached build in the pnpm store may pass immediately. Append the block below, using the exact key pnpm prints (ending in the commit hash), to the YAML dsh already generated at `$DSH_HOME/profiles/web/pnpm-workspace.yaml` (`DSH_HOME` defaults to `~/.dsh`). Keep all existing keys; do not overwrite the file. Then re-run the command. For another profile, replace `web` in both the command and the path:
168
+ <details>
169
+ <summary>Alternative: installing unreleased commits from GitHub <code>main</code></summary>
170
+
171
+ To test unreleased commits from `main` instead of the published npm package, install from GitHub:
172
+
173
+ ```sh
174
+ dsh plugin --profile web add github:meka-im/google-trends-for-agent
175
+ ```
176
+
177
+ The first run usually prints a build-approval key and fails (unless cached in the pnpm store). Append the printed key (ending in the commit hash) as an `allowBuilds:` map entry to `$DSH_HOME/profiles/web/pnpm-workspace.yaml` (`DSH_HOME` defaults to `~/.dsh`), keeping all existing keys, then re-run:
163
178
 
164
179
  ```yaml
165
180
  allowBuilds:
166
181
  "google-trends-for-agent@https://codeload.github.com/meka-im/google-trends-for-agent/tar.gz/<commit>": true
167
182
  ```
168
183
 
169
- pnpm's box may wrap the key across lines — copy it from this template, only the commit hash changes.
184
+ Use `: true` under `allowBuilds:` rather than an `onlyBuiltDependencies:` list; the key changes whenever `main` advances.
170
185
 
171
- 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.
186
+ </details>
172
187
 
173
- The plugin is enabled by default after install and provides four native tools plus a `gtfa` skill. 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. Choose **Local (this machine)**, **Public Actor**, or **My own Actor** under **Egress**, then click **Save**; login itself needs no Save. When the Host provides its credentials service, both Actor routes offer **Sign in with Apify**: the page shows Apify's official authorization link and user code, checks pending status every 2 seconds while honoring Apify's polling interval (including `slow_down`), pauses when closed, resumes when reopened, and restarts an expired attempt. Apify's only current device OAuth scope is `full_api_access`—full Apify API access, not access limited to this Actor or tool.
188
+ The plugin is enabled by default after install and provides four native tools plus a `gtfa` skill. Click **Plugin settings** (or the route pill) inside the **Google Trends** sidebar panel—or open **Plugins → Google Trends → Components → Google Trends / gtfa**—to open the standalone settings page. Choose **Local (this machine)**, **Public Actor**, or **My own Actor** under **Egress**, then click **Save**; login itself needs no Save. When the Host provides its credentials service, both Actor routes offer **Sign in with Apify**: the page shows Apify's official authorization link and user code, checks pending status every 2 seconds while honoring Apify's polling interval (including `slow_down`), pauses when closed, resumes when reopened, and restarts an expired attempt. Apify's only current device OAuth scope is `full_api_access`—full Apify API access, not access limited to this Actor or tool.
174
189
 
175
190
  The settings page uses three egress cards, with OAuth status and usage directly below. Expand **Usage details** for billing-cycle and proxy details. **Advanced** groups **Calibration baselines**, **Manual Token** (Actor routes only), and **Files and charts**. **Save** and **Discard** float above the page while scrolling; **Test connection** checks the current connection, including unsaved Actor or manual-token changes, without saving them. Use the account menu beside the connection check to sign out. The layout follows the Host's light/dark theme and stacks on narrow screens.
176
191
 
package/README.zh-CN.md CHANGED
@@ -149,26 +149,41 @@ curl -I https://trends.google.com
149
149
 
150
150
  ## dsh 插件
151
151
 
152
- 前置条件:dsh 需要 **Node >=24.9**,并确保 **pnpm >=10** 在 PATH 中(`allowBuilds` 需要 pnpm 10;测试版本为 10.34.6)。用 `npm i -g @deepseek-ai/dsh` 安装 dsh,用 `npm i -g pnpm@10` 安装 pnpm。仅使用 gtfa CLI/MCP 时仍只需 Node 20+(`engines.node: >=20`)。PATH 中没有 pnpm 时,插件安装会报 `spawn pnpm ENOENT` / `pnpm was not found`。
152
+ <p align="center">
153
+ <img src="docs/assets/demo-dsh-install-zh.svg" alt="DeepSeek Harness Mac 客户端安装 google-trends-for-agent 插件动画演示" width="800">
154
+ </p>
155
+ <p align="center"><sub>DeepSeek Harness (Mac):打开<b>插件 → + 安装插件</b>,直接输入 npm 包名 <code>google-trends-for-agent</code>(不要填 npmjs.com 网址),安装完成后重启客户端即可加载后端。</sub></p>
156
+
157
+ - **DeepSeek Harness Mac 桌面端**:打开**插件 → + 安装插件**,在输入框中直接填写 npm 包名 **`google-trends-for-agent`**(不要粘贴 `npmjs.com/package/...` 网页链接)一键安装,无需手动修改 `allowBuilds`。
158
+ - **dsh CLI(`dsh web`)**:需要 **Node >=24.9** 且 **pnpm >=10** 在 `PATH` 中(`npm i -g @deepseek-ai/dsh pnpm@10`;仅用 `gtfa` CLI/MCP 时只需 Node 20+):
153
159
 
154
160
  ```sh
155
- dsh plugin --profile web add github:meka-im/google-trends-for-agent
161
+ dsh plugin --profile web add google-trends-for-agent
156
162
  ```
157
163
 
158
164
  安装或升级插件后,请完全退出并重新打开 dsh,以加载插件后端。插件设置保存后立即生效。
159
165
 
160
- 首次运行通常会打印 key 并失败;pnpm store 已缓存构建时可能直接成功。将下方代码块以 pnpm 打印的完整 key(以 commit hash 结尾)**追加**到 dsh 已生成的 `$DSH_HOME/profiles/web/pnpm-workspace.yaml`(`DSH_HOME` 默认为 `~/.dsh`),保留已有键,不要覆盖文件,然后重跑。使用其他 profile 时,同时替换命令和路径中的 `web`:
166
+ <details>
167
+ <summary>备选:从 GitHub <code>main</code> 安装未发包源码</summary>
168
+
169
+ 如需直接测试 `main` 分支最新未发版提交,可改为从 GitHub 安装:
170
+
171
+ ```sh
172
+ dsh plugin --profile web add github:meka-im/google-trends-for-agent
173
+ ```
174
+
175
+ 首次运行通常会打印构建批准 key 并失败(若 pnpm store 已缓存可能直接成功)。将 pnpm 打印的完整 key(以 commit hash 结尾)以 `allowBuilds:` map 格式追加到 `$DSH_HOME/profiles/web/pnpm-workspace.yaml`(`DSH_HOME` 默认为 `~/.dsh`),保留已有键并重跑命令:
161
176
 
162
177
  ```yaml
163
178
  allowBuilds:
164
179
  "google-trends-for-agent@https://codeload.github.com/meka-im/google-trends-for-agent/tar.gz/<commit>": true
165
180
  ```
166
181
 
167
- pnpm 的提示框可能把 key 折成多行,请从本模板复制,只需改 commit hash。
182
+ 请使用带 `: true` 的 `allowBuilds:` map(不要写成列表);`main` 前进后 key 会变化,更新后需重新添加。
168
183
 
169
- pnpm 的报错建议使用 `onlyBuiltDependencies:` 列表;dsh profile 应使用带 `: true` 的 `allowBuilds:` map(在 `allowBuilds` 下写列表会失败)。main 更新后 key 会变化,需要重新添加。
184
+ </details>
170
185
 
171
- 插件安装后默认启用,提供四个原生工具和 `gtfa` skill。在 dsh 0.2.2-rc.1 中,打开 **dsh web → Plugins → Google Trends** 已安装插件卡片,在详情页 **Components** 下点击 **Google Trends / gtfa** 行进入设置页。在 **Connection(连接方式)** 区块选择 **本机直连**、**公共 Actor** 或 **我自己的 Actor**,再点 **Save(保存)** 应用 egress;登录本身不需要 Save。Host 提供 credentials service 时,两条 Actor 路线都提供 **Sign in with Apify(登录 Apify)**:页面显示 Apify 官方授权链接和 user code;pending 时每 2 秒查询一次状态并遵守 Apify 的 polling interval(包括 `slow_down`),关闭页面暂停、重新打开继续,过期后重新发起。Apify 当前的 device OAuth scope 只有 `full_api_access`——这是完整 Apify API 访问权限,不是仅限本 Actor 或本工具的权限。
186
+ 插件安装后默认启用,提供四个原生工具和 `gtfa` skill。在侧边栏 **Google Trends** 面板右上角直接点击 **插件设置**(或连接路线标签)即可一步进入独立设置页;也可以通过 **插件 → Google Trends → 组件 → Google Trends / gtfa** 打开。在 **Connection(连接方式)** 区块选择 **本机直连**、**公共 Actor** 或 **我自己的 Actor**,再点 **Save(保存)** 应用 egress;登录本身不需要 Save。Host 提供 credentials service 时,两条 Actor 路线都提供 **Sign in with Apify(登录 Apify)**:页面显示 Apify 官方授权链接和 user code;pending 时每 2 秒查询一次状态并遵守 Apify 的 polling interval(包括 `slow_down`),关闭页面暂停、重新打开继续,过期后重新发起。Apify 当前的 device OAuth scope 只有 `full_api_access`——这是完整 Apify API 访问权限,不是仅限本 Actor 或本工具的权限。
172
187
 
173
188
  每次操作都会重新解析凭据:优先使用已存储的 OAuth session;只有在没有存储 session 时才使用已保存 config token,再回退到 `APIFY_TOKEN`。已存储的 session 若过期或损坏且无法 refresh,必须重新登录,不能静默回退或当作成功。OAuth 凭据不会进入浏览器可见状态,也不会进入模型可见的 tool input/output;Host 内部代码通过 credentials service 解析后调用 Apify。Host 没有该服务时,OAuth 不可用,但本机 egress、手动 token 和 `APIFY_TOKEN` 仍可使用。对 dsh device flow,当前 access token 是长效 token,不签发 refresh token;若 Apify 未来返回标准过期/刷新响应,插件可兼容处理。
174
189