mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-10-21 07:24:00 +08:00
## 中文 补齐已有 owner 与已锁定上游内容可证明的许可证、技能类型和收录版本。保留 Anthropic Source Available 和其他附加条件,不把所有内容统一标为 MIT,不提升 listing-only 的安装准入。 README 保留最新的双语结构及以 manifest 为准的数量口径,增加静态目录不存访问量、下载量、评分或 Stars 的边界。 发布兼容性:**本 PR 不包含**两支团队新增的本地化字段,也不包含微信支付 `latestVersion: 1.0`;旧客户端会拒绝这些新字段,另以待发布 PR 保留,等匹配客户端发布后再合并。 验证:47 项目录校验测试、19 项 i18n 测试、5 项合集生成测试通过;完整目录/i18n/翻译新鲜度检查通过,6 个固定来源合集的生成检查通过,2 个浮动来源按既有规则明确跳过。发现并修复了生成器在 Windows 使用反斜杠造成的误报:输出改为 POSIX 路径,比较规则不放宽、不重写合集数据。 ## English Fill only license, type and listed-release facts supported by existing owners or pinned upstream content. Preserve custom license restrictions and acquisition eligibility. Keep the current bilingual README and manifest-derived inventory; do not author usage analytics. This PR deliberately excludes localized team fields and the two-part WeChat Pay version that older clients reject. Those changes remain pending a compatible client release. Validation passes: 47 catalog-validator tests, 19 i18n tests, five collection-generator tests, complete catalog and translation checks, and generated inventory checks for six pinned collections. Two mutable sources remain explicitly skipped. Fix Windows-generated path separators without weakening comparison or changing declared children.
7.8 KiB
7.8 KiB
license, name, description, version, type, risk_level, status, tags, metadata, market
| license | name | description | version | type | risk_level | status | tags | metadata | market | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MIT | ccgp-gov-procurement | 中国政府采购网招标公告查询——输入企业名称(或简称),搜索该企业参与的采购公告,返回公告列表(标题/链接/日期)并可深度提取详情字段(项目编号/采购人/代理机构/更正内容/联系人)。Use when 用户提到"查招投标"、"政府采购"、"采购公告"、"中标公告"、"招标信息"、"ccgp"、"企业中标"。 | 1.0.0 | procedural | medium | enabled |
|
|
|
CCGP Government Procurement Search
L0: One-Sentence Summary
Input a company name (short name recommended, e.g. "华为" instead of the full legal name), search ccgp.gov.cn via Kimi WebBridge browser automation, and return a structured list of procurement announcements.
L1: Overview
- Data source: China Government Procurement search (
search.ccgp.gov.cn) - Auth: none (public search)
- Invocation: Kimi WebBridge browser automation (navigate + evaluate)
- Prerequisites: Kimi WebBridge daemon running (
127.0.0.1:10086) + browser extension connected - Key advantage: a browser session naturally avoids the IP throttling applied to direct curl calls
L2: Procedure
1. Check the WebBridge daemon
curl -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
-d '{"action":"list_tabs","session":"ccgp-query"}' --max-time 10
If unreachable, start the daemon:
~/.kimi-webbridge/bin/kimi-webbridge.exe start
2. Navigate to the search results page
Windows approach (write JSON to a temp file to avoid encoding issues):
Write C:\tmp\ccgp-nav.json:
{
"action": "navigate",
"args": {
"url": "https://search.ccgp.gov.cn/bxsearch?searchtype=1&page_index=1&bidSort=0&pinMu=0&bidType=0&dbselect=bidx&kw={company-short-name-URL-encoded}",
"newTab": true,
"group_title": "政府采购网查询"
},
"session": "ccgp-query"
}
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\ccgp-nav.json" --max-time 30
Wait 5 seconds before continuing.
3. Extract the announcement list
Write C:\tmp\ccgp-extract.json:
{
"action": "evaluate",
"args": {
"code": "(function(){var txt=document.body.innerText||'';var total=(txt.match(/共找到\\s*(\\d+)\\s*条/)||[])[1]||'?';var items=[];document.querySelectorAll('a').forEach(function(a){var t=(a.innerText||'').replace(/\\s+/g,' ').trim();if(t.includes('{company-keyword}')&&t.length>10){var li=a.closest('li')||a.closest('div');var date='';if(li){var m=(li.innerText||'').match(/\\d{4}[-:]\\d{2}[-:]\\d{2}/);if(m)date=m[0];}items.push({title:t.slice(0,80),href:(a.href||'').slice(0,100),date:date});}});return JSON.stringify({total:total,count:items.length,items:items.slice(0,10)});})()"
},
"session": "ccgp-query"
}
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\ccgp-extract.json" --max-time 40
4. Deep extraction from detail pages (optional)
Navigate to each announcement's detail page and extract structured fields:
{
"action": "navigate",
"args": { "url": "{announcement-detail-URL}" },
"session": "ccgp-query"
}
Wait 5 seconds, then extract:
{
"action": "evaluate",
"args": {
"code": "(function(){var txt=document.body.innerText||'';var lines=txt.split('\\n').map(function(s){return s.trim();}).filter(function(s){return s.length>0;});var fields={};for(var i=0;i<lines.length-1;i++){var l=lines[i];var n=lines[i+1];if(/采购人|采购代理|项目名称|项目编号|采购方式|中标|金额|供应商|地址|联系人|电话|公告日期|品目|更正/.test(l)&&n.length<200){fields[l]=n;}}return JSON.stringify({title:document.title,url:location.href.slice(0,80),fields:fields});})()"
},
"session": "ccgp-query"
}
5. Normalized mapping
{
"query_status": "success",
"source": "ccgp",
"company_name": "{company name}",
"total_found": 2,
"announcements": [
{
"event_type": "招投标公告",
"event_title": "乌兰察布职业学院物业服务(华为校区)采购更正公告(第一次)",
"event_date": "2026-08-25",
"source_url": "http://www.ccgp.gov.cn/cggg/dfgg/gzgg/...",
"project_number": "WSZC-G-F-260032",
"purchaser": "乌兰察布职业学院",
"agency": "乌兰察布市公共资源交易中心",
"contact": "栗春雨 0474-8305228",
"correction": "投标截止时间 2026-09-02 → 2026-09-10"
}
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
6. Pagination (optional)
If total > 10, change page_index=2 in the URL and repeat steps 2-3. Keep ≥5-second intervals.
7. Close the session
{
"action": "close_session",
"session": "ccgp-query"
}
Known Limitations
- Default time window is about one week: results may be 0 — add
start_timeandend_timeto the URL (e.g.start_time=2026:01:01&end_time=2026:08:31) or click the page's time filter - Title-keyword search: matching happens on announcement titles, not a supplier dimension — full legal names rarely hit; use the short name
- Polite pacing: even browser sessions should keep ≥5 s between requests; do not hammer pagination
- HTML coupling: redesigns may break selectors — if extraction is empty, fall back to reading
document.body.innerText
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| navigate fails | daemon down / extension disconnected | restart via kimi-webbridge.exe start |
| "频繁访问" (frequent-access) | IP throttling | browser sessions usually avoid it; wait 60 s and retry |
| Empty extraction | 0 results / selectors broken | check the keyword; fall back to evaluate reading body.innerText |
| Empty detail fields | async content not loaded | retry after 5 s |