@cryptiklemur/lattice 1.25.1 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import { homedir } from "node:os";
10
10
  import { sendTo, broadcast } from "../ws/broadcast";
11
11
  import { syncSessionToPeers } from "../mesh/session-sync";
12
12
  import { resolveSkillContent } from "../handlers/skills";
13
+ import { getPluginMcpServers } from "../handlers/plugins";
13
14
  import { guessContextWindow, getSessionTitle, renameSession, listSessions } from "./session";
14
15
  import { getLatticeHome, loadConfig } from "../config";
15
16
  import { log } from "../logger";
@@ -428,6 +429,11 @@ export function startChatStream(options: ChatStreamOptions): void {
428
429
  } catch {}
429
430
  }
430
431
 
432
+ var pluginMcpServers = getPluginMcpServers();
433
+ if (Object.keys(pluginMcpServers).length > 0) {
434
+ mcpServers = { ...mcpServers, ...pluginMcpServers };
435
+ }
436
+
431
437
  var projectMcpPath = join(cwd, ".mcp.json");
432
438
  if (existsSync(projectMcpPath)) {
433
439
  try {
@@ -4,9 +4,14 @@ import type {
4
4
  HistoryMessage,
5
5
  LatticeConfig,
6
6
  LoopStatus,
7
+ MarketplacePluginEntry,
8
+ PluginError,
7
9
  MarketplaceSkill,
8
10
  MessageBookmark,
9
11
  NodeInfo,
12
+ PluginDetails,
13
+ PluginInfo,
14
+ PluginMarketplaceInfo,
10
15
  ProjectInfo,
11
16
  ScheduledTask,
12
17
  SessionPreview,
@@ -454,6 +459,52 @@ export interface BookmarkRemoveMessage {
454
459
  id: string;
455
460
  }
456
461
 
462
+ export interface PluginListMessage {
463
+ type: "plugin:list";
464
+ }
465
+
466
+ export interface PluginMarketplacesMessage {
467
+ type: "plugin:marketplaces";
468
+ }
469
+
470
+ export interface PluginSearchMessage {
471
+ type: "plugin:search";
472
+ query: string;
473
+ marketplace?: string;
474
+ }
475
+
476
+ export interface PluginInstallMessage {
477
+ type: "plugin:install";
478
+ name: string;
479
+ marketplace: string;
480
+ }
481
+
482
+ export interface PluginUninstallMessage {
483
+ type: "plugin:uninstall";
484
+ name: string;
485
+ marketplace: string;
486
+ }
487
+
488
+ export interface PluginUpdateMessage {
489
+ type: "plugin:update";
490
+ name: string;
491
+ marketplace: string;
492
+ }
493
+
494
+ export interface PluginDetailsMessage {
495
+ type: "plugin:details";
496
+ name: string;
497
+ marketplace: string;
498
+ }
499
+
500
+ export interface PluginDiscoverMessage {
501
+ type: "plugin:discover";
502
+ }
503
+
504
+ export interface PluginErrorsMessage {
505
+ type: "plugin:errors";
506
+ }
507
+
457
508
  export type ClientMessage =
458
509
  | SessionCreateMessage
459
510
  | SessionActivateMessage
@@ -516,7 +567,16 @@ export type ClientMessage =
516
567
  | BookmarkListMessage
517
568
  | BookmarkAddMessage
518
569
  | BookmarkRemoveMessage
519
- | BudgetOverrideMessage;
570
+ | BudgetOverrideMessage
571
+ | PluginListMessage
572
+ | PluginMarketplacesMessage
573
+ | PluginSearchMessage
574
+ | PluginInstallMessage
575
+ | PluginUninstallMessage
576
+ | PluginUpdateMessage
577
+ | PluginDetailsMessage
578
+ | PluginDiscoverMessage
579
+ | PluginErrorsMessage;
520
580
 
521
581
  export interface SessionListMessage {
522
582
  type: "session:list";
@@ -859,6 +919,58 @@ export interface BookmarkListResultMessage {
859
919
  bookmarks: MessageBookmark[];
860
920
  }
861
921
 
922
+ export interface PluginListResultMessage {
923
+ type: "plugin:list_result";
924
+ plugins: PluginInfo[];
925
+ }
926
+
927
+ export interface PluginMarketplacesResultMessage {
928
+ type: "plugin:marketplaces_result";
929
+ marketplaces: PluginMarketplaceInfo[];
930
+ }
931
+
932
+ export interface PluginSearchResultMessage {
933
+ type: "plugin:search_result";
934
+ query: string;
935
+ plugins: MarketplacePluginEntry[];
936
+ count: number;
937
+ error?: string;
938
+ }
939
+
940
+ export interface PluginInstallResultMessage {
941
+ type: "plugin:install_result";
942
+ success: boolean;
943
+ message?: string;
944
+ }
945
+
946
+ export interface PluginUninstallResultMessage {
947
+ type: "plugin:uninstall_result";
948
+ success: boolean;
949
+ message?: string;
950
+ }
951
+
952
+ export interface PluginUpdateResultMessage {
953
+ type: "plugin:update_result";
954
+ success: boolean;
955
+ message?: string;
956
+ }
957
+
958
+ export interface PluginDetailsResultMessage {
959
+ type: "plugin:details_result";
960
+ plugin: PluginDetails | null;
961
+ error?: string;
962
+ }
963
+
964
+ export interface PluginDiscoverResultMessage {
965
+ type: "plugin:discover_result";
966
+ plugins: MarketplacePluginEntry[];
967
+ }
968
+
969
+ export interface PluginErrorsResultMessage {
970
+ type: "plugin:errors_result";
971
+ errors: PluginError[];
972
+ }
973
+
862
974
  export type ServerMessage =
863
975
  | SessionListMessage
864
976
  | SessionCreatedMessage
@@ -926,7 +1038,16 @@ export type ServerMessage =
926
1038
  | SessionPreviewMessage
927
1039
  | BookmarkListResultMessage
928
1040
  | BudgetStatusMessage
929
- | BudgetExceededMessage;
1041
+ | BudgetExceededMessage
1042
+ | PluginListResultMessage
1043
+ | PluginMarketplacesResultMessage
1044
+ | PluginSearchResultMessage
1045
+ | PluginInstallResultMessage
1046
+ | PluginUninstallResultMessage
1047
+ | PluginUpdateResultMessage
1048
+ | PluginDetailsResultMessage
1049
+ | PluginDiscoverResultMessage
1050
+ | PluginErrorsResultMessage;
930
1051
 
931
1052
  export interface BudgetStatusMessage {
932
1053
  type: "budget:status";
@@ -185,3 +185,62 @@ export interface LoopStatus {
185
185
  finishedAt: number | null;
186
186
  }
187
187
 
188
+ export interface PluginInfo {
189
+ name: string;
190
+ marketplace: string;
191
+ key: string;
192
+ version: string;
193
+ scope: string;
194
+ installPath: string;
195
+ installedAt: string;
196
+ lastUpdated: string;
197
+ gitCommitSha: string;
198
+ description: string;
199
+ skillCount: number;
200
+ hookCount: number;
201
+ ruleCount: number;
202
+ installs?: number;
203
+ }
204
+
205
+ export interface PluginMarketplaceInfo {
206
+ name: string;
207
+ source: { source: string; repo: string };
208
+ installLocation: string;
209
+ lastUpdated: string;
210
+ }
211
+
212
+ export interface PluginDetails {
213
+ name: string;
214
+ marketplace: string;
215
+ version: string;
216
+ description: string;
217
+ author?: { name: string; email?: string };
218
+ homepage?: string;
219
+ license?: string;
220
+ keywords?: string[];
221
+ skills: Array<{ name: string; description: string }>;
222
+ hooks: Record<string, unknown>;
223
+ rules: string[];
224
+ installPath: string;
225
+ installedAt: string;
226
+ lastUpdated: string;
227
+ gitCommitSha: string;
228
+ }
229
+
230
+ export interface PluginError {
231
+ key: string;
232
+ name: string;
233
+ marketplace: string;
234
+ errors: string[];
235
+ }
236
+
237
+ export interface MarketplacePluginEntry {
238
+ name: string;
239
+ marketplace: string;
240
+ description: string;
241
+ author?: { name: string; email?: string };
242
+ installed: boolean;
243
+ installedVersion?: string;
244
+ installs?: number;
245
+ }
246
+
@@ -14,7 +14,7 @@ export type McpServerConfig =
14
14
  | { type: "sse"; url: string; headers?: Record<string, string> };
15
15
 
16
16
  export type ProjectSettingsSection =
17
- | "general" | "claude" | "environment" | "mcp" | "skills" | "rules" | "permissions" | "memory" | "notifications";
17
+ | "general" | "claude" | "environment" | "mcp" | "skills" | "plugins" | "rules" | "permissions" | "memory" | "notifications";
18
18
 
19
19
  export interface ProjectSettings {
20
20
  title: string;
@@ -30,6 +30,7 @@ export interface ProjectSettings {
30
30
  mcpServers: Record<string, McpServerConfig>;
31
31
  rules: Array<{ filename: string; content: string }>;
32
32
  skills: Array<{ name: string; description: string; path: string }>;
33
+ disabledPlugins: string[];
33
34
  global: {
34
35
  claudeMd: string;
35
36
  defaultModel: string;