Commit Graph

527 Commits

Author SHA1 Message Date
Endless Agent b262bb2090 feat(qa): 给 Assets 文档里面增加这个 App Icon resource 这个文件是给 dark 主题下用的 Longbridge App icon,使用场景如 GitHub avatar, ChatG
Generated by Endless task #35.

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-07-10 03:38:18 +00:00
Endless Agent a870276073 feat(dev): 给 Assets 文档里面增加这个 App Icon resource 这个文件是给 dark 主题下用的 Longbridge App icon,使用场景如 GitHub avatar, ChatG
Generated by Endless task #35.

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-07-10 03:34:48 +00:00
Endless 37d8312c2c docs: update ChatGPT entry from Apps to Plugins for Longbridge install (#1146)
🤖 Auto-generated by Endless task
[#34](https://endless.longbridge-inc.com/projects/developers/tasks/34).

Initiated by: huacnlee@longbridge-inc.com

- Updated installation instructions across EN, zh-CN, and zh-HK docs to
reflect that the ChatGPT entry point has changed from **Apps** to
**Plugins**
- Modified `mcp.md`, `qa/general.md`, and `skill/install/index.md` in
all three locales (9 files total)
- Ensures users can correctly locate and install the Longbridge plugin
within the ChatGPT interface

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-07-10 10:40:58 +08:00
Endless 98522cfadc docs(mcp): add note on ChatGPT MCP trading order restrictions (#1144)
🤖 Auto-generated by Endless task
[#33](https://endless.longbridge-inc.com/projects/developers/tasks/33).

Initiated by: huacnlee@longbridge-inc.com

- Added clarification in MCP documentation (EN, zh-CN, zh-HK) that the
MCP published on ChatGPT has special limitations
- Noted that trading/order placement functionality is excluded from the
ChatGPT-hosted MCP
- Explained that these restrictions are due to ChatGPT platform policy
rules
- Updated all three language variants of the MCP docs to keep content
consistent across locales

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-07-09 17:47:17 +08:00
liuyuhou-code aac040c7ce docs(trade): fix OrderTag enum value GTC to Gtc (#1142) 2026-07-09 10:31:34 +08:00
Jason Lee aff930cbe2 Add brand assets documentation page (#1141)
Summary
- Add localized /docs/assets pages listing Longbridge brand image
resources as Markdown/HTML for AI-readable access.
- Link the assets page from footer variants and add localized footer
labels.
- Allow breadcrumb suppression via frontmatter and copy assets markdown
routes after build.

Test Plan
- npx prettier -c scripts/copy-routes.ts
docs/.vitepress/theme/layouts/Layout.vue
docs/.vitepress/theme/style/index.css
docs/.vitepress/theme/components/AppFooter.vue
docs/.vitepress/theme/components/HomePage/Footer.vue
docs/.vitepress/theme/components/NewHomePage/Footer.vue
docs/en/docs/assets/index.md docs/zh-CN/docs/assets/index.md
docs/zh-HK/docs/assets/index.md docs/en/docs/assets/_category_.json
docs/zh-CN/docs/assets/_category_.json
docs/zh-HK/docs/assets/_category_.json
- npx tsc --noEmit -p docs/tsconfig.json
- git diff --check
- JSON parse check for locale files and assets category files

Note
- Did not run build because repository instructions prohibit AI sessions
from running build commands.

Co-authored-by: Codex <codex@openai.com>
2026-07-08 16:23:46 +08:00
Sunli 6066f1f93d docs(getting-started): use refresh_access_token_async in python-async tab 2026-07-08 11:17:52 +08:00
Sunli 1dc5c50960 docs(getting-started): add python-async tab to refresh_access_token section 2026-07-08 11:17:51 +08:00
Jason Lee 9a5804f3df docs: add ChatGPT app MCP guidance (#1138)
## Summary
- Add Longbridge ChatGPT App guidance across the home page, MCP docs,
Skill install docs, QA docs, and Longbridge Skill metadata.
- Update the Skill hero with a ChatGPT banner and third ChatGPT install
tab while keeping the generic Copy command flow intact.
- Replace the old ChatGPT Developer Mode flow with the official ChatGPT
Apps search, authorize, and @longbridge usage flow, including
screenshots.

## Test Plan
- git diff --check
- git diff --cached --check
- bun run build:release

Notes: build passes with the existing VitePress dynamic/static import
and chunk-size warnings.

---------

Co-authored-by: Codex <codex@openai.com>
2026-07-07 18:27:40 +08:00
Liu Kun 3de4d0a388 docs: clarify client_request_id optional behavior and idempotency bypass (#1135) 2026-07-06 15:13:23 +08:00
Liu Kun b1107f6edc docs: add client_request_id and idempotency support to order submit API (#1134)
- Add client_request_id parameter to prevent duplicate order submissions
- Document 10-minute server-side cache duration
- Include idempotency explanation and examples in all three language
versions (en, zh-CN, zh-HK)
- Update parameter tables and add new Idempotency/冪等性 sections

Co-authored-by: kun.liu <kun.liu@longbridge-inc.com>
2026-07-06 14:34:02 +08:00
Endless e72c82f3cf docs: add missing subscribe_candlesticks section to quote subscription docs (#1131)
- Added `subscribe_candlesticks` function documentation page in English,
Simplified Chinese, and Traditional Chinese locales
- Each new page provides ~100 lines of content covering usage,
parameters, and examples for candlestick subscription
- Updated `quote-permissions.yaml` with 17 new lines to register the
candlestick subscription permission/route entry
- Addresses user-reported gap where `subscribe_candlesticks` was absent
from the market data subscription chapter on open.longbridge.com

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-07-03 17:37:05 +08:00
拉罐 0fc8438ed8 Feat/seo link (#1128)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 11:35:51 +08:00
拉罐 9175bc792a feat(nav): replace support-widget with Helora chat agent (#1126)
- AppNav 接入 Helora SDK:whale app 内嵌 webview 与 cn 站点跳过,其余环境(含本地
dev、线上正式)正常 boot;带 guest、configKey、source、headerActions
- SDK 由 VitePress head 静态注入到所有页面,AppNav 只负责等就绪 → boot → 订阅事件
- 主题切换通过 setThemeMode 热更新;语言切换走整页刷新,下次 mount 直接以新 locale boot
- 订阅 headerAction 事件接 "Submit Issue" 入口
- Drop UserAvatar/index.vue 里的 support-widget 残留 loader
- Add window.Helora 全局类型与 helora.submitIssue 三语 i18n key
- Seed .vscode cSpell 项目专用术语

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-30 20:03:24 +08:00
Endless 61026ffe0a docs: update trading FAQ for US options pre-market trading support (#1124)
- Added Q&A clarifying that pre-market trading for US stock options is
not currently supported
- Noted that pre-market options and multi-leg options are planned
together for a future release
- Updated FAQ documents across all three locales: `en`, `zh-CN`, and
`zh-HK`
- Minor restructuring of existing content in `trade.md` files (90-line
diffs reflect reformatting alongside new entry)

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-30 16:35:56 +08:00
Endless 5cc6eb52d8 fix: QuotePermission badge label Basic → Free (#1121)
## 背景

PR #1120(Nasdaq Basic → US LV1 全量替换)合并并部署后发现:文档中所有 `<QuotePermission>`
组件的 badge 仍显示 **"Basic" / "基础行情"**,而非预期的 "Free"。

根因:`quote-permissions.yaml` 的 `levels.basic.label` 字段控制 badge 文字,PR
#1120 更新了各命令的 `description`,但遗漏了这个 `label` 字段。

## 修改

| 文件 | 字段 | Before | After |
|---|---|---|---|
| `quote-permissions.yaml` | `levels.basic.label.en` | `Basic` | `Free`
|
| `quote-permissions.yaml` | `levels.basic.label.zh-CN` | `基础行情` | `免费`
|
| `quote-permissions.yaml` | `levels.basic.label.zh-HK` | `基礎行情` | `免費`
|

## 影响范围

所有使用 `<QuotePermission command="..." />` 或 `<QuotePermission
level="basic" />` 的文档页面(CLI market-data、quote subscribe、watchlist
等),badge 从 "Basic" 变为 "Free",与 Pricing 页面 US LV1 "Free" 标签一致。

## 验证

```bash
bun run dev
# 访问任意 CLI 行情命令文档,如 /docs/cli/market-data/quote
# 确认 QuotePermission badge 显示 "Free" 而非 "Basic"
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-06-29 15:33:46 +08:00
Endless ddebc90324 fix(docs): Aligment Markdown, Edit link in doc footer. (#1113)
- 修复文档页脚(VPDocFooter)中 Markdown 与 Edit 两个按钮高度不一致、未对齐的样式问题
- 调整 `docs/.vitepress/theme/style/index.css` 中相关样式以统一按钮垂直对齐
- 更新 `docs/.vitepress/config.mts` 配置,优化页脚区域布局
- 清理多语言文档(zh-CN、zh-HK、en)中已废弃的宏观数据及更新日志等冗余页面
- 同步更新子模块引用(`longbridge-terminal`、`openapi`、`openapi-go`)至最新版本

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-29 13:44:57 +08:00
Endless 58b5134b7f feat: replace Nasdaq Basic with US LV1 as default free quote plan (#1120)
- Updated `Pricing.vue` to remove Nasdaq Basic and reflect US LV1 as the
free tier included with all new registrations
- Replaced all references to "Nasdaq Basic" with "US LV1" across EN,
zh-CN, and zh-HK documentation (getting-started, quote overview,
candlestick, history-candlestick, quote, and QA pages)
- Updated `quote-permissions.yaml` to align permission rules with the
new US LV1 default entitlement
- Changes span 20 files across 3 locales to ensure consistent messaging
site-wide

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-29 13:41:26 +08:00
Endless 205dccb5e3 更新 App icon 为新 SVG URL (#1119)
🤖 Auto-generated by Endless task [#1](/projects/developers/tasks/1).

Initiated by: Huacnlee Li Huashun

## 背景

将 VitePress head 中的 App icon 链接(apple-touch-icon 及两个 icon 类型链接)统一替换为新的
CDN SVG 地址,替换旧 `lbkrs.com` PNG 图标资源。

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/config.mts` | 更新第 156-158 行三个 icon 链接的 `href` 为新 SVG
URL |

## 关键决策

- 仅替换 `apple-touch-icon` 和 `icon` 类型链接,`shortcut icon`(指向
`wbrks.com`)不属于 App icon,保持不变
- 只改 `href`,未改 `type` / `sizes` 等其他属性,改动最小化

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2026-06-29 13:30:25 +08:00
Endless a58b6cd9dd feat(meta): add PWA icon and site icon meta tags to VitePress config (#1118)
🤖 Auto-generated by Endless task
[#28](https://endless.longbridge-inc.com/projects/developers/tasks/28).

Initiated by: Huacnlee Li Huashun

## 背景

为页面的 Meta 信息里面增加这个 URL 作为 PWA 安装 app 的 icon,以便于后续我查看网页源代码的时候能找到这个
URL,也确保它会被其他分享的地方有应用作为网站 Icon http

## 修改

| 文件 | 改动 |
|---|---|
| `docs/.vitepress/config.mts` | +3 −0 |

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-29 10:22:28 +08:00
Hogan eaa4fa0cd4 docs: add macrodata SDK + CLI + MCP docs (SDK v4.3.3, CLI v0.23.4) (#1085)
## Summary

新增宏观经济数据相关文档,三语言(en / zh-CN / zh-HK)同步。

### SDK docs(`docs/{lang}/docs/fundamental/fundamental/`)
- 新增 `macroeconomic-indicators.md` — `macroeconomic_indicators`
方法(参数:country、keyword、offset、limit)
- 新增 `macroeconomic.md` — `macroeconomic` 方法
- Schema 字段类型修正:`name`、`describe`、`unit`、`unit_prefix` 已改为 `string`(v2
breaking change)
- MacroeconomicCountry value 改为缩写:HK / CN / US / EU / JP / SG
- JSON 示例仅保留 v2 实际返回字段

### CLI docs(`docs/{lang}/docs/cli/fundamentals/`)
- 新增 `macrodata.md` — `longbridge macrodata` 命令
-
选项:`--country`、`--keyword`、`--lang`、`--start`/`--end`、`--limit`、`--page`、`--format`
  - JSON 响应结构说明(含 `page`、`limit`、`has_more`)

### MCP docs
- `mcp.md` 三语言 capabilities 表格追加宏观经济指标、补充实时行情链接

### Changelog & Release Notes
- `changelog.md` 追加 2026-06-25 条目(SDK v4.3.3 + CLI v0.23.4)
- `cli/release-notes.md` 追加 v0.23.4 条目

## Related PRs

- CLI: longbridge/longbridge-terminal#239
- SDK: longbridge/openapi#540 (merged), #543 (merged, v2 endpoints)
- MCP: longbridge/longbridge-mcp#79
- Go SDK: longbridge/openapi-go#100 (merged)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-26 17:47:02 +08:00
Endless 302b7e8eac 给 MCP 的安装指引里面增加 [Manus](https://manus.im) 的添加流程指引,用户可以进入 "Plugins" 窗口右侧区域有个 "Create" 按钮,弹出的菜单中选择 "Im (#1112) 2026-06-26 09:37:12 +08:00
拉罐 201b4aafb6 docs: add SEO cross-domain internal links to longbridge.com (#1110)
按 SEO 团队要求,在 developers 页面对已有词语包链接到 longbridge.com 对应页面, 覆盖 Skill /
Pricing / MCP / CLI / LLM / Topics / Getting Started 共 14 处锚点, 三语版本同步。

- /screener: screen stocks(Skill hero)
- /en/news: Longbridge community(Skill cases)、Latest news articles(Skill
capability)
- /markets: market data(Pricing hero)、Longbridge market data(MCP 首段 +
表格)、real-time market data(CLI、LLM)、live market data(Skill demo,已存在)
- /hk/download: Longbridge account(MCP Prerequisites +
Security、Topics)、Download App(Getting Started)
- /en/ai: AI agents(CLI JSON Output)

Skill.vue / Pricing.vue 模板将 hero.desc / cases.desc / capItems / skill
card desc / get-started card desc 从纯文本绑定改为 v-html,使内嵌 <a> 渲染生效。
2026-06-25 14:39:54 +08:00
拉罐 4b6c05690b Sync app theme from UA and fix VPLocalNav on scroll (#1106)
- Whale app: read `lbtheme/<mode>` from UA on mount and override
`isDark` before the first sync, so initial render matches the app
shell's theme.
- VPLocalNav: pin to fixed position below AppNav and only reveal after
scrolling past `--vp-nav-height`; previously it sat at `top: 0` and was
occluded by AppNav, or scrolled with content.
2026-06-22 19:51:19 +08:00
拉罐 1b017f57d5 Adapt layout for whale app environment (#1105)
Detect whale app via UA `lbcommitid`, then hide AppNav, VPLocalNav,
Footer, VPDocFooter; reset VPDoc.has-sidebar margin-top to 0; skip
loading the support-widget (not yet adapted for app). Also let
VPDocFooter row (Markdown / Edit / Last Updated) wrap naturally instead
of forcing space-between.
2026-06-22 19:15:17 +08:00
hold-baby 7571ffcc04 Rewrite mcp.longbridge.com to .cn for CN region build (#1102)
## Merge Verdict
**[APPROVE]** — Small, mechanical extension of the existing region
rewrite to cover a third root domain (`mcp.longbridge.com`).
> 3 files · +8 / -1 · `region.config.ts` `docs/.vitepress/`

---
## Summary
- `region.config.ts`: `RegionConfig` interface gains a new required
field `mcpHostname`; CN region sets it to `https://mcp.longbridge.cn`.
- `docs/.vitepress/region-utils.ts`: `buildRegionUrlReplacements()`
emits a third pair of rules (URL + bare-text) for the MCP hostname —
same shape as the existing `siteHostname` / `apiBaseUrl` blocks.
- `docs/.vitepress/config.mts`: `MCP_TOOLS_URL` (used by the
`fetch-mcp-tools` build-time plugin) now resolves to
`${regionCfg?.mcpHostname ||
'https://mcp.longbridge.com'}/mcp/tools.json` — CN builds source the
tool catalogue from the regional endpoint instead of `.com`.

---
## Risk Analysis
| Risk | Level | Mitigation |
|------|-------|-----------|
| `mcp.longbridge.cn/mcp/tools.json` endpoint not yet live | 🟡 |
Reviewer to confirm before merge — `fetch-mcp-tools` will hard-fail the
CN build if the URL 404s |
| Global build (`build:release`) regression | ✅ | Verified: with no
`VITE_REGION`, `regionCfg` is undefined → helper returns `[]` for MCP
rules; `MCP_TOOLS_URL` falls back to `mcp.longbridge.com`; `mcp.html`
keeps 7 `.com` + 1 `.cn` (original "China mainland" section) identical
to source |
| Order-dependent rewriting between `mcp` / `open` / `openapi` | ✅ | All
three hostnames are mutually non-substring (different 5th char or
different prefix), so the three protocol-prefixed + three bare-text
rules are independent regardless of order |
| Mainland users on global `.cn` site getting wrong fallback | ✅ | This
PR only adds a CN-only rule; nothing about the global path changes |

---
## Design Decisions
- **Add `mcpHostname` to `RegionConfig` rather than hardcoding inside
the helper** — keeps the regional URL list in one declarative file
(`region.config.ts`) instead of scattering string constants across
`region-utils.ts`. Matches the pattern already set by `siteHostname` /
`apiBaseUrl`.
- **Switch the build-time fetch source, not just the displayed URL** —
chosen so the CN build's `mcp-tools.json` actually reflects the
catalogue served by the CN MCP endpoint (potentially region-specific
tools), instead of CN docs displaying `.cn` while embedded data was
scraped from `.com`.
- **Field is required, not optional** — every region must declare its
MCP hostname explicitly; prevents silent fallback to `.com` when a new
region is added.

---
## Code Notes
1. **[Needs review]** Confirm `https://mcp.longbridge.cn/mcp/tools.json`
is live and returns the same JSON shape as the global endpoint before
merge. If not yet deployed, the CN build will fail at `fetch-mcp-tools`
`buildStart` with an HTTP error.

---
## Verification
- ✅ `bun run build:cn` succeeds; `rg -l
'(open|openapi|mcp)\.longbridge\.com' docs/.vitepress/dist` → zero
residual `.com` across HTML / MD / JS / install scripts /
`mcp-tools.json`.
- ✅ `bun run build:release` succeeds; `dist/docs/mcp.md` per-file domain
distribution (1× `mcp.longbridge.cn` + 7× `mcp.longbridge.com`) matches
source 1:1.
- ✅ Source `install.ps1` is byte-identical to global build output (no
accidental rewrite).

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-18 13:31:57 +08:00
hold-baby b0f5dae7de Switch terminal install scripts to assets.lbkrs.com CDN (#1101)
## Merge Verdict
**[APPROVE]** — Mechanical URL swap from `open.longbridge.com` to
`assets.lbkrs.com` for terminal release lookup + download.
> 2 files · +4 / -4 · `docs/public/longbridge-terminal/`

---
## Summary
- `install` (POSIX) and `install.ps1` (PowerShell) both switched from
`https://open.longbridge.com/...` to
`https://assets.lbkrs.com/github/release/longbridge-terminal/...` for
the latest-version probe and the binary tarball/zip download.
- Path layout also realigned: previously `/{repo}/releases/latest` with
`repo=longbridge/longbridge-terminal`; now
`/github/release/longbridge-terminal/latest` — a fixed path no longer
parameterized by `$repo`.
- `$repo` variable is still declared in `install` but no longer used for
URL construction (only referenced in code comments / future use); kept
to minimize diff.

---
## Risk Analysis
| Risk | Level | Mitigation |
|------|-------|-----------|
| `assets.lbkrs.com/github/release/longbridge-terminal/latest` endpoint
not yet live | 🟡 | Reviewer to confirm the new CDN endpoint is published
before merging — script will fail at `get_latest_release` if the URL
404s |
| Existing users who already ran the old script | ✅ | They have
`longbridge` on PATH; this PR only affects new installs / reinstalls |
| Region build interaction | ✅ | The CN region rewrite plugin (added in
#1100) only rewrites `open.longbridge.com` / `openapi.longbridge.com`;
`assets.lbkrs.com` is intentionally untouched and CN builds will keep
the same CDN URL |
| `$repo` variable now unused | 🟢 | Cosmetic only — script still runs;
removing it is a follow-up cleanup if desired |

---
## Design Decisions
- **Use a fixed path instead of `$repo`-templated**: The new endpoint is
a dedicated CDN slot (`/github/release/longbridge-terminal/`) rather
than a GitHub-mirror-style route, so the `$repo` indirection is no
longer meaningful. Switching to a flat path matches the actual CDN
layout.
- **Source file stays `assets.lbkrs.com` for all regions**: Unlike
`open.longbridge.com`, the assets CDN is not region-split, so no region
rewrite is needed; the file is identical for global and CN builds.

---
## Code Notes
1. **[Needs review]** Endpoint readiness on
`assets.lbkrs.com/github/release/longbridge-terminal/latest`
Reviewer should verify the CDN endpoint serves the latest version tag
(and the per-version tarballs/zips) before merging; otherwise new
installations will fail at the first `curl --silent` call.
2. **[Info]** `$repo='longbridge/longbridge-terminal'` left declared but
unused in `install` (line 5)
Not a bug — script still runs cleanly. Can be removed in a follow-up if
the team prefers a tighter diff for future edits.
— Author note: intentionally kept for now; will clean up in a follow-up.

---
## Verification
- ✅ Both files contain only the URL constants — no logic changes, no
shell-substitution edge cases introduced.
- 📋 Manual check after merge: `curl -sSL
https://assets.lbkrs.com/github/release/longbridge-terminal/install |
sh` on Linux/macOS, and `iwr
https://assets.lbkrs.com/longbridge/longbridge-terminal/install.ps1 |
iex` on Windows.
- 📋 Confirm the CDN endpoint
`assets.lbkrs.com/github/release/longbridge-terminal/latest` returns a
version string with deploy ops.

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-18 12:38:32 +08:00
hold-baby b952761fa6 Complete .com→.cn hostname rewrite for CN region build (#1100)
## Merge Verdict
**[APPROVE]** — Region URL rewriting is now complete across every
artifact channel; global build verified untouched.
> 6 files · +73 / -26 · `docs/.vitepress` `scripts/` `package.json`

---
## Summary
- Extract a shared `buildRegionUrlReplacements()` in `region-utils.ts`
that emits **four** rules per non-default hostname (protocol-prefixed +
bare-text for both `siteHostname` and `apiBaseUrl`), and route the four
pre-existing rewrite sites (`region-filter.ts`, `transformHtml`,
`buildEnd install`, plus the new ones) through it.
- Add a new Vite `region-source-url-rewrite` plugin (`enforce: 'pre'`)
that rewrites hardcoded hostnames inside `.vue/.ts/.json/.yaml` source
modules — this is the only channel that reaches Vite-compiled JS bundles
(install command strings in Vue components, `mcp-tools.json` connect
links, `openapi.yaml` error-message text).
- Bring `.md` copies + `llms.txt` into region rewriting:
`normalize_md.ts` (the real writer of `dist/**/*.md`) and
`generate-llms.ts` (the static `llms-intro.md` injection point) now
share the same helper.
- Fix root-cause env-leak: `build:cn` now also passes `VITE_REGION=cn`
to the `bun run build:llms` segment — previously `cross-env` only scoped
to the `vitepress build` process, so `normalize_md`/`generate-llms`
never knew it was a CN build and silently produced `.com` artifacts.

---
## Risk Analysis
| Risk | Level | Mitigation |
|------|-------|-----------|
| Global build (`build:release`) accidentally rewritten | ✅ | Shared
helper returns `[]` when `VITE_REGION` is unset → every call site is a
no-op. Verified: `dist/longbridge-terminal/install.ps1` is
byte-identical to source; `mcp.html` keeps all 9 `.com`; `llms-full.txt`
keeps all 112 `open.longbridge.com`. |
| Bare-rule replacement double-matches | ✅ | `open.longbridge.com` is
**not** a substring of `openapi.longbridge.com` (5th char `.` vs `a`),
so the four rules are mutually independent regardless of order. |
| Vite `transform` runs on every module — performance hit | 🟢 |
`buildRegionUrlReplacements()` is lightweight (one env read + small
array build). On global builds it short-circuits via
`replacements.length === 0`. |
| `enforce: 'pre'` ordering vs `yaml-transform` | ✅ | `'pre'` plugins
run before normal plugins, so this transform sees raw YAML text and
rewrites it before `yaml-transform` JSON-stringifies it. |
| Hardcoded global hostnames in helper | 🟡 | Helper compares against the
literal `'https://open.longbridge.com'` /
`'https://openapi.longbridge.com'`. If the global domain ever changes,
this file plus `region.config.ts` must be updated together. Same
constraint already existed before this PR. |

---
## Design Decisions
- **Centralize rules in `region-utils.ts`** instead of inlining at four
call sites — four sites already drifted (HTML had two rules but markdown
had only the URL form before the previous PR). One source of truth
prevents future drift.
- **Pre-stage Vite transform** rather than a post-build dist scan —
keeps source maps intact and lets the rewrite participate in dependency
invalidation. It also naturally covers `openapi.yaml` (huge but fine —
string `split/join` is O(n) and only runs once per module per build).
- **Bare-hostname rules alongside URL rules** — covers
`[open.longbridge.com/connect](https://...)` markdown patterns where
only the link target gets matched by URL rules; the display text needs
the bare-host rule.
- **Source `install` / `install.ps1` keep `.com`** — global build's
`buildEnd` already had a rewrite pass; making source `.com`-default lets
the existing rewrite mechanism do the work and avoids two
source-of-truth files.

---
## Code Notes
1. **[Info]** `region-utils.ts:25` comment "first so bare rules don't
double-match"
In practice both orderings are correct because after either rule runs
the other one's "from" string no longer exists in the result. The note
is defensive rather than load-bearing.
   — Author note: deferred to next iteration.
2. **[Info]** `config.mts` Vite transform hook calls
`buildRegionUrlReplacements()` per module
The helper is cheap but is invoked once per source module on every
build. Could be hoisted to the closure top if profiling ever flags it;
not worth the structural change today.
   — Author note: deferred to next iteration.
3. **[Info]** `package.json` build:cn duplicates `cross-env
VITE_REGION=cn` across two segments
Maintainable but easy to forget if a third stage is added later. Could
be solved with `cross-env-shell` wrapping the whole chain, but that's a
separate cleanup.
   — Author note: deferred to next iteration.
4. **[Needs review]** Vite `transform` regex includes `.yaml`/`.yml`
This is intentional — `openapi.yaml` ships hardcoded
`https://open.longbridge.com/sdk` and error-message URLs that must be
rewritten for CN. Reviewer should confirm there's no other YAML in the
dependency graph whose `.com` strings must be preserved as global
references. None observed in the current tree.

---
## Verification
- ✅ `bun run build:cn` succeeds; `rg -l
'(open|openapi)\.longbridge\.com' docs/.vitepress/dist` → **zero
residual `.com`** across HTML/MD/JS/scripts.
- ✅ `bun run build:release` succeeds; `install.ps1` and `install` are
byte-identical to source; `mcp.html` keeps 9× `.com`; `llms-full.txt`
keeps 112× `open.longbridge.com`; CN endpoint mentions inside docs
(`getting-started.md` etc.) are preserved as intended.
- ✅ `openapi-quote.longbridge.cn` / `openapi-trade.longbridge.cn` counts
in `getting-started.html` match source 1:1 (no over-rewrite).
- 📋 Reviewer to confirm: CN site (`open.longbridge.cn`) renders `mcp.md`
/ `skill/install` pages with the new URLs after deploy.

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-18 11:37:13 +08:00
hold-baby 406b5fb595 修复 terminal 安装脚本版本查询域名 (#1097)
## 合入判断
**[APPROVE]** — 单行域名对齐修复,无显著风险
> 1 file · +1 / -1 · `docs/public/longbridge-terminal`

---
## 变更概要
- 将 `install` 脚本中 `get_latest_release` 拉取最新版本所用的域名由 `open.longbridge.cn`
改为 `open.longbridge.com`
- 修复后与同目录 `install.ps1`(Windows 安装脚本)以及本脚本下方的 `download_url` 域名完全一致

---
## 风险分析
| 风险点 | 等级 | 缓解措施 |
|--------|------|---------|
| 旧域名是否仍可用 | ✅ | 不影响:脚本已统一指向 `.com`,与下载 URL 一致 |
| 用户已缓存旧 install 脚本 | 🟢 | 用户每次通过 `curl ... \| sh` 重新拉取,无持久缓存 |

---
## 设计决策
- **域名统一**:脚本内 `get_latest_release` 与 `download_url` 统一为
`open.longbridge.com`,与 PowerShell 版本保持一致

---
## 代码关注点
无显著问题。

---
## 验证状态
📋 需验证:在 macOS/Linux 上执行 `curl -fsSL
https://open.longbridge.com/longbridge/longbridge-terminal/install | sh`
能成功拉取到最新版本号并完成下载

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-17 23:03:12 +08:00
Jason Lee 58b1ede27e docs: Release CLI v0.23.2 (#1096) 2026-06-16 21:24:34 +08:00
拉罐 1f870eacc9 fix(nav): preserve locale prefix on dashboard/log-out/connect links (#1095)
切换到 zh-CN / zh-HK 后点击头像菜单 Dashboard 等链接,会丢失语言前缀跳到 /dashboard。 改为
localePath() 包裹,使其跟随当前 locale 输出 /zh-CN/dashboard、/zh-HK/dashboard。

涉及位置:UserAvatar 下拉、AppNav 头像菜单与顶栏 Dashboard 按钮、HeroSection CTA。
2026-06-15 23:23:03 +08:00
Endless 23141067f4 longbridge/skills 项目新增了 codex plugin,请修改 skills 页面,在 claude code plugin 相关的地方增加 codex plugin 的安装脚本。当 (#1090)
🤖 Auto-generated by Endless task
[#24](https://endless.longbridge-inc.com/projects/developers/tasks/24).

Initiated by: Huacnlee Li Huashun

## Background

The `longbridge/skills` repository recently added a Codex plugin
manifest (`.codex-plugin/plugin.json`), enabling OpenAI Codex users to
install Longbridge Skills via the native Codex plugin system — analogous
to the existing Claude Code plugin path.

The developer documentation site already documented how to install
Skills via the Claude Code plugin, npx/bunx, ZIP download, and OpenClaw.
However, there was no corresponding install block for Codex users who
want to use the plugin system. This left Codex users without a clear,
official install method in the docs.

## Summary

- Problem solved: Codex users had no documented plugin install path in
the Skill Installation Guide
- What was done: Added a "Via Codex plugin" block immediately after the
existing "Via Claude Code plugin" block in Step 2 of the Skill
Installation Guide, across all three locales (en, zh-CN, zh-HK)
- Why this approach: Mirrors the existing Claude Code plugin block in
structure and placement; uses the exact commands from
`code/skills/docs/install.md` Path D (`codex plugin marketplace add
longbridge/skills` + `codex plugin add longbridge@longbridge-skills`)
- How to verify: Open any of the three locale install pages
(`/skill/install`, `/zh-CN/skill/install`, `/zh-HK/skill/install`) and
confirm the new "Via Codex plugin" block appears between the Claude Code
plugin block and the npx/bunx block in Step 2

## Changes

| File | Change |
|---|---|
| `docs/en/skill/install/index.md` | Added "Via Codex plugin" install
block after the Claude Code plugin block in Step 2 |
| `docs/zh-CN/skill/install/index.md` | Added Simplified Chinese "通过
Codex 插件安装" block after the Claude Code plugin block in Step 2 |
| `docs/zh-HK/skill/install/index.md` | Added Traditional Chinese "通過
Codex 插件安裝" block after the Claude Code plugin block in Step 2 |

## Key Decisions

Placed the Codex plugin block immediately after Claude Code plugin
(before npx/bunx) because both are plugin-system install methods and
belong together; npx/bunx is a more general path that applies to all
tools regardless of plugin support.

---------

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 20:52:07 +08:00
Jason Lee 30a7581a6a docs: update Codex MCP setup instructions (#1087)
## Summary
- Update Codex MCP setup instructions to use `codex mcp add longbridge
--url https://mcp.longbridge.com`.
- Preserve the existing UI setup flow as a Codex Desktop guide across
English, Simplified Chinese, and Traditional Chinese docs.

## Test Plan
- `git diff --check -- docs/en/docs/mcp.md docs/zh-CN/docs/mcp.md
docs/zh-HK/docs/mcp.md`
- `codex mcp add --help`
- `npx vitepress build docs --outDir
/private/tmp/developers-docs-pr-build` (fails on existing
`docs/superpowers/specs/2026-06-05-agent-auth-code-design.md:130` Vue
parse error)
2026-06-12 20:24:25 +08:00
Jason Lee e780aed0fb docs: 夜盘行情归入 Nasdaq Basic 免费 + 补充 ChatGPT 接入 MCP 说明 (#1086)
## 变更内容

本分支包含两部分文档调整:

### 1. 夜盘行情改为「Nasdaq Basic 免费包含」

Revert 了 #1081(该提交把 `Nasdaq Basic` 错误改成了 `US LV1`,并合并了定价对比矩阵、误删了多处
`<QuotePermission>` 标签),改为在保留 `Nasdaq Basic` 措辞的前提下重新表述夜盘:

- 夜盘行情统一标注为「已包含在 Nasdaq Basic 中,免费」,仅需设置
`LONGBRIDGE_ENABLE_OVERNIGHT=true` 即可开启,不再要求购买 LV1 行情卡
- `quote-permissions.yaml`:各命令美股描述去掉「夜盘需购买 LV1」,并移除 `store_cards`
中的夜盘购卡项
- 文档(三语同步):`getting-started` / `qa.quote` / `quote.overview` /
`candlestick` / `history-candlestick` / `quote` 字段说明
- `Pricing.vue`:对比矩阵 Overnight 行补勾 Nasdaq Basic 列(保留 US LV1 列)
- 全程不引入 `US LV1` 术语

### 2. 补充 ChatGPT 接入 Longbridge MCP 说明(三语)

为 `docs/{lang}/docs/mcp.md` 新增/补全 ChatGPT 客户端接入步骤:开启 Developer Mode →
Settings/Apps 路径 → Create app 表单字段 → 截图与演示视频。en / zh-CN / zh-HK 三语同步。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 16:58:28 +08:00
Hogan 737dfa1069 fix(skill-catalog): update locale to match 13 consolidated skills (#1083)
## Summary

- Skill 页显示 \"All 38\",实际 skill 项目只有 13 个
- 根因:locale 文件有 30 个旧细粒度条目(`longbridge-quote`、`longbridge-depth`
等),`skills.json` 已更新为 13 个新聚合 skill,其中 8 个不在 locale 里被 `augmentLocale`
自动追加 → 30 + 8 = 38
- 修复:将三个 locale 文件(en / zh-CN / zh-HK)全部替换为 13 个新 skill 条目,与
`skills.json` 完全对齐

## Changes

- `skill-catalog/en/index.ts` — 30 → 13 个条目,映射新聚合 skill
- `skill-catalog/zh-CN/index.ts` — 同步简体中文
- `skill-catalog/zh-HK/index.ts` — 同步繁体中文
- 移除已无 skill 使用的 `trade` 分类

## Test plan

- [ ] 访问 Skill 页面,确认 All 显示 13
- [ ] 切换三种语言,确认数量和卡片内容正常
- [ ] 确认分类 tab(Market / Research / Derivatives / Discovery / Portfolio /
Platform)均正常

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-10 11:41:00 +08:00
Jason Lee 420f588c4e docs: US 夜盘行情改为免费 (#1081)
## 变更内容

将 **US 夜盘行情(Overnight)** 的说明从「需购买 LV1 实时行情卡」更新为**免费**,并精简定价页对比矩阵。

### 文档(三语同步:en / zh-CN / zh-HK)

- **`qa/quote.md`** Q6:夜盘行情免费提供,无需额外购买行情卡。
- **`quote/overview.md`** 行情权限表:获取方式改为「免费,设置
`LONGBRIDGE_ENABLE_OVERNIGHT=true` 即可获取」。
- **`getting-started.md`** 环境变量表:`LONGBRIDGE_ENABLE_OVERNIGHT`
说明改为「夜盘行情免费,仅支持美股」。

技术开关(`LONGBRIDGE_ENABLE_OVERNIGHT` / metadata
`need_over_night_quote`)与「仅支持美股」限制保持不变。

### 定价页(`Pricing.vue`)

- 给 Overnight 行补上免费档勾选后,**Nasdaq Basic 列与 US LV1 列勾位完全一致**,移除重复的 Nasdaq
Basic 列。
- 对比矩阵由 6 列调整为 5 列:**US LV1 · OPRA · HK LV1 · HK LV2 · CN LV1**。

> ⚠️ 注意:US LV1 列 tag 仍为「付费」,overnight 的勾现落在该列下。如需在矩阵中体现 overnight
免费,可后续调整该列标签。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 10:17:28 +08:00
Jason Lee 4ce9dcfb00 docs: add cross-domain internal links to longbridge.com (#1080)
## Summary

Adds SEO cross-domain internal links from the Longbridge Developers docs
(open.longbridge.com) to the main longbridge.com site, synchronized
across all three locales (en / zh-CN / zh-HK).

## Links added

| Source page(s) | Anchor text | Target |
| --- | --- | --- |
| CLI finance-calendar | Stock Earnings Calendar | `/calendar/report` |
| CLI news, API news | Longbridge News | `/news` |
| CLI topic, API topics + 5 topic sub-endpoints | Longbridge Topics |
`/topics` |
| Quote | Longbridge Global Markets | `/markets` |
| Docs overview | open a Longbridge Integrated A/C | `/hk/download` |
| CLI screener | Longbridge Stock Screener | `/screener` |
| Homepage hero / AI / MCP | live market data / screen stocks /
real-time quotes | `/markets`, `/screener` |
| Pricing hero / basic data / realtime / FAQ | news / view live market
data / Longbridge App / integrated accounts | `/news`, `/markets`,
`/hk/download` |
| Skill cross-market screening | live market data | `/markets` |

## Notes

- All longbridge.com links omit the language segment (e.g. `/news`, not
`/en/news`); the main site auto-switches locale by user language.
- Vue components (NewHomePage, Pricing, Skill) render the relevant
description fields via `v-html` so inline `<a>` links work. No custom
inline link styling is used — default link styling for maintainability.
- Chinese docs were run through `autocorrect --fix`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 10:07:42 +08:00
Jason Lee 6956e19ac2 docs: drop "100+" skill-count from homepage copy (#1079)
## What

Removes the **"100+"** skill-count claims from the homepage copy.

## Why

The skills repo was consolidated from 127 skills down to 13. The raw
count is no longer a selling point — quantity isn't the differentiator
anymore, capability and coverage are. So the copy shouldn't lead with a
number that is both outdated and off-message.

## Changes (all three locales: en / zh-CN / zh-HK)

- **`Skill.vue`** — catalog hero title: `100+ Skills, covering every
move…` → `Skills that cover every move in your trading day.`
- **`NewHomePage/index.vue`**
- AI Skill product-card `tags`: `['100+ Skills']` → `['Agent Skills']`
(4 occurrences)
- AI-section `eyebrow`: `AI Skill · 100+ packaged tools` → `AI Skill ·
packaged tools`

The CLI card's `130+ cmds` is a separate, still-valid metric and is left
untouched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:33:22 +08:00
Jason Lee 6c5a7e82f1 docs: Fix skill page Connect button to follow current locale (#1073)
## Summary

- The `Connect AI` button on the `/skill` page hard-coded
`href="/connect"`, so zh-CN / zh-HK visitors were sent to the English
connect page.
- Now uses the existing `localePfx` computed (same as the
`/skill/install` link), linking to `/zh-CN/connect` / `/zh-HK/connect` /
`/connect` per the current locale. All three paths verified live (200).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:18:18 +08:00
Jason Lee 644726b0b2 docs: add Agent Auth Code guide for browser-less authorization (#1072)
## Summary

- Add new **Agent Auth Code** doc page (en / zh-CN / zh-HK): generate a
one-time code at
[open.longbridge.com/connect](https://open.longbridge.com/connect),
redeem via CLI `auth login --auth-code` or the dedicated MCP endpoint
`https://mcp.longbridge.com/agent` (`authenticate` tool)
- CLI install docs: document the `--auth-code` fallback when no browser
is available (example code uses base58 format)
- MCP docs: add tip for clients with incomplete OAuth support or no
browser
- Skill references (`setup.md` / `mcp.md`): auth-code flow for headless
agents
- AppNav: add "Connect AI" entry to the avatar dropdown menu

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:32:47 +08:00
Jason Lee ecdc96a6b7 docs: update MCP host to mcp.longbridge.com / mcp.longbridge.cn (#1071)
## Summary

- 将 MCP Host 从 `https://openapi.longbridge.com/mcp` 改为
`https://mcp.longbridge.com`
- 中国大陆加速地址从 `https://openapi.longbridge.cn/mcp` 改为
`https://mcp.longbridge.cn`
- 更新范围:三语言 MCP 文档与 Skill
安装页、首页组件(`NewHomePage/index.vue`、`ProductMCP.vue`)、`README.md`、`skills/longbridge/references/`
- `config.mts` 构建端点同步改为
`https://mcp.longbridge.com/mcp/tools.json`(已验证返回 200)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 09:47:45 +08:00
Jason Lee 783c646cfc docs: Add CLI v0.22.4 release notes and ETF holdings docs (#1068)
## Summary

- Add **CLI v0.22.4** release notes: `constituent` now supports ETFs —
asset-allocation breakdown for ETF symbols, and full US ETF holdings
fetched from SEC EDGAR N-PORT filings
(longbridge/longbridge-terminal#229, longbridge/longbridge-terminal#231)
- Document the new ETF holdings behavior in the `constituent` command
page (usage examples, SEC N-PORT output sample, fallback chain,
data-timeliness notes)
- Backfill missing changelog entries for CLI v0.22.2 / v0.22.3, and add
v0.22.4
- All three locales (en / zh-CN / zh-HK) updated in sync; Chinese docs
formatted with `autocorrect --fix`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 17:15:25 +08:00
Jason Lee df68a37912 docs: 新增开发者平台免责声明与 API 许可协议,优化法律文档导航 (#1066)
## 概述

新增开发者平台两份法律文档(HK/SG),并优化「法律文件」在站内的导航与布局。

## 改动

### 新增法律文档
- 《开发者平台免责声明》《API 许可协议》各含 HK / SG 两版,en / zh-CN / zh-HK 三语言,共 12 个页面
- 内容逐字取自法务提供的源文件,去除正文 H1、改由 frontmatter `title` 提供,与既有 legal 页保持一致
- 新增 `legal/index.md` 索引首页,按 SG / HK 分组索引全部协议

### 侧边栏
- `gen.ts` 新增 `_category_.json` 的 `indexLink`
字段:配置后该分类在侧边栏渲染为指向索引页的单链接、不展开子页面(避免平铺过多);特意不复用语义不同的 `link` 字段,避免误伤
`quote/subscribe`
- 法律文档顺序统一为 **SG 在前、HK 在后**

### Footer
- AppFooter 法律区由数据授权两项收敛为单个「协议与免责声明」入口,指向 `/docs/legal`

### 布局修复
- 修复文档顶部被固定导航栏遮挡(`.VPDoc.has-sidebar` 增加顶部留白)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 21:31:24 +08:00
Jason Lee 669e7b5083 docs: Add CLI v0.22.3 release notes (#1065)
为 longbridge CLI v0.22.3 补充 Release Notes(en / zh-CN / zh-HK 三种语言)。

## 本次发布概要

v0.22.3 聚焦面向 AI 工作流的输出可读性与完整性:

- **`quote` 新增美股隔夜时段数据** — `quote <SYMBOL> --format json` 现会填充
`overnight_quote`,与 `pre_market_quote`、`post_market_quote` 并列;此前隔夜字段始终为
`null`,会影响盘后判断([#228](https://github.com/longbridge/longbridge-terminal/pull/228))
- **持仓类命令显示账户类型 banner** —
`positions`、`fund-positions`、`assets`、`portfolio` 现会在表格前打印一行账户标识(`Live
A/C (real account)` / `Demo A/C (simulated
account)`),便于直接区分数据所属账户;`--format json`
输出保持不变([#226](https://github.com/longbridge/longbridge-terminal/pull/226))

> 注:GitHub 上 v0.22.3 release 页面发布后,文档内的 tag 链接即可生效。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 17:13:59 +08:00
Jason Lee 57bbb855da docs: Add CLI v0.22.2 release notes (#1060)
为 longbridge CLI v0.22.2 补充 Release Notes(en / zh-CN / zh-HK 三种语言)。

## 本次发布概要

v0.22.2 是一个聚焦 **JSON 输出一致性** 的维护版本,主要面向脚本与 AI 工具调用场景:

- **JSON 时间戳统一为 RFC 3339** — `topics`(帖子与回复时间)及账户盈亏流水记录改用 RFC 3339
日期时间,不再输出原始 Unix
时间戳([#223](https://github.com/longbridge/longbridge-terminal/pull/223)、[#225](https://github.com/longbridge/longbridge-terminal/pull/225))
- **`rank` / `screener` / `short-positions` / `top-movers` JSON 输出优化** —
内部 `counter_id` 替换为可读的 `symbol`,`rank` 分类与 `screener strategies`
输出扁平化、规范化([#221](https://github.com/longbridge/longbridge-terminal/pull/221))
- **`market-temp --history` 默认区间** — 省略 `--start` 时默认取结束日期前 30
天([#224](https://github.com/longbridge/longbridge-terminal/pull/224))

> 说明:v0.22.1(screener 迁移 AI 端点)此前未在 Release Notes 中单列,本次仅补充 v0.22.2。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 13:36:12 +08:00
mingxingmeng-ctrl deeed629ec 完善 Skill 安装指引,让 agent 自主跑通 Step 1 安装与鉴权 (#1059)
## 目的

让 AI agent 能完整、无偏差地执行 Step 1(安装 CLI → 鉴权 → 验证)。此前唯一的执行偏差在 `longbridge
auth login` 一步——agent 容易前台干等,或不知如何处理浏览器授权。

## 改动

仅 `docs/{en,zh-CN,zh-HK}/skill/install/index.md` 顶部 `<!-- AI INSTRUCTION
-->` 块,每份 3 行(正文及 Step 3/4 与 main 完全一致):

1. **前言**:要求 agent 为这些步骤建立 TodoList 并自己运行命令
2. **Step 1**:CLI 方式自己运行安装命令,再用 `longbridge --version` 确认
3. **Step 2(核心)**:在后台运行 `longbridge auth login`——它打印验证 URL + code 并轮询约 5
分钟;agent 把 URL/code 转交用户、等其在浏览器批准、待 exit 0(`Successfully
authenticated.`)后继续,并用 `longbridge auth status` 确认

## 范围

纯文档 · 3 文件 · 每份 3 行 · 不涉及 Homebrew、不改正文与 Step 3/4。

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 09:32:03 +08:00
Endless bb1efde49d 检查修复 developers 项目内 /skill 介绍页面有一段 "请按照以下指南安装 Longbridge AI toolkit:https://open.longbridge.com/skil (#1056)
🤖 Auto-generated by Endless task
[#23](https://endless.longbridge-inc.com/projects/developers/tasks/23).

Initiated by: Huacnlee Li Huashun

## 背景

`/skill` 介绍页面中有一段引导用户安装 Longbridge AI toolkit 的文案,其中包含安装指南
URL(`/skill/install.md`)以及 ZIP 下载命令中的文件地址。平台在中国大陆提供独立域名
`open.longbridge.cn`,对应的 CN 版本构建时会通过 `VITE_SITE_HOSTNAME` 环境变量注入正确的域名前缀。

然而 `Skill.vue` 中这些 URL 均为硬编码字符串 `https://open.longbridge.com/...`,未引用
`siteHostname` 工具常量。这导致即使在 `.cn` 构建下,页面上展示的安装 URL 仍为
`.com`,与用户所在的域名环境不符。

## 根因

`LOCALE` 对象中的 `installCmd` 字符串以及 catalog 弹窗的 ZIP 下载链接,均直接嵌入了
`https://open.longbridge.com` 字面量,没有引用
`docs/.vitepress/theme/utils/region.ts` 导出的 `siteHostname`
常量。`siteHostname` 在构建时从 `import.meta.env.VITE_SITE_HOSTNAME` 读取域名(CN
构建设为 `https://open.longbridge.cn`,默认为
`https://open.longbridge.com`),是该代码库中处理多域名的标准方式,但 `Skill.vue` 中遗漏了这一引用。

## 摘要

- 解决的问题:`.cn` 域名下的 `/skill` 页面,安装指南 URL 和 ZIP 下载链接仍显示为 `.com`
- 做了什么:在 `Skill.vue` 中导入 `siteHostname`,将 6 处硬编码
`https://open.longbridge.com` 替换为 `${siteHostname}` 模板表达式
- 为什么这样做:`siteHostname` 是构建时常量,SSR 和客户端水合使用同一个值,彻底消除水合不一致;与
`Breadcrumb/index.vue` 等组件的现有实现保持一致
- 如何验证:`VITE_SITE_HOSTNAME=https://open.longbridge.cn bun run
build:release`,检查构建产物中安装指南 URL 是否为 `.cn`;默认构建检查是否为 `.com`

## 修改

| 文件 | 改动内容 |
|---|---|
| `docs/.vitepress/theme/components/Skill.vue` | 导入 `siteHostname`;替换
en/zh-CN/zh-HK 三处 `installCmd` 中的域名、computed 中两处 curl 下载命令、template 中一处
ZIP href |

## 关键决策

使用构建时常量 `siteHostname` 而非运行时 `window.location.hostname` 检测:域名在运行时不会改变,且
`siteHostname` 已是本项目多域名处理的既定模式,无需引入额外的运行时判断逻辑。

Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
2026-06-01 20:43:27 +08:00
hold-baby 8d0f6fc4ae 修复大陆版构建未重写 openapi.longbridge.com 为 .cn (#1057)
## 合入判断
**[APPROVE]** — 大陆版 region 重写机制扩展,补齐遗漏的 API 域名,无显著风险
> 3 files · +32 / -10 · `docs/.vitepress` `docs/public`

---
## 变更概要
- 扩展 `regionConfig` 的 URL 重写:在 markdown 渲染、HTML 输出、install 静态脚本三处统一新增
`openapi.longbridge.com → apiBaseUrl`(cn 版即 `.cn`),与原有
`open.longbridge.com → siteHostname` 并列
- 把两处单字符串替换重构为 `[from, to][]` 数组循环,方便后续再添加其它待重写域名
- 修正 `docs/public/longbridge-terminal/install` 第 8 行硬编码 `.cn`
的残留,统一为全球默认 `.com`,由构建期 region 重写在 cn 构建时统一换回 `.cn`

---
## 风险分析
| 风险点 | 等级 | 缓解措施 |
|--------|------|---------|
| 替换顺序导致二次替换 | ✅ | 两域名互不为子串(`open` 与 `openapi` 在第 12 字符就分叉),串行
`split/join` 安全 |
| 全球版构建受影响 | ✅ | 全球版 `regionCfg` 为 `undefined`,新条件分支不进入;install 源文件改回
`.com` 后全球版表现一致 |
| 大陆版漏改子域名 | 🟢 | 已对 cn 构建产物全量扫描(HTML + install),零 `.longbridge.com` 残留 |
| install 源文件改 `.cn`→`.com` 影响生产 | ✅ | 此文件由 buildEnd 在 cn 构建时再次重写为
`.cn`;全球版本就该用 `.com` |

---
## 设计决策
- **源文件统一全球默认域名,差异化交给 region 重写**:避免在源文件维护两套常量,与项目已有重写机制一致
- **三处重写点保持各自独立**:markdown 插件 / transformHtml / buildEnd install
各处的执行时机和载体不同(token / 字符串 / 文件),不抽象统一函数,避免过度耦合

---
## 代码关注点
1. **[需判断]** `apiBaseUrl` 是 origin 还是带 path
(`docs/.vitepress/md-plugins/region-filter.ts:18`)
`regionConfig.cn.apiBaseUrl = 'https://openapi.longbridge.cn'` 不带末尾
`/`,与被替换的 `https://openapi.longbridge.com` 一致,目前安全;若未来配置改成带
path/trailing slash 会导致 URL 拼接错位,reviewer 拍板是否在配置层加格式校验
2. **[信息]** dist 下的 `.md` 副本和 `llms.txt` 未走 region 过滤 (`docs/.vitepress`
外的 `copy-routes.ts` / `generate-llms.ts`)
产物里 `.md` / `llms.txt` 仍含 `.com`(独立生成链路,不经 markdown 插件),本次 scope
不处理;如需大陆版 AI 消费副本也走 `.cn`,需单独 PR 给那两个脚本加 region 化

---
## 验证状态
✅ 本地 `bun run build:cn` 构建成功(170 行输出,1 warning,无 error) · ✅ dist HTML
全量扫描零 `.longbridge.com` 残留 · ✅ install / install.ps1 产物 5/5 处全部 `.cn` ·
📋 需 reviewer 验证:线上 `open.longbridge.cn` 实际访问 mcp / skill 页面域名展示

Co-authored-by: 袁昌瑞 <changrui.yuan@longbridge-inc.com>
2026-06-01 19:21:33 +08:00
拉罐 30401a857a feat: integrate Google One Tap login via CDN bundle (#1051)
Inject the `google-one-tap.es.js` CDN bundle into every page <head> via
VitePress `head` config, so it loads in both `bun run dev` and built
output (works around `transformHtml` being build-only).

- Gated by `VITE_REGION !== 'cn'` (Google unavailable in China).
- `data-proxy` attribute driven by `process.env.PROXY`: `canary` for
`dev:canary` / `build:canary`, otherwise `production`. CI inherits via
the same npm scripts — no workflow edits required.
- No `data-region` passed: the bundle falls back to `app-id` / `region`
cookies with `sg` default, which is correct for this first-party
`.longbridge.com` site.
- On success the bundle writes session cookies on `.longbridge.com` and
reloads, so `longportInternal.isLogin()` picks it up.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 10:38:18 +08:00
JetSquirrel ed10f89ddd docs: remove blank lines in CliCommand blocks to fix heading render (#1039)
Blank lines inside <CliCommand> blocks caused markdown parser to
interpret `# ...` comment lines as H1 headings instead of code comments.

<img width="763" height="456" alt="image"
src="https://github.com/user-attachments/assets/a0b20d2b-55ab-44ef-8d01-86b1926acd2a"
/>

Removed the blank lines:
<img width="754" height="433" alt="image"
src="https://github.com/user-attachments/assets/e67d0cfd-909c-47df-b675-6c894d7adc42"
/>

Co-authored-by: Tian Deng <tian.deng@longbridge-inc.com>
2026-05-27 17:05:39 +08:00