Files
MemRelay/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/平台工参导出接口.md
T
memrelay a593068223 update: 平台工参导出接口
MemRelay-Operation: memory-save:nqi-agent-prompt-20261111-2
MemRelay-Resource: 84d426a9-a184-4d1c-b84c-6dba63f37777
2026-11-11 00:22:41 +08:00

2.9 KiB
Raw Blame History

title, type, permalink, stable_id, scope, memory_type, project_id, usage_profile_id, status, revision, request_id, created_at, updated_at, tags
title type permalink stable_id scope memory_type project_id usage_profile_id status revision request_id created_at updated_at tags
平台工参导出接口 fact main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/平台工参导出接口 84d426a9-a184-4d1c-b84c-6dba63f37777 project fact d5a7f581-c442-4554-87b9-ee723b8b0258 0c9feb46-d06e-43cd-9ef0-c5813c84a998 active 5 nqi-agent-prompt-20261111-2 2026-11-10T13:40:51.351339+00:00 2026-11-10T16:22:39.078750+00:00
NQI
OpenCode
prompt
凭据过期
工参

来源

nqi-opencode.chlz 是 OpenCode 页面抓包,没有 pro-assistant-server 的实际请求。导出说明在会话 ses_e3a7adae3ffe4QxrqaKUPgGATq,对应脚本 download-file-all-async.py。

下载请求

  • POST https://nqi.gmcc.net:20443/pro-assistant-server/smart/file/download
  • 只有请求头 Content-Type: application/json,不发 Cookie。
  • 查询参数 tickets 来自 OpenCode 运行环境的 OPENCODE_TOOL_TICKET。
  • 请求体是 {"sql": "..."},响应是流式 CSV。另有查询接口 pro-assistant-server/smart/execSql,同样读这个环境变量。
  • 2026-11-10 用账号池里 dwmoyingda 的 CASTGC 从线上服务器和本机请求,该路径均被 nginx 返回 403;同一会话访问即席查询正常。

发送指令

nqi-agent.chlz 里发给 AI 的请求是 POST /pro-opencode/dwmoyingda/session/<会话>/prompt_async,返回 204。2026-11-11 00:04:55 的正文是导出江门 4G/5G 工参,00:14:00 的正文是清理下载数据。正文只有 messageID、agent、model、parts[].text,没有票据。

凭据

  • OPENCODE_TOOL_TICKET 就是当前登录的 CASTGC,类型是 TGT。GET /pro-opencode/api/provision 的 token、跳转地址上的 tickets、prompt_async 的 tickets 与 Cookie CASTGC 完全相同。
  • nqi-agent.chlz 里 236 次 tickets 都是同一个值,不是每次调用新签一张票据。
  • prompt_async 同时发送 oc_castgc,另一张 TGT,长度 110,查询参数不用它;opencode_route 是 65 字符路由值;oc_locale 是 zh;metabase.DEVICE 是 36 字符设备标识。x-opencode-directory 是目录路径。没有 Authorization 头。
  • 登录抓包里 CASTGC、TGC 的 Set-Cookie 只有 Path,没有 Expires 和 Max-Age。nqi-agent.chlz 只有一条 Set-Cookie:即席查询的 JSESSIONID,HttpOnly,没有 Max-Age 或 Expires。
  • OpenCode 的 ses_标识是会话记录,不是登录凭据。

过期

导出和发送指令使用的票据都是门户登录的 CASTGC。账号登出或这张 TGT 在服务器上失效后,tickets 一起失效。没有另一套更长的 OpenCode 专用期限。

表

  • 4G:appdbv3.a_common_cfg_lte_cellant_d,通用 LTE 工程参数_天。longitude、latitude 是 numeric(22,6)。
  • 5G:appdbv3.a_common_cfg_nr_cellant_d,通用 5G 工程参数_天。
  • 当前记录用 curr_flag = true,地市用 city = '江门'。这两张是平台上未脱敏的经纬度来源;即席查询结果表里的经纬度仍是脱敏值。