Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ target/
*.local
java/project.properties
.admin/
.DS_Store
**/.DS_Store
**/.env
**/.env.*
!client/.env
.history/

Expand Down
24 changes: 12 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
},
"[java]": {
"editor.defaultFormatter": null,
"editor.codeActionsOnSave": {}
},
"editor.defaultFormatter": "biomejs.biome"
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
},
"[java]": {
"editor.defaultFormatter": null,
"editor.codeActionsOnSave": {}
},
"editor.defaultFormatter": "biomejs.biome"
}
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand Down
Binary file removed client/.DS_Store
Binary file not shown.
5 changes: 2 additions & 3 deletions client/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file contains environment variables for the SEMOSS client application
ENDPOINT="http://localhost:9091/"
ENDPOINT="http://localhost:9090/"
MODULE="/Monolith"
# CLIENT_APP="your-app-id" # In .env.local, this should be set to your specific app ID
HOME_PAGE_ENABLED=false
APP=b45a88db-7a31-4e6c-a1c7-60846426f3b1
# APP="your-app-id" # In .env.local, this should be set to your specific app ID
40 changes: 20 additions & 20 deletions client/components.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/globals.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"registries": {}
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/globals.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"registries": {}
}
14 changes: 7 additions & 7 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.5",
"@mui/x-data-grid": "^8.17.0",
"@mui/x-date-pickers": "^8.17.0",
"@mui/x-data-grid": "^8.19.0",
"@mui/x-date-pickers": "^8.19.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-aspect-ratio": "^1.1.8",
Expand Down Expand Up @@ -49,17 +49,17 @@
"postcss": "^8.5.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.9.5",
"react-router-dom": "^7.9.6",
"tailwindcss": "^4.1.17",
"tailwind-merge": "^3.4.0",
"tw-animate-css": "^1.4.0"
},
"devDependencies": {
"@types/node": "^24.10.0",
"@types/react": "^18.3.26",
"@types/node": "^24.10.1",
"@types/react": "^18.3.27",
"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react": "^5.1.0",
"@vitejs/plugin-react": "^5.1.1",
"typescript": "^5.9.3",
"vite": "^7.2.2"
"vite": "^7.2.4"
}
}
1,782 changes: 824 additions & 958 deletions client/pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions client/src/components/base/MainNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const navigationButtons: {
path: string;
text: string;
}[] = [
{
path: "/",
text: "Home",
},
];
{
path: "/",
text: "Home",
},
];

/**
* The main navigation bar allowing users to move between pages, if they are authorized.
Expand Down
5 changes: 0 additions & 5 deletions client/src/components/base/MessageSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const MessageSnackbar = ({
return <AlertCircle className="h-4 w-4" />;
case "warning":
return <AlertTriangle className="h-4 w-4" />;
case "info":
default:
return <Info className="h-4 w-4" />;
}
Expand All @@ -63,9 +62,6 @@ export const MessageSnackbar = ({
switch (severity) {
case "error":
return "destructive" as const;
case "success":
case "warning":
case "info":
default:
return "default" as const;
}
Expand All @@ -79,7 +75,6 @@ export const MessageSnackbar = ({
return "border-yellow-500/50 text-yellow-600 bg-yellow-50 dark:border-yellow-500 [&>svg]:text-yellow-600";
case "info":
return "border-blue-500/50 text-blue-600 bg-blue-50 dark:border-blue-500 [&>svg]:text-blue-600";
case "error":
default:
return "";
}
Expand Down
38 changes: 36 additions & 2 deletions client/src/contexts/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export interface AppContextType {
pixelString: string,
successMessage?: string,
) => Promise<T>;
runMCPTool: (
toolName: string,
toolInput?: Record<string, unknown>,
successMessage?: string,
) => Promise<string>;
login: (username: string, password: string) => Promise<boolean>;
logout: () => Promise<boolean>;
userLoginName: string;
Expand Down Expand Up @@ -63,7 +68,7 @@ export const useAppContext = (): AppContextType => {
export const AppContextProvider = ({ children }: PropsWithChildren) => {
// Get the current state of the current insight
const { actions, isReady, system, insightId: id } = useInsight();
const [insightId, setInsightId] = useState(id);
const [insightId] = useState(id);

// New Insight for tool response
const insight = useMemo(() => {
Expand Down Expand Up @@ -91,7 +96,11 @@ export const AppContextProvider = ({ children }: PropsWithChildren) => {
* Functions
*/

