chore(clis/eastmoney): mirror 13 adapters + _secid helper as Phase A oracle#1091
Merged
chore(clis/eastmoney): mirror 13 adapters + _secid helper as Phase A oracle#1091
Conversation
…oracle Mirror the remaining 13 read-oriented adapters and the shared _secid.js helper from the author's local workspace into the repo, so that clis/eastmoney/ becomes the full Phase A codegen regression oracle described in OpenCLI Improvement Spec v1.1 §B.10. Total repo oracle after this PR: 14 adapters under clis/eastmoney/ (hot-rank.js already exists; this PR adds the other 13) plus the _secid.js normalize helper. Covers the two schema-expressiveness gaps discovered during prep: - CSV row_format: kline.js decodes "YYYYMMDD,open,close,..." strings - :row_index source: convertible.js derives rank = i + 1 _secid.js is the canonical example of the v1.1 §B.7 helper contract (pure normalize/derive function, serializable I/O, no env/fs/net/session access, does not drive pagination/retry/fallback). This PR is oracle-only, carries no framework changes. Phase A framework PR depends on this merging first so the codegen diff target is stable. Refs: task #177 / spec v1.1 §B.10
jackwener
added a commit
that referenced
this pull request
Apr 20, 2026
- site-memory hit path no longer jumps to writing adapter; forces Step 5 endpoint re-verification + Step 7 field check, and 30-day expiry - site-memory.md now specifies exact schemas for endpoints.json / field-map.json / notes.md / fixtures + write-back timing rules - coverage-matrix.md marks unverified patterns as 🟡 with an evidence section citing coingecko dry run + PR #1091 eastmoney + bilibili - eastmoney seed typo: resolveSecids -> resolveSecid (and splitSymbols) - docs/developer/ai-workflow.md rewritten to teach the adapter-author skill + opencli browser * primitives (dropped generate/synthesize/ cascade/explore references) - ts-adapter.md, getting-started.md, CHANGELOG.md:87 updated to point at opencli-adapter-author
4 tasks
jackwener
added a commit
that referenced
this pull request
Apr 20, 2026
) * refactor: consolidate 6 skills into 3, remove mechanical commands Replaces opencli-oneshot / opencli-explorer / opencli-browser / opencli-usage with a single opencli-adapter-author skill that takes the AI agent end-to-end: site recon, API discovery, field decoding, adapter coding, and `opencli browser verify`. Removes the mechanical commands (`explore`, `synthesize`, `generate`, `cascade`, `record`) and their src/tests — they were codegen scaffolding meant for agents, which the new skill handles more flexibly via `opencli browser` primitives. Skill highlights: - Top-level decision tree + 12-step runbook - 5 site patterns (SPA / SSR / JSONP / Token / Streaming) - 5-layer API discovery (network → initial state → bundle → token → interceptor) - Field decode playbook (self-explanatory → codes → sort-key comparison) - Output design guide (columns, types, order, ≤15 per adapter) - Two-layer site memory: in-repo seeds for eastmoney/xueqiu/bilibili/tonghuashun plus local `~/.opencli/sites/<site>/` runtime workspace Kept skills: opencli-autofix (now points to adapter-author for rewrites), smart-search. Kept primitives: `browser *`, `doctor`, `list`, `validate`, `verify`, `<site> <cmd>`, `plugin *`, `completion`. No backward compatibility shims. Full test suite (1605 tests) passes. * review fixes: honest coverage, hard memory-hit path, typo, stale docs - site-memory hit path no longer jumps to writing adapter; forces Step 5 endpoint re-verification + Step 7 field check, and 30-day expiry - site-memory.md now specifies exact schemas for endpoints.json / field-map.json / notes.md / fixtures + write-back timing rules - coverage-matrix.md marks unverified patterns as 🟡 with an evidence section citing coingecko dry run + PR #1091 eastmoney + bilibili - eastmoney seed typo: resolveSecids -> resolveSecid (and splitSymbols) - docs/developer/ai-workflow.md rewritten to teach the adapter-author skill + opencli browser * primitives (dropped generate/synthesize/ cascade/explore references) - ts-adapter.md, getting-started.md, CHANGELOG.md:87 updated to point at opencli-adapter-author * fix(ci): resync package-lock + drop stale built-in list reference - Regenerate package-lock.json to restore @emnapi/core + @emnapi/runtime entries that got dropped during the rebase — `npm ci` was failing on all CI jobs (build / audit / docs-build / bun-test / unit-test) - docs/guide/getting-started.md: built-in list dropped `explore`, now reads (list, validate, verify, browser, doctor, plugin...) * fix(ci): restore package-lock.json from main (unrelated lockfile churn)
This was referenced Apr 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirror the remaining 13 read-oriented eastmoney adapters and the shared
_secid.jshelper from the author's local workspace into the repo. After this PR,clis/eastmoney/contains the full Phase A codegen regression oracle described in OpenCLI Improvement Spec v1.1 §B.10.Oracle counting (unified, per spec §B.10 / codex-mini0 final):
Why this PR is standalone (oracle-only)
Per spec v1.1 §B.10, the oracle mirror is intentionally decoupled from the framework PR:
Files
All 14 files are pure fetch-based read adapters (no browser / no write / no auth state), written using the existing
@jackwener/opencli/registry+@jackwener/opencli/errorsexports. They were generated and live-verified during task #177._secid.js— KNOWN_MARKET_PREFIXES whitelist + regex dispatch; resolves600519/sh600519/00700.HK/us.AAPL→market.codesecid. Canonical example of the spec v1.1 §B.7 helper contract (pure normalize, serializable I/O, no env / fs / net / session, does not drive pagination / retry / fallback).quote.js— batch quote (A / HK / US viasecids=1.600000,0.000001,...)rank.js— ranking across hs-a / sh-a / sz-a / bj-a / cyb / kcb / HK / US x 6 sortsindex-board.js— main / hk / us indiceskline.js— K-line history, 8 periods x 3 adjusts. Exercises spec §B.9 CSVrow_format:data.klines = ["20250101,open,close,high,low,vol,...", ...]decoded by positional index.sectors.js— industry / concept / region x 5 sortsmoney-flow.js— main-force net inflow today / 5d / 10detf.js— ETF list by turnover / change / volume / rateconvertible.js— convertible bond listing. Exercises spec §B.9:row_indexspecial source:rank: i + 1(1-based derived column).northbound.js— northbound / southbound realtime, wan->yi conversionlonghu.js— longhubang (30-day default window)holders.js— top 10 free-float holdersannouncement.js— listed company announcements SHA / SZA / BJAkuaixun.js— 7x24 newswire (columns 102 / 101 / 104 / 105 / 106 / 107)Schema-expressiveness coverage
These adapters intentionally cover the two gaps discovered during spec prep (F2) that drove spec v1.1 §B.9:
kline.jsrow_format: csv+delimiter+from: <int index>+transform: date_yyyymmddconvertible.jsfrom: :row_index, offset: 1Plus
_secid.jsas the canonical §B.7 helper case.Test plan
hot-rank.js(already in repo) is untouched.opencli validate eastmoney+ per-command live diff against these 14 adapters; any schema gap surfaced there feeds back into spec v1.1.Refs