refactor: remove built-in routers
PrismFacet is a generic framework — routers are registered by consumers (e.g., ClawRoles), not bundled with the plugin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,4 +2,3 @@ node_modules/
|
|||||||
dist/
|
dist/
|
||||||
plugin/**/*.js
|
plugin/**/*.js
|
||||||
plugin/**/*.js.map
|
plugin/**/*.js.map
|
||||||
!routers/*.js
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
// Zero-dependency router: returns agentId directly
|
|
||||||
export function resolve(ctx) {
|
|
||||||
return ctx.agentId || "";
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// Reads agent position from ego.json (optional dependency on PaddedCell/ego-mgr)
|
|
||||||
import { readFileSync } from "node:fs";
|
|
||||||
import { homedir } from "node:os";
|
|
||||||
|
|
||||||
const EGO_PATH = `${homedir()}/.openclaw/ego.json`;
|
|
||||||
|
|
||||||
export function resolve(ctx) {
|
|
||||||
try {
|
|
||||||
const ego = JSON.parse(readFileSync(EGO_PATH, "utf8"));
|
|
||||||
return ego["agent-scope"]?.[ctx.agentId]?.position || "";
|
|
||||||
} catch {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// Reads agent role from ego.json (optional dependency on PaddedCell/ego-mgr)
|
|
||||||
import { readFileSync } from "node:fs";
|
|
||||||
import { homedir } from "node:os";
|
|
||||||
|
|
||||||
const EGO_PATH = `${homedir()}/.openclaw/ego.json`;
|
|
||||||
|
|
||||||
export function resolve(ctx) {
|
|
||||||
try {
|
|
||||||
const ego = JSON.parse(readFileSync(EGO_PATH, "utf8"));
|
|
||||||
return ego["agent-scope"]?.[ctx.agentId]?.role || "";
|
|
||||||
} catch {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user