mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-20 02:33:15 +08:00
Fix KB loading bugs and add jailed KB read/search tools (0.1.71).
- Strip UTF-8 BOM before parsing MANIFEST.json (PowerShell 5.1 output).
- kb.reload force-republishes so edited SKILL.md / new local_skills / identity apply.
- Duplicate or rejected pack skills are skipped instead of unregistering the whole pack.
- kb-context and every pack skill carry resolved absolute paths.* anchors; KB_PATHS env.
- Inline {paths.local}/identity/*.md into kb-context (capped).
- New netx__kbSearch / netx__kbRead host tools, realpath-jailed to kbRoot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b2166e5b6
commit
2def53e7c7
22 changed files with 4286 additions and 1013 deletions
|
|
@ -147,10 +147,11 @@ test('knowledge-base tools contribute to the mount inventory and disappear on di
|
|||
const mount = fakeContext()
|
||||
const snapshot = { status: 'configured', realRoot: process.env.DSH_HOME, paths: { local: '_local' } }
|
||||
const dispose = registerKbLocalTools(mount.ctx, snapshot, { plane: 'preset', source: 'kb-test' })
|
||||
assert.equal(mount.tools.size, 7)
|
||||
// 2 read (kbSearch / kbRead) + 7 local write/list tools.
|
||||
assert.equal(mount.tools.size, 9)
|
||||
const statuses = getToolMountStatuses()
|
||||
assert.ok(statuses.some(row => row.source === 'kb-test' && row.count === 7 && row.groups.includes('kb')))
|
||||
assert.equal(asToolsMountView({ mounts: statuses }).count, 7)
|
||||
assert.ok(statuses.some(row => row.source === 'kb-test' && row.count === 9 && row.groups.includes('kb')))
|
||||
assert.equal(asToolsMountView({ mounts: statuses }).count, 9)
|
||||
dispose()
|
||||
assert.equal(mount.tools.size, 0)
|
||||
assert.equal(getToolMountStatuses().some(row => row.source === 'kb-test'), false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue