mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 06:56:35 +00:00
9ed35d182f
131 of 201 tools carry an addon gate, and the registry drops an entry when either the addon gate or the scope gate fails: one filter, one outcome. The session instructions tell the model to check what is available before assuming a tool exists while giving it nothing to check with. list_addons is that something, and it is the difference between a confused apology and 'ask your admin to enable Budget'. The help routes were already public, so the two reader tools add no scope surface at all. The asset route stays out: it serves bytes to an img tag.
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { AddonsController } from './addons.controller';
|
|
import { AddonsService } from './addons.service';
|
|
import { AddonGuard } from './addon.guard';
|
|
import { AddonsMcp } from './addons.mcp';
|
|
|
|
/**
|
|
* GET /api/addons — enabled add-ons + photo providers (was an inline handler in
|
|
* server/src/app.ts). The addon sub-features (atlas, vacay) keep their own
|
|
* modules; this only serves the EXACT /api/addons listing.
|
|
*
|
|
* Exports AddonsService — the owner of addon/feature-flag enablement reads
|
|
* (isAddonEnabled + bag-tracking/collab-features flags, extracted from
|
|
* adminService per finding `admin-1`) — for the in-container consumers.
|
|
* Deliberately NOT @Global (permissions precedent): e2e TestingModules resolve
|
|
* it transitively through each consumer's explicit import.
|
|
*
|
|
* AddonsMcp puts the same listing on the MCP surface, so a model can read which
|
|
* add-ons this instance has switched on instead of guessing from the tools it
|
|
* was handed.
|
|
*/
|
|
@Module({
|
|
controllers: [AddonsController],
|
|
providers: [AddonsService, AddonGuard, AddonsMcp],
|
|
exports: [AddonsService, AddonGuard],
|
|
})
|
|
export class AddonsModule {}
|