mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-16 03:03:25 +08:00
Add KB local write tools and align Netx Ops with standard preset.
Host-side netx__kb* tools jail create/update/delete under paths.local memories/drafts/suggestions; Netx Ops agent.cordis.yml now includes full standard capability rows plus ops tools. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
8360c2e4fc
commit
3a731389f0
20 changed files with 6764 additions and 2635 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import type { KbSnapshot } from './kb-manifest.ts'
|
||||
import { resolveKbLocalRoot } from './kb-local-path.ts'
|
||||
|
||||
const SKILL_NAME = 'kb-context'
|
||||
|
||||
|
|
@ -14,6 +15,24 @@ function skillBody(snapshot: KbSnapshot): { description: string; content: string
|
|||
.filter(([, on]) => on)
|
||||
.map(([key]) => key)
|
||||
.join(', ') || '(none)'
|
||||
const localRoot = resolveKbLocalRoot(snapshot)
|
||||
const localRow = localRoot
|
||||
? `| kbLocal | \`${localRoot}\` |`
|
||||
: '| kbLocal | (MANIFEST paths.local missing) |'
|
||||
const localGuide = localRoot
|
||||
? [
|
||||
'',
|
||||
'**Site-writable (`kbLocal`)**: use host tools `netx__kbWriteMemory`, `netx__kbWriteDraft`,',
|
||||
'`netx__kbWriteSuggestion`, `netx__kbUpdateLocal`, `netx__kbDeleteLocal`, `netx__kbListLocal`.',
|
||||
'They jail writes to `memories/` / `drafts/` / `suggestions/` only.',
|
||||
'Do **not** use workspace Write/bash for KB paths (sandbox).',
|
||||
'`identity/` is persona/policy for the host — **read-only for the agent**; never rewrite it;',
|
||||
'file boundary issues as `suggestions/` instead.',
|
||||
]
|
||||
: [
|
||||
'',
|
||||
'No local write tools until `paths.local` is present in MANIFEST.',
|
||||
]
|
||||
return {
|
||||
description:
|
||||
'Operator knowledge-base context for this Host (paths + identity from MANIFEST).',
|
||||
|
|
@ -27,12 +46,14 @@ function skillBody(snapshot: KbSnapshot): { description: string; content: string
|
|||
`| --- | --- |`,
|
||||
`| kbStatus | configured |`,
|
||||
`| kbRoot | \`${snapshot.realRoot}\` |`,
|
||||
localRow,
|
||||
`| kbOperator | ${snapshot.operatorName} |`,
|
||||
`| kbCountry | ${snapshot.country} |`,
|
||||
`| kbVersion | ${snapshot.version} |`,
|
||||
`| kbContent (on) | ${flags} |`,
|
||||
...localGuide,
|
||||
'',
|
||||
'Environment mirrors: KB_ROOT, KB_OPERATOR, KB_COUNTRY, KB_VERSION, KB_CONTENT, KB_STATUS.',
|
||||
'Environment mirrors: KB_ROOT, KB_LOCAL, KB_OPERATOR, KB_COUNTRY, KB_VERSION, KB_CONTENT, KB_STATUS.',
|
||||
'',
|
||||
'Business playbooks (kb-troubleshoot, kb-retrieve, …) register from',
|
||||
`${snapshot.realRoot}/_skills/ (or MANIFEST paths.skills) when hasSkills is true,`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue