@magic-ingredients/tiny-brain-local 0.20.0 → 0.20.1
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.
- package/dist/core/mcp-server.d.ts.map +1 -1
- package/dist/core/mcp-server.js +1 -0
- package/dist/services/dashboard-launcher.service.d.ts +1 -0
- package/dist/services/dashboard-launcher.service.d.ts.map +1 -1
- package/dist/services/dashboard-launcher.service.js +4 -0
- package/dist/tools/dashboard/dashboard.tool.d.ts +14 -0
- package/dist/tools/dashboard/dashboard.tool.d.ts.map +1 -0
- package/dist/tools/dashboard/dashboard.tool.js +34 -0
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +4 -0
- package/dist/types/local-context.d.ts +2 -0
- package/dist/types/local-context.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/core/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0BH,OAAO,KAAK,EAA4B,QAAQ,EAAkC,MAAM,oCAAoC,CAAC;AAE7H,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAQ5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;KACrB,CAAC;CACH;AAED;;GA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OAEG;IACH,oBAAoB,IAAI,iBAAiB,GAAG,IAAI;IAIhD;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAsBjC;;;;;;;OAOG;YACW,sBAAsB;IA+DpC;;OAEG;YACW,iBAAiB;IAW/B;;;OAGG;YACW,oBAAoB;IA6BlC;;OAEG;YACW,oBAAoB;IAwGlC;;;;;;OAMG;YACW,yBAAyB;IA+CvC;;OAEG;YACW,kBAAkB;IAsBhC;;OAEG;YACW,wBAAwB;IA8BtC;;OAEG;YACW,mBAAmB;IA8BjC;;OAEG;IACG,OAAO,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAiBjB,eAAe;YAMf,cAAc;YAgGd,iBAAiB;YAMjB,eAAe;YAqEf,iBAAiB;IAS/B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAoB7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAkD7B"}
|
package/dist/core/mcp-server.js
CHANGED
|
@@ -549,6 +549,7 @@ export class MCPServer {
|
|
|
549
549
|
activePersona,
|
|
550
550
|
authToken: this.authToken,
|
|
551
551
|
config: this.config,
|
|
552
|
+
dashboardLauncher: this.dashboardLauncher ?? undefined,
|
|
552
553
|
updateActivePersona: (persona) => {
|
|
553
554
|
const newPersonaId = persona?.id;
|
|
554
555
|
this.activePersona = newPersonaId;
|
|
@@ -15,6 +15,7 @@ export declare class DashboardLauncher {
|
|
|
15
15
|
private server;
|
|
16
16
|
start(context: RequestContext, options?: DashboardOptions): Promise<DashboardStartResult>;
|
|
17
17
|
stop(): Promise<void>;
|
|
18
|
+
restart(context: RequestContext, options?: DashboardOptions): Promise<DashboardStartResult>;
|
|
18
19
|
isRunning(): boolean;
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=dashboard-launcher.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-launcher.service.d.ts","sourceRoot":"","sources":["../../src/services/dashboard-launcher.service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAa;IAErB,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAc7F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard-launcher.service.d.ts","sourceRoot":"","sources":["../../src/services/dashboard-launcher.service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAa;IAErB,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAc7F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAOrB,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKrG,SAAS,IAAI,OAAO;CAGrB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ToolArguments, type ToolResult } from '../index.js';
|
|
2
|
+
import type { RequestContext } from '../../types/request-context.js';
|
|
3
|
+
import type { Tool as MCPTool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Dashboard Tool - Restart the dashboard server
|
|
6
|
+
*
|
|
7
|
+
* Developer maintenance tool for force-reloading the dashboard,
|
|
8
|
+
* e.g. after rebuilding packages.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DashboardTool {
|
|
11
|
+
static getToolDefinition(): MCPTool;
|
|
12
|
+
static execute(_args: ToolArguments, context: RequestContext): Promise<ToolResult>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=dashboard.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/dashboard/dashboard.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,MAAM,CAAC,iBAAiB,IAAI,OAAO;WAatB,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;CAiBzF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createErrorResult, createSuccessResult } from '../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard Tool - Restart the dashboard server
|
|
4
|
+
*
|
|
5
|
+
* Developer maintenance tool for force-reloading the dashboard,
|
|
6
|
+
* e.g. after rebuilding packages.
|
|
7
|
+
*/
|
|
8
|
+
export class DashboardTool {
|
|
9
|
+
static getToolDefinition() {
|
|
10
|
+
return {
|
|
11
|
+
name: 'dev_restart_dashboard',
|
|
12
|
+
description: 'Restart the dashboard server. Developer maintenance tool — only needed to force a reload of the dashboard (e.g. after rebuilding packages).',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {},
|
|
16
|
+
required: [],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static async execute(_args, context) {
|
|
21
|
+
const localContext = context;
|
|
22
|
+
const launcher = localContext.dashboardLauncher;
|
|
23
|
+
if (!launcher) {
|
|
24
|
+
return createErrorResult('Dashboard launcher is not available. The dashboard may not have been started.');
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const result = await launcher.restart(context, {});
|
|
28
|
+
return createSuccessResult(`Dashboard restarted successfully at ${result.url}`);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
return createErrorResult(`Failed to restart dashboard: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/tools/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/tools/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;IAuC5B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;CAoB9D;AAGD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,8BAAqC,CAAC;AAChF,eAAO,MAAM,eAAe,gBAAyD,CAAC"}
|
|
@@ -15,6 +15,7 @@ import { StrategyTool } from './strategy/strategy.tool.js';
|
|
|
15
15
|
import { AnalyseTool } from './analyse.tool.js';
|
|
16
16
|
import { QualityTool } from './quality/quality.tool.js';
|
|
17
17
|
import { ConfigTool } from './config/config.tool.js';
|
|
18
|
+
import { DashboardTool } from './dashboard/dashboard.tool.js';
|
|
18
19
|
export class ToolRegistry {
|
|
19
20
|
/**
|
|
20
21
|
* Get all available tool definitions from all tools
|
|
@@ -36,6 +37,8 @@ export class ToolRegistry {
|
|
|
36
37
|
QualityTool.getToolDefinition(),
|
|
37
38
|
// Config tool - manages preferences with reactive agent sync
|
|
38
39
|
ConfigTool.getToolDefinition(),
|
|
40
|
+
// Dashboard tool - restart dashboard server (dev maintenance)
|
|
41
|
+
DashboardTool.getToolDefinition(),
|
|
39
42
|
// Response tools (disabled for later release)
|
|
40
43
|
// AnalyseRequestTool.getToolDefinition(),
|
|
41
44
|
// ValidateResponseTool.getToolDefinition(),
|
|
@@ -63,6 +66,7 @@ export class ToolRegistry {
|
|
|
63
66
|
update: UpdateTool,
|
|
64
67
|
quality: QualityTool,
|
|
65
68
|
config: ConfigTool,
|
|
69
|
+
dev_restart_dashboard: DashboardTool,
|
|
66
70
|
};
|
|
67
71
|
return toolMap[name];
|
|
68
72
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { RequestContext } from '@magic-ingredients/tiny-brain-core';
|
|
7
7
|
import type { AuthToken } from '../services/remote/auth-token-service.js';
|
|
8
|
+
import type { DashboardLauncher } from '../services/dashboard-launcher.service.js';
|
|
8
9
|
export interface LocalRequestContext extends RequestContext {
|
|
9
10
|
authToken?: AuthToken;
|
|
10
11
|
config?: {
|
|
@@ -13,5 +14,6 @@ export interface LocalRequestContext extends RequestContext {
|
|
|
13
14
|
clientSecret?: string;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
17
|
+
dashboardLauncher?: DashboardLauncher;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=local-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-context.d.ts","sourceRoot":"","sources":["../../src/types/local-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"local-context.d.ts","sourceRoot":"","sources":["../../src/types/local-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IAEzD,SAAS,CAAC,EAAE,SAAS,CAAC;IAGtB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;IAGF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ingredients/tiny-brain-local",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "MCP server for Tiny Brain AI assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dxt:init": "cd dxt && dxt init"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@magic-ingredients/tiny-brain-core": "^0.20.
|
|
34
|
+
"@magic-ingredients/tiny-brain-core": "^0.20.1",
|
|
35
35
|
"@magic-ingredients/tiny-brain-dashboard": "file:../tiny-brain-dashboard",
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.0.6",
|
|
37
37
|
"chalk": "^5.3.0",
|