2026-08-03 10:04:41 +08:00
|
|
|
import assert from 'node:assert/strict'
|
|
|
|
|
import test from 'node:test'
|
|
|
|
|
|
2026-08-12 07:07:37 +08:00
|
|
|
import { buildAgentInstructions, normalizeDocPath, sectionForFile } from './build-agent-docs.mjs'
|
2026-08-03 10:04:41 +08:00
|
|
|
|
|
|
|
|
test('normalizes Windows doc paths before section grouping', () => {
|
|
|
|
|
const docPath = normalizeDocPath('concepts\\ai.md')
|
|
|
|
|
|
|
|
|
|
assert.equal(docPath, 'concepts/ai.md')
|
|
|
|
|
assert.equal(sectionForFile(docPath), 'concepts')
|
|
|
|
|
})
|
2026-08-12 07:07:37 +08:00
|
|
|
|
|
|
|
|
test('keeps current persona, system-body and node authority boundaries in every generated bundle', () => {
|
|
|
|
|
const instructions = buildAgentInstructions()
|
|
|
|
|
|
|
|
|
|
assert.match(instructions, /HLP-CURRENT-ARCH-001/)
|
|
|
|
|
assert.match(instructions, /GH-PNCC/)
|
|
|
|
|
assert.match(instructions, /AGE is the Guanghu persona species/)
|
|
|
|
|
assert.match(instructions, /Root\/SSH is not node identity/)
|
|
|
|
|
assert.match(instructions, /One human has one independently operated canonical node/)
|
|
|
|
|
assert.match(instructions, /never pools users into a shared multi-tenant runtime/)
|
|
|
|
|
})
|