// Function to run a pixel and return the result. Opens the snackbar if there is an error.
/**
* Run pixel code
* @param pixelString - the pixel string to run
* @param successMessage - optional parameter to show a success message
*/
const runPixel = useCallback(
async <T,>(pixelString: string, successMessage?: string) => {
try {
Expand Down Expand Up @@ -138,6 +147,30 @@ export const AppContextProvider = ({ children }: PropsWithChildren) => {
[insightId],
);

/**
* Run a MCP tool
* @param name - name of the tool
* @param parameters - parameters to pass to the tool
*/
const runMCPTool = useCallback(
async (name: string, parameters?: Record<string, unknown>) => {
try {
const response = await actions.runMCPTool(name, parameters);
if (!response.output)
throw new Error("No output from MCP tool");
return response.output;
} catch (error) {
setMessageSnackbarProps({
open: true,
message: `${error.message ?? "Error during operation"}`,
severity: "error",
});
throw error;
}
},
[actions],
);

// Allow users to log in, and grab their name when they do
const login = useCallback(
async (username: string, password: string) => {
Expand Down Expand Up @@ -275,6 +308,7 @@ export const AppContextProvider = ({ children }: PropsWithChildren) => {
<AppContext.Provider
value={{
runPixel,
runMCPTool,
exampleStateData,
isAppDataLoading,
messageSnackbarProps,
Expand Down
1 change: 0 additions & 1 deletion client/src/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface ImportMetaEnv {
readonly APP: string;
readonly CLIENT_ACCESS_KEY: string;
readonly CLIENT_SECRET_KEY: string;
readonly CLIENT_APP: string;
readonly HOME_PAGE_ENABLED: string;
// more env variables...
}
Expand Down
6 changes: 3 additions & 3 deletions client/src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
return twMerge(clsx(inputs));
}
2 changes: 1 addition & 1 deletion client/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** biome-ignore-all lint/suspicious/noExplicitAny: <explanation> */
/** biome-ignore-all lint/suspicious/noExplicitAny: TODO */
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { useAppContext } from "@/contexts";
Expand Down
3 changes: 1 addition & 2 deletions client/src/pages/layouts/MCPLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Navigate, Outlet, useLocation } from "react-router-dom";
import { LoadingScreen } from "@/components";
import { useAppContext } from "@/contexts";
import { HomePage } from "../HomePage";

// Function to process tool name by removing content before first underscore
const getProcessedToolName = (toolName: string) => {
Expand All @@ -19,7 +18,7 @@ const getProcessedToolName = (toolName: string) => {
export const MCPLayout = () => {
// Get the curent route, so that if we are trying to log the user in, we can take them to where they were trying to go
const { pathname } = useLocation();
const { isAppDataLoading, tool, tools } = useAppContext();
const { isAppDataLoading, tool } = useAppContext();

// If the app data is still loading, show a loading screen
if (isAppDataLoading) {
Expand Down
41 changes: 41 additions & 0 deletions java/src/reactors/examples/OpenMCPAppReactor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package reactors.examples;

import prerna.sablecc2.om.PixelDataType;
import prerna.sablecc2.om.nounmeta.NounMetadata;
import reactors.AbstractProjectReactor;

/**
* Dummy reactor that allows Playground to open the MCP App interface.
*
* @see {@link AbstractProjectReactor} for base reactor functionality
*/
public class OpenMCPAppReactor extends AbstractProjectReactor {

/** Constructs a OpenMCPAppReactor. This constructor does not expect any input parameters. */
public OpenMCPAppReactor() {
// list of keys the reactor is expecting
this.keysToGet = new String[] {};

// 1 for required keys, 0 for optional
this.keyRequired = new int[] {};
}

/**
* Executes the main logic of the OpenMCPAppReactor to return a default message. This method
* currently serves as a placeholder and returns a constant string indicating that the
* auto-execute response has not yet been implemented.
*
* @return A {@link NounMetadata} containing the greeting message as a constant string
*/
@Override
protected NounMetadata doExecute() {
return new NounMetadata(
"This MCP tool's auto-execute response has not yet been implemented.",
PixelDataType.CONST_STRING);
}

@Override
public String getReactorDescription() {
return "This tool allows the user to interact with the SEMOSS Template application.";
}
}
17 changes: 17 additions & 0 deletions mcp/pixel_mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"_meta": { "last_modified_date": "2025-11-24" },
"tools": [
{
"inputSchema": {
"type": "object",
"title": "OpenMCPApp_Arguments",
"properties": {},
"required": []
},
"name": "OpenMCPApp",
"description": "This tool allows the user to interact with the SEMOSS Template application.",
"_meta": { "SMSS_MCP_EXECUTION": "ask" },
"title": "Open MCP App"
}
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"javadoc": "mvn clean javadoc:javadoc && mvn site && pnpm exec http-server target/site/apidocs -p 1227 -a localhost -o"
},
"devDependencies": {
"@biomejs/biome": "2.3.4",
"@biomejs/biome": "2.3.7",
"http-server": "^14.1.1",
"husky": "^9.1.7",
"lint-staged": "^16.2.6"
"lint-staged": "^16.2.7"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx,json,html,css}": [
Expand Down
Loading