feat(prism-facet): add 'always' router + Hangman-Lab pcexec convention prompt
The 'always' router resolves to the constant key "always" for every agent — pair with a rule like 'always:always → some-prompt.md' to inject a prompt fragment unconditionally (no ego/role/position lookup needed). Bundle a site-specific prompt 'pcexec-convention.md' that tells every agent: Hangman-Lab keeps site binaries at ~/.openclaw/bin (hf, secret-mgr, ego-mgr, fabric-register, pcguard, lock-mgr, tea) — not symlinked to /usr/local/bin — so they MUST be invoked via the pcexec tool, not the codex built-in shell. Without this, agents would call those CLIs directly and get 'command not found' (observed during the 2026-05-23 hf-wakeup runs on prod t2). Register the binding in rules.json so it loads at gateway startup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
plugin/routers/always.ts
Normal file
11
plugin/routers/always.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* `always` router — resolves to the constant key `"always"` for every
|
||||
* agent. Pair with a rule like `always:always → <some-prompt.md>` to
|
||||
* inject a prompt fragment into every agent's system prompt
|
||||
* unconditionally (no ego / role / position lookup needed).
|
||||
*/
|
||||
import type { RouterContext } from "../core/router-loader.js";
|
||||
|
||||
export function resolve(_ctx: RouterContext): string {
|
||||
return "always";
|
||||
}
|
||||
Reference in New Issue
Block a user