From fdda34047743062b86929b03ff1217b2d4611107 Mon Sep 17 00:00:00 2001 From: oliver Date: Sun, 6 Sep 2026 02:36:43 +0800 Subject: [PATCH] Pull IM and cron with netxops; keep persona skills English-only. Declare dsh-im-ops and dsh-ops-cron as dependencies and mount them from the netxops patch so one plugin add covers alarm delivery and schedules. Co-authored-by: Cursor --- README.md | 4 +++- cordis.patch.yml | 11 ++++++++++- docs/INSTALL.md | 3 +++ package.json | 8 +++++--- presets/netxops/PERSONA.md | 4 ++-- presets/netxops/agent.cordis.yml | 4 ++-- 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 795b283..637acd1 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ dsh plugin --profile web add github:hansjone/netxops dsh web ``` +Pulls **dsh-im-ops** + **dsh-ops-cron** automatically (dependencies + patch mounts). Details: [docs/INSTALL.md](docs/INSTALL.md). + Then: 1. Settings → **Plugins** → **Netx Ops** → API URL / token / capability groups @@ -20,7 +22,7 @@ Then: 3. Settings → **Agent presets** → Custom → **Netx Ops** (installed automatically on first host activate) 4. New session → choose **Netx Ops** -Also need: a reachable **netx API** (no local `pip install netx_mcp`). Details: [docs/INSTALL.md](docs/INSTALL.md). +Also need: a reachable **netx API** (no local `pip install netx_mcp`). **Skills:** edit only in the sibling **netx** repo `skills/` tree, then `powershell -File .\scripts\sync-skills-from-netx.ps1` before publish. Linked local installs prefer `../netx/skills` or `NETX_SKILLS_ROOT` at runtime. diff --git a/cordis.patch.yml b/cordis.patch.yml index b114d06..9d5a81a 100644 --- a/cordis.patch.yml +++ b/cordis.patch.yml @@ -3,10 +3,19 @@ # Capability groups: ops in preset; topology / public off. # Rule: one group ↔ one skill (netx-ops / netx-topology). # -# After `dsh plugin add` / link, open Settings → Plugins to edit apiUrl / lang / groups +# Companion bundles: `dsh-im-ops` + `dsh-ops-cron` are npm dependencies of this +# package and are inserted here so a single `dsh plugin add …/netxops` mounts +# IM delivery + scheduled tasks without separate profile adds. Same row ids as +# their own patches — safe if those packages are also listed as profile bundles. +# +# After install, open Settings → Plugins to edit apiUrl / lang / groups # (settings card client half; see docs/INSTALL.md). Token: credential NETX_API_TOKEN. - insert: + - id: dsh-im-ops + name: dsh-im-ops + - id: dsh-ops-cron + name: dsh-ops-cron - id: netxops name: dsh-netxops config: diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 5d008e9..4bdf71f 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -7,6 +7,7 @@ One install wires **all of**: | Piece | How you use it | |-------|----------------| | Host tools | Capability groups **ops / topology** (one group ↔ one skill). Default ops in Ops preset; topology and all public off. Other agents may mount `dsh-netxops/tools-ops|topology` | +| Companion plugins | **dsh-im-ops** + **dsh-ops-cron** (npm deps of this package; mounted from this patch — no separate `dsh plugin add`) | | Plugins card | Settings → Plugins → **Netx Ops** (URL / lang / token / capability groups) | | Agent preset + skills | Settings → Agent presets → **Custom → Netx Ops** (copied into `~/.dsh/.agent-presets` on first boot); playbooks follow the same group toggles | @@ -28,6 +29,8 @@ dsh plugin --profile web add github:hansjone/netxops dsh web # or: pnpm dsh web ``` +One add is enough: pnpm pulls **dsh-im-ops** and **dsh-ops-cron** as dependencies of `dsh-netxops`, and this package’s patch mounts them. If pnpm blocks a git `prepare` script, allowlist the printed package keys under `allowBuilds` in the profile’s `pnpm-workspace.yaml`, then re-run. You may still `add` IM/cron separately (same row ids); not required. + 1. **Settings → Plugins → Netx Ops** → API URL (+ token if the field is enabled). Token fallback: `scripts/set-netx-token.ps1` / `.sh`. Optional: enable **关键告警推送** so this DSH dials `ws(s):///v1/integrations/dsh-alarm/ws`. Choose **投递到 DSH 会话** and/or **投递到 WhatsApp / IM**. For IM, install `dsh-im-ops`, create a delivery target, then paste `imBotId` / `imTargetId`. The card header shows live WSS status. diff --git a/package.json b/package.json index 78d982d..d4c6e87 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dsh-netxops", - "version": "0.1.22", - "description": "DeepSeek Harness Netx Ops: capability groups ops/topology (one group ↔ one skill)", + "version": "0.1.23", + "description": "DeepSeek Harness Netx Ops: ops/topology tools + pulls dsh-im-ops and dsh-ops-cron", "license": "MIT", "type": "module", "private": false, @@ -89,7 +89,9 @@ "react": "^18.2.0 || ^19.0.0" }, "dependencies": { - "@deepseek-ai/schemastery": "*" + "@deepseek-ai/schemastery": "*", + "dsh-im-ops": "github:hansjone/dsh-im-ops", + "dsh-ops-cron": "github:hansjone/dsh-ops-cron" }, "devDependencies": { "@types/react": "~18.3.1", diff --git a/presets/netxops/PERSONA.md b/presets/netxops/PERSONA.md index 366f081..c648cf2 100644 --- a/presets/netxops/PERSONA.md +++ b/presets/netxops/PERSONA.md @@ -26,8 +26,8 @@ You are **Netx Ops**, a network operations specialist for NMS / netx. - Display NEs by **host_name** only — never bare UUID to the user. ## Skills (by capability group) -- `netx-ops` — **ops** (NMS alarms/inventory + managed CLI login + paths) -- `netx-topology` — **topology** (canvas / dual_unit / layout) +- `netx-ops` — **ops** — alarms, inventory, managed CLI login, paths +- `netx-topology` — **topology** — canvas / dual_unit / layout ## Tools `netx__*` only. Multi-NE CLI = one `execManagedNe` batch. diff --git a/presets/netxops/agent.cordis.yml b/presets/netxops/agent.cordis.yml index edaddf0..d23b9fe 100644 --- a/presets/netxops/agent.cordis.yml +++ b/presets/netxops/agent.cordis.yml @@ -34,8 +34,8 @@ - No evidence → say evidence insufficient; do not invent root cause. ## Skills (load before acting; only when the capability group is enabled) - - ops (alarms / inventory / 「能否登录」CLI / paths) → `netx-ops` - - topology canvas / dual_unit / layout → `netx-topology` + - ops — alarms, inventory, managed CLI login, paths → `netx-ops` + - topology — canvas / dual_unit / layout → `netx-topology` ## Tools Call netx as `netx__*` (camelCase tool names). See skill bodies for decision trees.