mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 14:06:27 +00:00
1727732841
A new manifest capability poiCategories (up to 4, icon from an allow-list, strict #rrggbb color) and the hook poiCategoryProvider.getPois behind the hook:poi-category-provider permission. GET /api/plugin-pois in the plugin contributions module answers them in the /api/maps/pois shape, with search_plugin_pois as the MCP twin. plugin: ids no longer count as Google place ids. SDK 1.8.0 carries the types, validation and docs. On the map, one hook merges the built-in categories with the ones active plugins declare, and the pill shows the plugin chips after a divider on desktop and phone, scrolling sideways instead of shrinking a chip below its touch target. A plugin chip searches through a repo that refuses offline and parses the answer strictly. Its pins, on Leaflet and GL, use the category's own icon and color, both checked again before they reach any markup, and the hover card lists the plugin's details as escaped text. A plugin POI can be added as a place like any other. The admin panels on desktop and phone show a chip for the new permission and the categories a plugin would add, from one shared module. Addresses discussion #1781.
96 lines
2.7 KiB
TypeScript
96 lines
2.7 KiB
TypeScript
// GENERATED — do not edit by hand.
|
|
// Source: server/src/nest/plugins/protocol/envelope.ts + server/src/plugin-event-sink.ts
|
|
// + shared/src/plugins/plugin-poi-facts.ts
|
|
// Regenerate: node --import tsx server/scripts/gen-plugin-facts.ts
|
|
|
|
/** Widened on purpose so client callers can .includes() with a plain string. */
|
|
export const PLUGIN_PERMISSIONS: readonly string[] = [
|
|
'db:own',
|
|
'db:read:trips',
|
|
'db:read:users',
|
|
'db:read:costs',
|
|
'db:read:packing',
|
|
'db:write:packing',
|
|
'db:read:files',
|
|
'db:read:files:content',
|
|
'db:write:files',
|
|
'db:read:collab',
|
|
'db:write:collab',
|
|
'db:write:members',
|
|
'db:create:trips',
|
|
'db:read:journal',
|
|
'db:read:atlas',
|
|
'rates:read',
|
|
'db:read:vacay',
|
|
'db:read:daynotes',
|
|
'db:read:collections',
|
|
'db:write:collections',
|
|
'db:write:atlas',
|
|
'db:write:vacay',
|
|
'db:write:journal',
|
|
'db:read:categories',
|
|
'db:read:tags',
|
|
'db:write:tags',
|
|
'db:read:todos',
|
|
'db:write:todos',
|
|
'weather:read',
|
|
'db:write:daynotes',
|
|
'db:write:costs',
|
|
'db:write:places',
|
|
'db:write:days',
|
|
'db:write:itinerary',
|
|
'db:write:trips',
|
|
'db:write:reservations',
|
|
'db:write:accommodations',
|
|
'db:meta',
|
|
'ws:broadcast:trip',
|
|
'ws:broadcast:user',
|
|
'hook:photo-provider',
|
|
'hook:calendar-source',
|
|
'hook:place-detail-provider',
|
|
'hook:search-provider',
|
|
'hook:poi-category-provider',
|
|
'hook:trip-warning-provider',
|
|
'hook:table-contributor',
|
|
'hook:map-marker-provider',
|
|
'hook:map-layer-provider',
|
|
'hook:route-provider',
|
|
'hook:day-schedule-provider',
|
|
'hook:day-tint-provider',
|
|
'hook:pdf-section-provider',
|
|
'hook:atlas-layer-provider',
|
|
'hook:journal-entry-provider',
|
|
'hook:trip-card-provider',
|
|
'hook:notification-channel',
|
|
'hook:user-data',
|
|
'events:subscribe',
|
|
'jobs:run',
|
|
'http:outbound',
|
|
'notify:send',
|
|
'ai:invoke',
|
|
'oauth:client',
|
|
'geolocation:read',
|
|
'mcp:tools',
|
|
];
|
|
|
|
export const PLUGIN_HOOK_PERMISSION: Readonly<Record<string, string>> = {
|
|
photoProvider: 'hook:photo-provider',
|
|
calendarSource: 'hook:calendar-source',
|
|
placeDetailProvider: 'hook:place-detail-provider',
|
|
searchProvider: 'hook:search-provider',
|
|
poiCategoryProvider: 'hook:poi-category-provider',
|
|
warningProvider: 'hook:trip-warning-provider',
|
|
tableContributor: 'hook:table-contributor',
|
|
mapMarkerProvider: 'hook:map-marker-provider',
|
|
mapLayerProvider: 'hook:map-layer-provider',
|
|
routeProvider: 'hook:route-provider',
|
|
dayScheduleProvider: 'hook:day-schedule-provider',
|
|
dayTintProvider: 'hook:day-tint-provider',
|
|
pdfSectionProvider: 'hook:pdf-section-provider',
|
|
atlasLayerProvider: 'hook:atlas-layer-provider',
|
|
journalEntryProvider: 'hook:journal-entry-provider',
|
|
tripCardProvider: 'hook:trip-card-provider',
|
|
notificationChannel: 'hook:notification-channel',
|
|
mcpToolProvider: 'mcp:tools',
|
|
};
|