This repository now supports internal, manifest-based plugins without introducing external code execution.
- Server-side plugin manager with:
- Manifest registration
- Optional route mounting
- Event hooks
- Public plugin manifest endpoint:
GET /api/plugins(authenticated)
- Built-in example plugin:
sales-workbench- API routes under
/api/plugin-modules/sales-workbench/*
- Client-side plugin loading:
- Dynamic sidebar entries from plugin manifests
- Generic plugin workspace route:
/plugins/:pluginId
- Server:
server/src/plugins/types.tsserver/src/plugins/manager.tsserver/src/plugins/builtin/*server/src/routes/plugins.ts
- Client:
client/src/types/plugins.tsclient/src/stores/pluginStore.tsclient/src/pages/PluginWorkspacePage.tsx
message.createdproject.updatedmodule.run.startedmodule.run.completedmodule.run.failed
Current emitters are wired into socket and API write paths so plugins can react centrally.
Module lifecycle events are emitted by moduleRuntimeService when plugin modules start, complete, or fail.
Triologue now includes a room-native module runtime contract for internal plugins:
PluginModuleInstance- Stable binding for
pluginId + moduleKey + projectId + roomId
- Stable binding for
PluginModuleRun- Immutable execution record with status/input/output/error metadata
PluginTaskSync- Idempotent task mapping (
projectId + syncKey) to avoid duplicate tasks across repeated runs
- Idempotent task mapping (
The runtime service also posts SYSTEM room cards (aiContext.type = module.run.card) so each run is visible in the linked communication room.
sales-workbench screening now evaluates real project signals before task orchestration:
- Supports dedicated project attachments (
project_attachments) as primary screening input. - Reads linked project and task attachments for text-based formats (
txt,md,csv,json). - Extracts deadline/must/risk keyword signals plus date candidates.
- Includes recent room message signal scanning.
- Produces run output with
screeningSignals,findings, and compact evidence snippets. - Creates follow-up tasks with priorities based on detected gaps (e.g., unsupported attachments/manual PDF review).
- Adds handoff endpoint to publish agent-release instructions into the linked project room.
Optional environment variables:
TRIOLOGUE_ENABLED_PLUGINS=id1,id2- If set, only these plugin IDs are active.
TRIOLOGUE_DISABLED_PLUGINS=id3,id4- Excludes listed plugin IDs.
If neither variable is set, plugins with enabledByDefault !== false are active.
- Create a plugin file in
server/src/plugins/builtin/. - Export a
TriologuePluginwith a uniquemanifest.id. - Optionally add route mounts via
registerRoutes. - Optionally handle events via
onEvent. - Register it in
server/src/plugins/builtin/index.ts. - (Optional) Add
ui.navItemsentries in the manifest to expose navigation in the client.
This phase is intentionally internal and safe by default:
- No third-party runtime plugin execution.
- No remote plugin registry.
- No dynamic code loading from untrusted sources.
Phase 2 can add signed external plugins, richer capability enforcement, and versioned compatibility checks.