zhi-2026-04-18 #1

Merged
hzhang merged 5 commits from zhi-2026-04-18 into main 2026-05-01 07:21:25 +00:00
Contributor
No description provided.
hzhang added 5 commits 2026-05-01 07:21:19 +00:00
- Plugin scaffold: manifest, tsconfig, package.json
- Router loader with dynamic import + cache busting for hot reload
- Rule store: CRUD on rules.json
- Prompt injector: resolve routers → match rules → read files → inject
- MCP tool: prompt_rules (add/remove/list/test/reload-routers/list-routers)
- Built-in routers: agent-id (zero-dep), role, position (ego.json)
- before_prompt_build hook for system prompt injection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- plugin/ directory structure: hooks/, tools/, core/
- export default { id, name, register } entry format
- globalThis state management with lifecycle protection
- WeakSet dedup on before_prompt_build hook
- Tool uses inputSchema + execute (not parameters + handler)
- additionalProperties: false in config schema
- Core logic in plugin/core/ (no plugin-sdk dependency)
- Install/uninstall script (scripts/install.mjs)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pluginDir already points to the plugin install root, no need for ..

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
- inputSchema → parameters
- { result: text } → { content: [{ type: "text", text }] }

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hzhang merged commit bd851f2b9d into main 2026-05-01 07:21:25 +00:00
hzhang deleted branch zhi-2026-04-18 2026-05-01 07:21:25 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zhi/PrismFacet#1