mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-09 04:00:46 +08:00
Ship capability groups (nms/common/topology) with shared netx skills.
One group maps to one skill and tools-*; rename NMS tools to *Nms*; sync playbooks from netx/skills. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
83c3796fbb
commit
3c9a383071
47 changed files with 11790 additions and 680 deletions
|
|
@ -30,6 +30,9 @@ const external = [
|
|||
const entries = [
|
||||
{ entry: join(root, 'src/index.ts'), out: join(outDir, 'index.js') },
|
||||
{ entry: join(root, 'src/agent-tools.ts'), out: join(outDir, 'agent-tools.js') },
|
||||
{ entry: join(root, 'src/agent-tools-nms.ts'), out: join(outDir, 'agent-tools-nms.js') },
|
||||
{ entry: join(root, 'src/agent-tools-common.ts'), out: join(outDir, 'agent-tools-common.js') },
|
||||
{ entry: join(root, 'src/agent-tools-topology.ts'), out: join(outDir, 'agent-tools-topology.js') },
|
||||
]
|
||||
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
|
|
|
|||
47
scripts/sync-skills-from-netx.ps1
Normal file
47
scripts/sync-skills-from-netx.ps1
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Sync canonical netx/skills → dsh-netxops presets (npm embed only).
|
||||
# MCP packages do NOT carry a skills/ mirror — point Cursor/hosts at netx/skills/.
|
||||
param(
|
||||
[string]$NetxRoot = ""
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
$opsRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||
if (-not $NetxRoot) {
|
||||
$sibling = Join-Path $opsRoot "..\netx"
|
||||
if (Test-Path (Join-Path $sibling "skills")) {
|
||||
$NetxRoot = (Resolve-Path $sibling).Path
|
||||
} else {
|
||||
throw "Pass -NetxRoot or place netx checkout next to netxops (../netx/skills)"
|
||||
}
|
||||
}
|
||||
$src = Join-Path $NetxRoot "skills"
|
||||
$dst = Join-Path $opsRoot "presets\netxops\skills"
|
||||
if (-not (Test-Path $src)) { throw "missing $src" }
|
||||
|
||||
foreach ($group in @("nms", "common", "topology")) {
|
||||
$from = Join-Path $src $group
|
||||
$to = Join-Path $dst $group
|
||||
if (-not (Test-Path $from)) { throw "missing group $from" }
|
||||
if (Test-Path $to) { Remove-Item $to -Recurse -Force }
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path $to) | Out-Null
|
||||
Copy-Item $from $to -Recurse -Force
|
||||
}
|
||||
|
||||
# Drop legacy separate layout skill if present
|
||||
$legacyLayout = Join-Path $dst "topology-layout"
|
||||
if (Test-Path $legacyLayout) { Remove-Item $legacyLayout -Recurse -Force }
|
||||
|
||||
@"
|
||||
# Mirrored from netx/skills — do not long-edit here
|
||||
|
||||
Canonical: ``$NetxRoot\skills``
|
||||
|
||||
```powershell
|
||||
powershell -File .\scripts\sync-skills-from-netx.ps1
|
||||
```
|
||||
|
||||
Runtime prefers ``NETX_SKILLS_ROOT`` or sibling ``../netx/skills``.
|
||||
One topology skill covers canvas + dual_unit / layout recipes; DSH may still gate **tools** via topology vs topology-layout groups.
|
||||
"@ | Set-Content -Encoding utf8 (Join-Path $dst "README.md")
|
||||
|
||||
Write-Host "Synced $src -> $dst"
|
||||
Get-ChildItem -Recurse $dst -Filter SKILL.md | ForEach-Object { $_.FullName.Substring($opsRoot.Path.Length) }
|
||||
Loading…
Add table
Add a link
Reference in a new issue