managarten/packages/shared-ai/src/policy
Till JS d40a61119e refactor(ai): dynamic tool registry — single-source catalog in shared-ai
Introduce AI_TOOL_CATALOG in @mana/shared-ai as the single source of truth
for all 29 tool schemas (17 propose + 12 auto). Both the webapp policy and
the server-side mana-ai planner now derive their tool lists from the catalog
instead of maintaining independent hardcoded copies.

- New: packages/shared-ai/src/tools/schemas.ts — catalog with ToolSchema type
- Rewrite: proposable-tools.ts — derived from catalog instead of hardcoded array
- Rewrite: services/mana-ai/src/planner/tools.ts — 277→30 lines (imports from catalog)
- Simplify: webapp policy.ts — derives AUTO/PROPOSE from catalog defaultPolicy

Adding a new tool now requires 2 files instead of 3-5:
1. Add schema to AI_TOOL_CATALOG (shared-ai)
2. Add execute function in the module's tools.ts (webapp)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:06:07 +02:00
..
index.ts feat(agents): Agent CRUD + default bootstrap + Mission.agentId (Phase 2) 2026-04-15 20:35:49 +02:00
proposable-tools.ts refactor(ai): dynamic tool registry — single-source catalog in shared-ai 2026-04-16 13:06:07 +02:00
types.ts feat(agents): Agent CRUD + default bootstrap + Mission.agentId (Phase 2) 2026-04-15 20:35:49 +02:00