feat: publish HoloLake model-native living system source
This commit is contained in:
parent
6ad10edde1
commit
c395dd3a99
2467 changed files with 615073 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
import { readFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import { vaultContext } from './vault.js'
|
||||
|
||||
export async function readAgentInstructions(vaultPath) {
|
||||
const instructionsPath = path.join(vaultPath, 'AGENTS.md')
|
||||
try {
|
||||
return {
|
||||
path: instructionsPath,
|
||||
content: await readFile(instructionsPath, 'utf8'),
|
||||
}
|
||||
} catch (error) {
|
||||
if (error?.code === 'ENOENT') return null
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
export async function vaultContextWithInstructions(vaultPath) {
|
||||
return {
|
||||
...(await vaultContext(vaultPath)),
|
||||
agentInstructions: await readAgentInstructions(vaultPath),
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue