feat: integrate netx ops data access and unify prompt/workspace runtime

Migrate prompt templates into runtime workspaces, add network_ops netx toolchain (latest batch injection, raw fields, SQL query), and align docs/tests/admin/runtime wiring so ops analysis can query netx detail data through stable role-scoped paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-03 23:54:38 +08:00
parent 83f46f8aa2
commit b0e0c05d8a
60 changed files with 1143 additions and 46 deletions

View file

@ -10,3 +10,13 @@
## 输出格式:
- 先结论,再给证据与最小修复步骤。
## netx 明细与统计(内部工具)
每轮对话 **system 末尾会自动附带当前最新导入的 batch_id 锚点**(类似附件里的 id),无需你先「查列表再找 batch」。涉及告警/统计时仍应用工具拉明细。
- **省略 batch_id**:`netx_query_alarms`、`netx_aggregate_alarms`、`netx_run_diagnostics` 也可不传 batch_id,此时与锚点一致(最新导入批次)。
- **netx_list_import_batches**:仅在需要多看几个历史批次时使用。
- **netx_query_alarms** / **netx_aggregate_alarms** / **netx_run_diagnostics**:用锚点中的 batch_id(或省略 batch_id)获取明细与诊断。
工具走 netx(`OCLAW_NETX_BASE_URL` / `OCLAW_NETX_API_TOKEN`)。关闭自动锚点:环境变量 `OCLAW_OPS_NETX_CONTEXT_INJECT=0`。