diff --git a/.dockerignore b/.dockerignore index 87cad33ae3..7d9aa828c4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,10 +14,12 @@ docker-compose.yml # Doesn't come inside this image interface sc-web -kb +knowledge-base repo.path build bin +install +ConanPresets.json # Docs docs diff --git a/.github/workflows/style.yml b/.github/workflows/check_style.yml similarity index 51% rename from .github/workflows/style.yml rename to .github/workflows/check_style.yml index 391eee9358..a906ea9829 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/check_style.yml @@ -31,4 +31,61 @@ jobs: # Setting this input to true will check all Pull Request commits checkAllCommitMessages: true # optional, default is false # you must provide GITHUB_TOKEN to this input if checkAllCommitMessages is true - accessToken: ${{ secrets.GITHUB_TOKEN }} # optional, default is false + accessToken: ${{ secrets.GITHUB_TOKEN }} + + check_formatting: + name: Check formatting + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Restore ccache caches + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }} + + - name: Conan cache + uses: actions/cache@v4 + with: + path: ~/.conan/data + key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }} + + - name: apt cache + uses: actions/cache@v4 + with: + path: | + /var/cache/apt/ + /var/lib/apt/ + key: apt-${{ runner.os }}-${{ github.job }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Set up pipx + run: | + python -m pip install --user pipx + python -m pipx ensurepath + + - name: Set up Conan + run: | + pipx install cmake + pipx install conan + + - name: Install compilers + run: sudo apt install build-essential ninja-build ccache + + - name: Set Conan remote + run: | + conan profile detect + conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-library + + - name: Install sc-machine + run: conan install . --build=missing + + - name: Checking the code with clang + run: | + ./scripts/clang/check_formatting.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fab80ad83..be2fc7c3a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,97 @@ on: workflow_dispatch: jobs: - build: + tests-conan: + uses: ./.github/workflows/test_conan.yml + build-conan: + needs: tests-conan + strategy: + fail-fast: true + matrix: + config: + - { os: ubuntu-22.04, cc: "gcc", cxx: "g++" } + - { os: macos-14, cc: "clang", cxx: "clang++" } + + runs-on: ${{ matrix.config.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Restore ccache caches + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }} + + - name: Conan cache + uses: actions/cache@v4 + with: + path: ~/.conan/data + key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }} + + - name: apt cache + uses: actions/cache@v4 + if: runner.os == 'Linux' + with: + path: | + /var/cache/apt/ + /var/lib/apt/ + key: apt-${{ runner.os }}-${{ github.job }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Set up pipx + run: | + python -m pip install --user pipx + python -m pipx ensurepath + + - name: Set up Conan + run: | + pipx install cmake + pipx install conan + + - name: Install compilers (Ubuntu) + if: runner.os == 'Linux' + run: sudo apt install build-essential ninja-build ccache + + - name: Install compilers (macOS) + if: runner.os == 'macOS' + run: brew install cmake ninja ccache + + - name: Set Conan remote + run: | + conan profile detect + conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-library + + - name: Install C++ problem solver dependencies + run: conan install . --build=missing + + - name: Build NIKA + id: run_cmake + run: | + cmake --preset release-conan + cmake --build --preset release + + - name: Create archive + run: | + cd ./build/Release + cpack -G TGZ + + - name: Upload archive + uses: actions/upload-artifact@v4 + with: + name: nika-${{ matrix.config.os }}-${{ github.ref_name }} + path: ./build/Release/nika-*.tar.gz + + changelog: + needs: build-conan runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Read changelog id: changelog_reader @@ -22,11 +108,19 @@ jobs: version: ${{ github.ref_name }} path: docs/changelog.md + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: nika-* + path: artifacts + - name: Release uses: softprops/action-gh-release@v1 with: body: ${{ steps.changelog_reader.outputs.changes }} name: 'v${{ github.ref_name }}' + files: | + artifacts/**/*.tar.gz problem_solver_docker: runs-on: ubuntu-latest diff --git a/.github/workflows/test_conan.yml b/.github/workflows/test_conan.yml new file mode 100644 index 0000000000..016010cdfb --- /dev/null +++ b/.github/workflows/test_conan.yml @@ -0,0 +1,81 @@ +name: Tests (Conan) + +on: + pull_request: + branches: [main] + workflow_call: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + run_tests: + name: Conan build + runs-on: ubuntu-24.04 + + strategy: + fail-fast: false + matrix: + config: + - { cc: "gcc", cxx: "g++" } + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Restore ccache caches + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }} + + - name: Conan cache + uses: actions/cache@v4 + with: + path: ~/.conan/data + key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }} + + - name: apt cache + uses: actions/cache@v4 + with: + path: | + /var/cache/apt/ + /var/lib/apt/ + key: apt-${{ runner.os }}-${{ github.job }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Set up pipx + run: | + python -m pip install --user pipx + python -m pipx ensurepath + + - name: Set up Conan + run: | + pipx install cmake + pipx install conan + + - name: Install compilers + run: sudo apt install build-essential ninja-build + + - name: Set Conan remote + run: | + conan profile detect + conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-library + + - name: Install C++ problem solver dependencies + run: conan install . --build=missing + + - name: Build NIKA with tests + id: run_cmake + run: | + cmake --preset release-with-tests-conan + cmake --build --preset release + + # TODO(NikitaZotov): test Python problem solver + + - name: Run NIKA tests + id: run_tests + run: cd build/Release && ctest -V diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index fdc9cc4779..0000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: CI - -on: - pull_request: - branches: [ main ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - install-n-lint: - name: Run tests - runs-on: ubuntu-22.04 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Restore build caches - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.job }} - - name: Update - run: | - ./scripts/install_submodules.sh - - name: Install Ubuntu dependencies - run: | - ./scripts/install_problem_solver_deps.sh - - name: Build problem solver - run: | - ./scripts/build_problem_solver.sh --tests - - name: Run cpp tests - run: | - ./scripts/run_cpp_tests.sh - - name: Install deps for Python tests - run: | - ./scripts/install_py_sc_server_deps.sh - - name: Run Python tests - run: | - ./scripts/run_py_tests.sh - - name: Build knowledge base - run: | - ./scripts/build_kb.sh diff --git a/.gitignore b/.gitignore index 111ed1a0ff..c9e06b4b73 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ cmake-build-release secret.txt kb.bin-tests repo +/ConanPresets.json .venv *.pyc @@ -17,9 +18,8 @@ repo .env% *.scs~ -ostis -ostis-web-platform kb.bin +install __pycache__ diff --git a/.gitmodules b/.gitmodules index b399eb9b24..13393888f4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,14 +1,6 @@ -[submodule "subsystems/scl-machine"] - path = subsystems/scl-machine - url = https://github.com/ostis-ai/scl-machine [submodule "sc-web"] path = sc-web url = https://github.com/ostis-ai/sc-web - branch = release/0.8.0 -[submodule "problem-solver/sc-machine"] - path = problem-solver/sc-machine - url = https://github.com/ostis-ai/sc-machine - branch = release/0.8.0 -[submodule "kb/ims.ostis.kb"] - path = kb/ims.ostis.kb - url = https://github.com/ostis-ai/ims.ostis.kb +[submodule "knowledge-base/ims.ostis.kb"] + path = knowledge-base/ims.ostis.kb + url = https://github.com/ostis-ai/ims.ostis.kb.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ecd5b55186..545550a0ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,41 +1,78 @@ -cmake_minimum_required(VERSION 3.11) -project(nika) -set(NIKA_ROOT ${CMAKE_CURRENT_LIST_DIR}) +cmake_minimum_required(VERSION 3.24) +set(CMAKE_CXX_STANDARD 17) +project(nika VERSION 0.2.0 LANGUAGES C CXX) +message(STATUS "Current project version: ${CMAKE_PROJECT_VERSION}") +cmake_policy(SET CMP0048 NEW) + +if(${WIN32}) + message(FATAL_ERROR "NIKA isn't supported on Windows OS.") +endif() + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + +if(DEFINED SC_EXTENSIONS_DIRECTORY) + message(STATUS "Provided extensions directory: ${SC_EXTENSIONS_DIRECTORY}") + file(MAKE_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) +else() + set(SC_EXTENSIONS_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/extensions) + file(MAKE_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) + message(STATUS "No extensions directory provided. Defaulting to: ${SC_EXTENSIONS_DIRECTORY}") +endif() -option(SC_BUILD_TESTS "Flag to build unit tests" OFF) option(SC_CLANG_FORMAT_CODE "Flag to add clangformat and clangformat_check targets" OFF) +option(SC_BUILD_TESTS "Flag to build unit tests" OFF) + +option(AUTO_CCACHE "Use ccache to speed up rebuilds" ON) + +if(${SC_BUILD_TESTS}) + include(CTest) + include(GoogleTest) + find_package(GTest REQUIRED) + include(${CMAKE_MODULE_PATH}/tests.cmake) +endif() + +if(${SC_CLANG_FORMAT_CODE}) + include(${CMAKE_MODULE_PATH}/ClangFormat.cmake) +endif() -set(PROBLEM_SOLVER_PATH "${CMAKE_CURRENT_LIST_DIR}/problem-solver") -set(SC_MACHINE_PATH "${PROBLEM_SOLVER_PATH}/sc-machine") -include("${SC_MACHINE_PATH}/CMakeLists.txt") -project_version(NIKA_PROJECT "0.1.0") - -# platform doesn't support multi-extensions. Have to put project binaries to sc-machine extensions -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) - -# for multi-config builds (e.g. msvc) -foreach(OUTPUT_CONFIG ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER ${OUTPUT_CONFIG} OUTPUT_CONFIG) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUT_CONFIG} ${SC_EXTENSIONS_DIRECTORY}) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUT_CONFIG} ${SC_EXTENSIONS_DIRECTORY}) -endforeach(OUTPUT_CONFIG CMAKE_CONFIGURATION_TYPES) - -macro(subdir_list result current_dir) - file(GLOB children RELATIVE ${current_dir} ${current_dir}/*) - set(dirlist "") - foreach(child ${children}) - if(IS_DIRECTORY ${current_dir}/${child}) - list(APPEND dirlist ${child}) - endif() - endforeach() - set(${result} ${dirlist}) -endmacro() - -set(SUBSYSTEMS_PATH "${CMAKE_CURRENT_LIST_DIR}/subsystems") -subdir_list(SUBDIRS ${SUBSYSTEMS_PATH}) - -foreach(SUBDIR ${SUBDIRS}) - add_subdirectory(${SUBSYSTEMS_PATH}/${SUBDIR}/problem-solver) -endforeach() +if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") +elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +endif() + +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM AND ${AUTO_CCACHE}) + message(STATUS "Using ${CCACHE_PROGRAM} as compiler launcher") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") +endif() + +set(CMAKE_FIND_PACKAGE_PREFER_CONFIG) + +include(GNUInstallDirs) + +message("CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") +message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") +message("Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, path: ${CMAKE_CXX_COMPILER}") + +# Set up dynamic linking paths for our own libraries +# For macOS, use @loader_path instead of $ORIGIN +if(APPLE) + set(CMAKE_INSTALL_RPATH "@loader_path;@loader_path/../lib;") +else() + set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../lib;") +endif() + +# Always use full RPATH +set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + +find_package(sc-machine REQUIRED) +find_package(scl-machine REQUIRED) add_subdirectory(problem-solver) + +include(${CMAKE_MODULE_PATH}/install.cmake) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..cbc9d43afc --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,42 @@ +{ + "version": 6, + "include": ["./ConanPresets.json"], + "configurePresets": [ + { + "name": "debug-conan", + "displayName": "Debug config (Conan)", + "description": "Debug config with tests (Conan dependencies used)", + "inherits": "conan-debug", + "installDir": "${sourceDir}/build/Debug/install", + "cacheVariables": { + "SC_BUILD_TESTS": true + } + }, + { + "name": "release-conan", + "displayName": "Release config (Conan)", + "description": "Release config (Conan dependencies used)", + "installDir": "${sourceDir}/build/Release/install", + "inherits": "conan-release" + }, + { + "name": "release-with-tests-conan", + "displayName": "Release config with tests (Conan)", + "description": "Release config with tests (Conan dependencies used)", + "inherits": "release-conan", + "cacheVariables": { + "SC_BUILD_TESTS": true + } + } + ], + "buildPresets": [ + { + "name": "debug", + "configurePreset": "debug-conan" + }, + { + "name": "release", + "configurePreset": "release-conan" + } + ] +} diff --git a/Dockerfile b/Dockerfile index f18c3ba19d..e44bde960e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,62 @@ -FROM ubuntu:focal as base -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=Europe/Moscow -# install dependencies -COPY ./scripts /tmp/scripts -COPY ./problem-solver/sc-machine/scripts /tmp/problem-solver/sc-machine/scripts -COPY ./problem-solver/sc-machine/requirements.txt /tmp/problem-solver/sc-machine/requirements.txt -RUN apt-get update && \ - apt-get install -y --no-install-recommends sudo ccache tini tzdata && \ - /tmp/scripts/install_problem_solver_deps.sh - -FROM base as builder +FROM ubuntu:noble AS base + ENV CCACHE_DIR=/ccache +USER root + +COPY scripts /nika/scripts +COPY conanfile.py /nika/conanfile.py +COPY CMakePresets.json /nika/CMakePresets.json +COPY CMakeLists.txt /nika/CMakeLists.txt +COPY requirements.txt /nika/requirements.txt + +# tini is an init system to forward interrupt signals properly +RUN apt update && apt install -y --no-install-recommends sudo tini curl ccache python3 python3-pip pipx cmake build-essential ninja-build + +# Install Conan +RUN pipx install conan && \ + pipx ensurepath + +FROM base AS devdeps +WORKDIR /nika + +SHELL ["/bin/bash", "-c"] +RUN python3 -m venv /nika/.venv && \ + source /nika/.venv/bin/activate && \ + pip3 install -r /nika/requirements.txt -RUN apt-get install -y --no-install-recommends git && \ - /tmp/scripts/install_problem_solver_deps.sh --dev +ENV PATH="/root/.local/bin:$PATH" +RUN conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-library && \ + conan profile detect && \ + conan install . --build=missing -COPY . /nika -WORKDIR /nika/scripts -RUN --mount=type=cache,target=/ccache/ ./build_problem_solver.sh -r +# Install sc-machine binaries +RUN curl -LO https://github.com/ostis-ai/sc-machine/releases/download/0.10.0/sc-machine-0.10.0-Linux.tar.gz && \ + mkdir -p install/sc-machine && tar -xvzf sc-machine-0.10.0-Linux.tar.gz -C install/sc-machine --strip-components 1 && \ + rm -rf sc-machine-0.10.0-Linux.tar.gz && rm -rf install/sc-machine/include -FROM base as final -COPY --from=builder /nika/problem-solver/sc-machine/scripts /nika/problem-solver/sc-machine/scripts -COPY --from=builder /nika/problem-solver/sc-machine/requirements.txt /nika/problem-solver/sc-machine/requirements.txt +# Install scl-machine libraries +RUN curl -LO https://github.com/NikitaZotov/scl-machine/releases/download/0.3.0/scl-machine-0.3.0-Linux.tar.gz && \ + mkdir -p install/scl-machine && tar -xvzf scl-machine-0.3.0-Linux.tar.gz -C install/scl-machine --strip-components 1 && \ + rm -rf scl-machine-0.3.0-Linux.tar.gz && rm -rf install/scl-machine/include + +FROM devdeps AS devcontainer +RUN apt install -y --no-install-recommends cppcheck valgrind gdb bash-completion ninja-build curl +ENTRYPOINT ["/bin/bash"] + +FROM devdeps AS builder +COPY . . +RUN --mount=type=cache,target=/ccache/ cmake --preset release-conan && cmake --build --preset release + +# Gathering all artifacts together +FROM devdeps AS final -COPY --from=builder /nika/bin /nika/bin COPY --from=builder /nika/scripts /nika/scripts -COPY --from=builder /nika/nika.ini /nika/nika.ini +COPY --from=builder /nika/install /nika/install +COPY --from=builder /nika/build/Release /nika/build/Release +COPY --from=builder /nika/.venv /nika/.venv + +WORKDIR /nika + +EXPOSE 8090 -WORKDIR /nika/scripts -ENTRYPOINT ["/usr/bin/tini", "--", "/nika/problem-solver/sc-machine/scripts/docker_entrypoint.sh"] +ENTRYPOINT ["/usr/bin/tini", "--", "/nika/scripts/docker_entrypoint.sh"] diff --git a/README.md b/README.md index d7942b3360..d015d54f16 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ pip3 install mkdocs markdown-include mkdocs-material mkdocs-i18n mkdocs serve ``` -Then open http://127.0.0.1:8002/ in your browser +Then open http://127.0.0.1:9001/ in your browser ## ✨ Demo ![demo.png](docs/images/demo.png) diff --git a/cmake/ClangFormat.cmake b/cmake/ClangFormat.cmake new file mode 100644 index 0000000000..013aca2267 --- /dev/null +++ b/cmake/ClangFormat.cmake @@ -0,0 +1,70 @@ +# Copyright Tomas Zeman 2019-2020. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +function(prefix_clangformat_setup prefix) + if(NOT CLANGFORMAT_EXECUTABLE) + set(CLANGFORMAT_EXECUTABLE clang-format) + endif() + + if(NOT EXISTS ${CLANGFORMAT_EXECUTABLE}) + find_program(clangformat_executable_tmp ${CLANGFORMAT_EXECUTABLE}) + if(clangformat_executable_tmp) + set(CLANGFORMAT_EXECUTABLE ${clangformat_executable_tmp}) + unset(clangformat_executable_tmp) + else() + message(FATAL_ERROR "ClangFormat: ${CLANGFORMAT_EXECUTABLE} not found! Aborting") + endif() + endif() + + foreach(clangformat_source ${ARGN}) + get_filename_component(clangformat_source ${clangformat_source} ABSOLUTE) + list(APPEND clangformat_sources ${clangformat_source}) + endforeach() + + add_custom_target(${prefix}_clangformat + COMMAND + ${CLANGFORMAT_EXECUTABLE} + -style=file + -fallback-style=none + -i + ${clangformat_sources} + WORKING_DIRECTORY + ${CMAKE_SOURCE_DIR} + COMMENT + "Formatting ${prefix} with ${CLANGFORMAT_EXECUTABLE} ..." + ) + + add_custom_target(${prefix}_clangformat_check + COMMAND + ${CLANGFORMAT_EXECUTABLE} + -style=file + -fallback-style=none + --Werror + --dry-run + ${clangformat_sources} + WORKING_DIRECTORY + ${CMAKE_SOURCE_DIR} + COMMENT + "Check formatting ${prefix} with ${CLANGFORMAT_EXECUTABLE} ..." + ) + + if(TARGET clangformat) + add_dependencies(clangformat ${prefix}_clangformat) + add_dependencies(clangformat_check ${prefix}_clangformat_check) + else() + add_custom_target(clangformat DEPENDS ${prefix}_clangformat) + add_custom_target(clangformat_check DEPENDS ${prefix}_clangformat_check) + endif() +endfunction() + +function(clangformat_setup) + prefix_clangformat_setup(${PROJECT_NAME} ${ARGN}) +endfunction() + +function(target_clangformat_setup target) + get_target_property(target_sources ${target} SOURCES) + list(FILTER target_sources EXCLUDE REGEX \(.*/scs/*.|.*/json/.*\)) + prefix_clangformat_setup(${target} ${target_sources}) +endfunction() diff --git a/cmake/install.cmake b/cmake/install.cmake new file mode 100644 index 0000000000..c3f41a03ae --- /dev/null +++ b/cmake/install.cmake @@ -0,0 +1,41 @@ +install(TARGETS + common dialog-control-module interface-module + message-classification-module message-processing-module + message-reply-module + EXPORT privateExport + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/extensions" +) + +install(EXPORT privateExport + FILE privateTargets.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nika +) + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/nika-config-version.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/nika-config-version.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nika +) + +set(CPACK_PACKAGE_NAME nika) +set(CPACK_PACKAGE_VENDOR "OSTIS AI") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "NIKA is an Intelligent Knowledge-driven Assistant") +set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) +set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) +set(CPACK_VERBATIM_VARIABLES TRUE) + +if (WIN32) + set(CPACK_GENERATOR ZIP) +else() + set(CPACK_GENERATOR TGZ) +endif() +include(CPack) diff --git a/cmake/nika-config-version.cmake.in b/cmake/nika-config-version.cmake.in new file mode 100644 index 0000000000..61c5fa0850 --- /dev/null +++ b/cmake/nika-config-version.cmake.in @@ -0,0 +1,13 @@ +set(PACKAGE_VERSION "@PROJECT_VERSION@") + +if(PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION) + set(PACKAGE_VERSION_COMPATIBLE TRUE) +else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) +endif() + +if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) +else() + set(PACKAGE_VERSION_EXACT FALSE) +endif() diff --git a/cmake/tests.cmake b/cmake/tests.cmake new file mode 100644 index 0000000000..15cb2e8d4c --- /dev/null +++ b/cmake/tests.cmake @@ -0,0 +1,20 @@ +function(make_tests_from_folder folder) + set(SINGLE_ARGS NAME) + set(MULTI_ARGS DEPENDS INCLUDES ARGUMENTS) + + cmake_parse_arguments(TEST "" "${SINGLE_ARGS}" "${MULTI_ARGS}" ${ARGN}) + + set(target "${TEST_NAME}") + + message(STATUS "Create test ${target}") + + file(GLOB_RECURSE SOURCES + "${folder}/*.cpp" + "${folder}/*.hpp" + ) + + add_executable(${target} ${SOURCES}) + target_link_libraries(${target} GTest::gtest_main ${TEST_DEPENDS}) + target_include_directories(${target} PRIVATE ${TEST_INCLUDES}) + gtest_discover_tests(${target} WORKING_DIRECTORY ${folder}) +endfunction() diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 0000000000..36335d8d22 --- /dev/null +++ b/conanfile.py @@ -0,0 +1,34 @@ +from conan import ConanFile, tools +from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake + + +class nikaRecipe(ConanFile): + settings = "os", "compiler", "build_type", "arch" + + @property + def _run_tests(self): + return tools.get_env("CONAN_RUN_TESTS", False) + + def requirements(self): + self.requires("sc-machine/0.10.0") + self.requires("scl-machine/0.3.0") + self.requires("nlohmann_json/3.11.3") + self.requires("libcurl/8.11.1") + + def build_requirements(self): + self.test_requires("gtest/1.14.0") + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() # equivalent to self.run("cmake . ") + cmake.build() + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.user_presets_path = "ConanPresets.json" + tc.generate() diff --git a/docker-compose.yml b/docker-compose.yml index e7112d6059..d57261a863 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: container_name: nika-problem-solver restart: unless-stopped volumes: - - ./kb:/nika/kb + - ./knowledge-base:/nika/knowledge-base - kb-binary:/nika/kb.bin - ./repo.path:/nika/repo.path - ./nika.ini:/nika/nika.ini @@ -37,7 +37,7 @@ services: expose: - 8090 healthcheck: - test: "bash -c 'source /tmp/problem-solver/sc-machine/.venv/bin/activate && python3 /nika/problem-solver/sc-machine/scripts/healthcheck.py'" + test: "bash -c 'source /nika/.venv/bin/activate && python3 /nika/scripts/healthcheck.py'" interval: 5s timeout: 10s retries: 6 @@ -45,12 +45,13 @@ services: environment: # Use the commented env variable if you need to rebuild KB every startup. - "REBUILD_KB=1" - - "BINARY_PATH=/nika/bin" - - "BUILD_PATH=/nika/build" + - "BINARY_PATH=/nika/install/sc-machine/bin" - "CONFIG_PATH=/nika/nika.ini" - - "KB_PATH=../repo.path" + - "KB_PATH=/nika/repo.path" + - "EXTENSIONS_PATH=/nika/build/Release/lib/extensions;/nika/install/sc-machine/lib/extensions;/nika/install/scl-machine/lib/extensions" + - "SC_SERVER_HOST=0.0.0.0" command: - - "serve" + - "run" nika-ui: image: ostis/nika-ui:0.1.0 diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md diff --git a/docs/_assets/main.css b/docs/_assets/main.css index 49479c5d76..c31a48c883 100644 --- a/docs/_assets/main.css +++ b/docs/_assets/main.css @@ -1,3 +1,7 @@ +p { + text-align: justify; +} + .todo { background-color: #E06C6C; border: 1px solid #AD3939; @@ -83,4 +87,4 @@ .codehilite .no { color: #3e61a2 } .codehilite .o { color: #000 } .codehilite .ni { color: #000; background-color: #eee } -.codehilite .nl { color: #2b91af; background-color: #f1f9fb } \ No newline at end of file +.codehilite .nl { color: #2b91af; background-color: #f1f9fb } diff --git a/docs/_assets/warning.svg b/docs/_assets/warning.svg deleted file mode 100644 index e77484eb62..0000000000 --- a/docs/_assets/warning.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/build/build_system.md b/docs/build/build_system.md new file mode 100644 index 0000000000..a1a974135c --- /dev/null +++ b/docs/build/build_system.md @@ -0,0 +1,70 @@ +# Build System + +NIKA's build system is based on the principles of the [sc-machine](https://github.com/ostis-ai/sc-machine) build system. To learn more about them, read [sc-machine build system documentation](https://ostis-ai.github.io/sc-machine/build/build_system/). + +## Compilation steps + +This project uses CMake presets. These presets help manage different build configurations, making it easier to work with dependencies and streamline the build process. + +If you wish to use CLI instead of a graphical interface like Visual Studio Code, you can list all the available configurations in the `CMakePresets.json` file and pick one of the presets: + +```sh +conan install . -s build_type= --build=missing +cmake --list-presets +``` + +### Configure presets + +Configure presets define how the project is configured before building. They specify various settings, including whether to include tests and which dependencies to use. + +| **Name** | **Display Name** | **Description** | **Build location** | +|------------------------------|-----------------------------------------|------------------------------------------------------|--------------------| +| `debug-conan` | Debug config (Conan) | Debug config with tests (Conan dependencies used) | build/Debug | +| `release-conan` | Release config (Conan) | Release config (Conan dependencies used) | build/Release | +| `release-with-tests-conan` | Release config with tests (Conan) | Release config with tests (Conan dependencies used) | build/Release | + +## Build presets + +Build presets link to the configure presets and specify how to build the project. They determine the output directories based on the selected configuration. + +| **Name** | **Configure Preset** | **Build location** | +|------------|---------------------------------------------|--------------------| +| `debug` | `debug-conan` | build/Debug | +| `release` | `release-conan`, `release-with-tests-conan` | build/Release | + +## Recommendations + +- For development and debugging, use the **Debug config (Conan)** (`debug-conan`) preset. This configuration includes options for testing and benchmarking. +- For production builds, choose the **Release config (Conan)** (`release-conan`) preset to create optimized builds without debugging information. +- If you need to run tests in a production build, select the **Release config with tests (Conan)** (`release-with-tests-conan`) preset. + +## Example usage + +To build your project using these presets, you can use the following commands: + +```sh +# Use pipx to install Conan if not already installed +pipx install conan +``` + +```sh +# Install dependencies using Conan with Debug build type +conan install . -s build_type=Debug --build=missing +# Configure using debug-conan preset +cmake --preset debug-conan +# Build using debug preset +cmake --build --preset debug +``` + +To build your project for release, you can build with tests to ensure everything works as expected: + +```sh +# Install dependencies using Conan with Debug build type +conan install . -s build_type=Release --build=missing +# Configure using release-with-tests preset +cmake --preset release-with-tests-conan +# Build using release preset +cmake --build --preset release +``` + +We also define `INSTALL` instructions in our CMake. This routine can be launched by appending `--target install` to the `cmake --build --preset ` command. The result of this command will reside in `build//install` (our default install folder). Install folder is basically a pack of portable executable files and shared libraries required to get NIKA up and running, this command is intended to create clutter-free archives/folders with our code which you can then use in your own projects. diff --git a/docs/build/build_system.ru.md b/docs/build/build_system.ru.md new file mode 100644 index 0000000000..f989f94891 --- /dev/null +++ b/docs/build/build_system.ru.md @@ -0,0 +1,70 @@ +# Система сборки + +Система сборки NIKA основана на принципах системы сборки [sc-machine](https://github.com/ostis-ai/sc-machine). Чтобы узнать больше о них, прочитайте [документацию по системе сборки sc-machine](https://ostis-ai.github.io/sc-machine/build/build_system/). + +## Этапы компиляции + +Этот проект использует пресеты CMake. Эти пресеты помогают управлять различными конфигурациями сборки, упрощая работу с зависимостями и оптимизируя процесс сборки. + +Если вы хотите использовать CLI, вы можете перечислить все доступные конфигурации в файле `CMakePresets.json` и выбрать один из пресетов: + +```sh +conan install . -s build_type= --build=missing +cmake --list-presets +``` + +### Конфигурационные пресеты + +Конфигурационные пресеты определяют, как проект настраивается перед сборкой. Они задают различные параметры, включая включение тестов и используемые зависимости. + +| **Имя** | **Отображаемое имя** | **Описание** | **Расположение сборки** | +|------------------------------|-----------------------------------------|------------------------------------------------------|--------------------| +| `debug-conan` | Конфигурация Debug (Conan) | Конфигурация Debug с тестами (используются зависимости Conan) | build/Debug | +| `release-conan` | Конфигурация Release (Conan) | Конфигурация Release (используются зависимости Conan) | build/Release | +| `release-with-tests-conan` | Конфигурация Release с тестами (Conan) | Конфигурация Release с тестами (используются зависимости Conan) | build/Release | + +## Пресеты сборки + +Пресеты сборки связаны с конфигурационными пресетами и определяют, как собирать проект. Они задают выходные каталоги в зависимости от выбранной конфигурации. + +| **Имя** | **Конфигурационный пресет** | **Расположение сборки** | +|------------|---------------------------------------------|-------------------------| +| `debug` | `debug-conan` | build/Debug | +| `release` | `release-conan`, `release-with-tests-conan` | build/Release | + +## Рекомендации + +- Для разработки и отладки используйте пресет **Конфигурация Debug (Conan)** (`debug-conan`). Эта конфигурация включает опции для тестирования и бенчмаркинга. +- Для сборки в production используйте пресет **Конфигурация Release (Conan)** (`release-conan`), чтобы создать оптимизированные сборки без отладочной информации. +- Если вам нужно запустить тесты в production сборке, выберите пресет **Конфигурация Release с тестами (Conan)** (`release-with-tests-conan`). + +## Пример использования + +Чтобы собрать ваш проект с использованием этих пресетов, вы можете использовать следующие команды: + +```sh +# Используйте pipx для установки Conan, если он еще не установлен +pipx install conan +``` + +```sh +# Установите зависимости с использованием Conan с типом сборки Debug +conan install . -s build_type=Debug --build=missing +# Настройте с использованием пересета debug-conan +cmake --preset debug-conan +# Соберите с использованием пересета debug +cmake --build --preset debug +``` + +Чтобы собрать проект для release, вы можете собрать с тестами, чтобы убедиться, что все работает как ожидается: + +```sh +# Установите зависимости с использованием Conan с типом сборки Release +conan install . -s build_type=Release --build=missing +# Настройте с использованием пресета release-with-tests +cmake --preset release-with-tests-conan +# Соберите с использованием пресета release +cmake --build --preset release +``` + +Мы также определяем инструкции `INSTALL` в нашем CMake. Эта процедура может быть запущена путем добавления `--target install` к команде `cmake --build --preset `. Результат этой команды будет находиться в `build//install` (наша папка установки по умолчанию). Папка установки представляет собой набор переносимых исполняемых файлов и общих библиотек, необходимых для запуска NIKA. Эта команда предназначена для создания архивов/папок с нашим кодом, которые вы можете использовать в своих проектах. diff --git a/docs/build/cmake_flags.md b/docs/build/cmake_flags.md new file mode 100644 index 0000000000..a4ba6c1efc --- /dev/null +++ b/docs/build/cmake_flags.md @@ -0,0 +1,36 @@ +# CMake Flags + +## Build cache + +This project uses ccache automatically if it's available in the system. To disable this, use flag `-DAUTO_CCACHE=OFF`. + +## Building tests + +```sh +cmake --preset -DSC_BUILD_TESTS=ON +cmake --build --preset +``` + +## Code formatting with CLangFormat + +To check code with CLangFormat run: +```sh +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat_check +``` + +or +```sh +./scripts/clang/check_formatting.sh +``` + +To format code with CLangFormat run: +```sh +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat +``` + +or +```sh +./scripts/clang/format_code.sh +``` diff --git a/docs/build/cmake_flags.ru.md b/docs/build/cmake_flags.ru.md new file mode 100644 index 0000000000..c958d999d2 --- /dev/null +++ b/docs/build/cmake_flags.ru.md @@ -0,0 +1,40 @@ +# Флаги CMake + +## Кэш сборки + +Этот проект автоматически использует ccache, если он доступен в системе. Чтобы отключить это, используйте флаг `-DAUTO_CCACHE=OFF`. + +## Сборка тестов + +```sh +cmake --preset -DSC_BUILD_TESTS=ON +cmake --build --preset +``` + +## Форматирование кода с помощью CLangFormat + +Чтобы проверить код с помощью CLangFormat, выполните: + +```sh +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat_check +``` + +или + +```sh +./scripts/clang/check_formatting.sh +``` + +Чтобы отформатировать код с помощью CLangFormat, выполните: + +```sh +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat +``` + +или + +```sh +./scripts/clang/format_code.sh +``` diff --git a/docs/build/docker-build.md b/docs/build/docker_build.md similarity index 100% rename from docs/build/docker-build.md rename to docs/build/docker_build.md diff --git a/docs/build/docker-build.ru.md b/docs/build/docker_build.ru.md similarity index 100% rename from docs/build/docker-build.ru.md rename to docs/build/docker_build.ru.md diff --git a/docs/build/linux-build.md b/docs/build/linux-build.md deleted file mode 100644 index 5ba6692888..0000000000 --- a/docs/build/linux-build.md +++ /dev/null @@ -1,81 +0,0 @@ -# Native installation on Linux - -## Installation - -```sh -git clone https://github.com/ostis-apps/nika -cd nika -git submodule update --init --recursive -./scripts/install_submodules.sh -./scripts/install_problem_solver_deps.sh -./scripts/install_interface_deps.sh -./scripts/install_py_sc_server_deps.sh -``` - -## Build - -- Build problem solver - - ```sh - ./scripts/build_problem_solver.sh - ``` - -- Build knowledge base - - ```sh - ./scripts/build_kb.sh - ``` - -- Build sc-web - - ```sh - ./scripts/build_sc_web.sh - ``` - -## 🚀 Run - - ```sh - # Terminal 1 - ./scripts/run_sc_machine.sh - - # Terminal 2 - ./scripts/run_py_sc_server.sh - - # Terminal 3 - ./scripts/run_sc_web.sh - - # Terminal 4 - ./scripts/run_interface.sh - ``` - - This commands will launch 2 Web UIs on your machine: - -- sc-web - `localhost:8000` -- dialogue web UI - `localhost:3033` - -## Troubleshooting - -- You can have a problem while running the next script: - - ```sh - ./install_interface_deps.sh - ``` - - **Solution**: Please make sure that you have the nessesary version of Node-js. Try to download Node-js 16. - -- You can have a problem with `yarn` which looks like `ERROR: There are no scenarios; must have at least one` while running the next script: - - ```sh - ./run_interface.sh - ``` - - **Solution**: you can try to reinstall it: - - ```sh - sudo apt remove cmdtest - sudo apt remove yarn - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt update - sudo apt install yarn - ``` diff --git a/docs/build/linux-build.ru.md b/docs/build/linux-build.ru.md deleted file mode 100644 index 09462c5998..0000000000 --- a/docs/build/linux-build.ru.md +++ /dev/null @@ -1,78 +0,0 @@ -# Установка проекта нативно на Linux - -## Установка - -```sh -git clone https://github.com/ostis-apps/nika -cd nika -git submodule update --init --recursive -./scripts/install_submodules.sh -./scripts/install_problem_solver_deps.sh -./scripts/install_interface_deps.sh -./scripts/install_py_sc_server_deps.sh -``` - -## Сборка - -- Сборка решателя задач - - ```sh - ./scripts/build_problem_solver.sh - ``` - -- Сборка базы знаний - - ```sh - ./scripts/build_kb.sh - ``` - -- Сборка sc-web - - ```sh - ./scripts/build_sc_web.sh - ``` - -## 🚀 Запуск - -```sh -# Терминал 1 -./scripts/run_sc_server.sh - -# Терминал 2 -./scripts/run_sc_web.sh - -# Терминал 3 -./scripts/run_interface.sh -``` - - Данные команды запустят 2 следующих web-интерфейса: - -- sc-web - `localhost:8000` -- диалоговый web-интерфейс - `localhost:3033` - -## Устранение неполадок - -- У Вас может появиться ошибка при запуске следующего скрипта из-за несовместимости версий Node-js: - - ```sh - ./install_interface_deps.sh - ``` - - **Решение**: Убедитесь, что у Вас установлена необходимая версия Node-js. Попробуйте установить Node-js 16. - -- У Вас может возникнуть проблема с yarn. Например: `ERROR: There are no scenarios; must have at least one` при запуске следующего скрипта: - - ```sh - ./run_interface.sh - ``` - - **Решение**: попробуйте переустановить yarn: - - ```sh - sudo apt remove cmdtest - sudo apt remove yarn - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt update - sudo apt install yarn - ``` diff --git a/docs/build/quick_start.md b/docs/build/quick_start.md new file mode 100644 index 0000000000..3eae5af328 --- /dev/null +++ b/docs/build/quick_start.md @@ -0,0 +1,273 @@ +# Quick Start for Contributors + +This guide provides short information for developers to start to work with NIKA quickly. You can always learn more about the NIKA's [build system](build_system.md). + +## Install NIKA submodules + +To clone repository, run: + +```sh +git clone https://github.com/NikitaZotov/nika +cd nika +git checkout feat/migrate_to_0.10.0 +git submodule update --init --recursive +``` + +## Check CMake + +Install pipx first using [**pipx installation guide**](https://pipx.pypa.io/stable/installation/) if not already installed. + +Ensure you are using **CMake version 3.24** or newer. Verify your version with: + +```sh +cmake --version +``` + +To upgrade CMake, run: + +```sh +# Use pipx to install cmake if not already installed +pipx install cmake +pipx ensurepath +# relaunch your shell after installation +exec $SHELL +``` + +Install Ninja generator for CMake, to use CMake presets: + +```sh +# Use pipx to install ninja if not already installed +pipx install ninja +pipx ensurepath +# relaunch your shell after installation +exec $SHELL +``` + +## Start develop C++ problem solver of NIKA with Conan + +### Install Conan + +Install Conan, to build C++ problem solver dependencies with Conan-provided dependencies: + +```sh +# Use pipx to install conan if not already installed +pipx install conan +pipx ensurepath +# relaunch your shell after installation +exec $SHELL +``` + +### Use C++ problem solver in Debug + +#### Install dependencies with Conan + +C++ problem solver of NIKA is an extension to sc-machine, so sc-machine is main dependency for C++ problem solver. To install it, run in the root of the project: + +```sh +conan install . -s build_type=Debug --build=missing +``` + +#### Build C++ problem solver in Debug + +To build C++ problem solver in debug mode using Conan-provided dependencies, run: + +```sh +# debug build type +cmake --preset debug-conan +cmake --build --preset debug +``` + +!!! Note + By default, configure preset `debug` enables building C++ problem solver tests. + +#### Run C++ problem solver tests in Debug + +After that, you can go to `build/Debug` and run tests via `ctest`: + +```sh +cd build/Debug +ctest -V +``` + +You can also check code formatting. To learn more, go to the [CMake flags](cmake_flags.md) page. + +### Use C++ problem solver in Release + +#### Install dependencies with Conan + +To install it, run in the root of the project: + +```sh +conan install . -s build_type=Release --build=missing +``` + +#### Build C++ problem solver in Release + +To build C++ problem solver in release mode using Conan-provided dependencies, run: + +```sh +# release build type without tests +cmake --preset release-conan +cmake --build --preset release +``` + +To build C++ problem solver with tests in release mode using Conan-provided dependencies, run: + +```sh +# release build type with tests +cmake --preset release-with-tests-conan +cmake --build --preset release +``` + +#### Run C++ problem solver tests in Release + +After that, you can run tests: + +```sh +cd build/Release +ctest -V +``` + +You can also check code formatting. To learn more, go to the [CMake flags](cmake_flags.md) page. + +## Start develop sc-web interface + +### Install dependencies with npm + +To install dependencies, go to the `sc-web` directory and run: + +```sh +cd sc-web +./scripts/install_dependencies.sh +``` + +### Build sc-web interface + +To build sc-web, run: + +```sh +npm run build +``` + +### Run sc-web interface + +After run: + +```sh +source .venv/bin/activate && python3 server/app.py +``` + +## Start develop Python problem solver of NIKA + +### Install dependencies with pip3 + +To install dependencies, run: + +```sh +python3 -m venv problem-solver/py/.venv +source problem-solver/py/.venv/bin/activate +pip3 install -r problem-solver/py/requirements.txt +``` + +### Run Python problem solver tests + +Running Python problem solver requires C++ problem solver to be running. Run C++ problem solver: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +``` + +and after that, run Python problem-solver tests in new terminal: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 -m unittest discover problem-solver/py +``` + +### Run Python problem solver + +Run C++ problem solver: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +``` + +and after that, run Python problem-solver in new terminal: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 problem-solver/py/server.py +``` + +## Start develop interface of NIKA + +### Install dependencies with npm + +To install dependencies, go to the `interface` directory and run: + +```sh +cd interface +npm install +``` + +### Build interface + +To build interface, run: + +```sh +npm run build +``` + +### Run interface + +After run: + +```sh +npm run start +``` + +## Run NIKA + +Before launching NIKA, [extract sc-machine from GitHub Releases](https://ostis-ai.github.io/sc-machine/quick_start/#github-releases) or [build it](https://ostis-ai.github.io/sc-machine/build/quick_start/). + +Firstly, build knowledge base: + +```sh +./path/to/sc-builder/binary -i repo.path -o kb.bin --clear +``` + +After run C++ problem solver: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +# if several paths to extensions are provided then they should be separated +# by semicolon and wrapped in double quotes +``` + +Run sc-web interface in new terminal: + +```sh +cd sc-web +source .venv/bin/activate && python3 server/app.py +``` + +Run Python problem solver in new terminal: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 problem-solver/py/server.py +``` + +And run interface in new terminal: + +```sh +cd interface +npm run start +``` + +### Contributing + +To contribute changes to the project, you need to [create Pull Request](https://github.com/ostis-ai/nika/blob/main/docs/CONTRIBUTING.md). diff --git a/docs/build/quick_start.ru.md b/docs/build/quick_start.ru.md new file mode 100644 index 0000000000..8ac52bbf19 --- /dev/null +++ b/docs/build/quick_start.ru.md @@ -0,0 +1,269 @@ +# Быстрый старт для разработчиков + +Этот гид предоставляет краткую информацию для разработчиков, чтобы быстро начать работу с NIKA. Вы всегда можете узнать больше о [системе сборки](build_system.md) NIKA. + +## Установка подмодулей NIKA + +Чтобы клонировать репозиторий, выполните: + +```sh +git clone https://github.com/NikitaZotov/nika +cd nika +git checkout feat/migrate_to_0.10.0 +git submodule update --init --recursive +``` + +## Проверка CMake + +Сначала установите pipx, используя [**руководство по установке pipx**](https://pipx.pypa.io/stable/installation/), если он еще не установлен. + +Убедитесь, что используете **CMake версии 3.24** или новее. Проверьте версию с помощью: + +```sh +cmake --version +``` + +Чтобы обновить CMake, выполните: + +```sh +# Установите cmake с помощью pipx, если он еще не установлен +pipx install cmake +pipx ensurepath +# Перезапустите shell после установки +exec $SHELL +``` + +Установите генератор Ninja для CMake, чтобы использовать пресеты CMake: + +```sh +# Установите ninja с помощью pipx, если он еще не установлен +pipx install ninja +pipx ensurepath +# Перезапустите shell после установки +exec $SHELL +``` + +## Разработка C++ решателя задач NIKA с Conan + +### Установка Conan + +Установите Conan, чтобы собирать зависимости C++ решателя задач: + +```sh +# Установите conan с помощью pipx, если он еще не установлен +pipx install conan +pipx ensurepath +# Перезапустите shell после установки +exec $SHELL +``` + +### Использование C++ решателя задач в режиме Debug + +#### Установка зависимостей с Conan + +C++ решатель задач NIKA является расширением для sc-machine, поэтому sc-machine - основная зависимость. Для установки выполните в корневой директории проекта: + +```sh +conan install . -s build_type=Debug --build=missing +``` + +#### Сборка C++ решателя задач в режиме Debug + +Для сборки в режиме отладки с использованием зависимостей Conan выполните: + +```sh +# тип сборки debug +cmake --preset debug-conan +cmake --build --preset debug +``` + +!!! Примечание + По умолчанию пресет `debug` включает тесты для C++ решателя задач. + +#### Запуск тестов C++ решателя задач в режиме Debug + +Затем перейдите в `build/Debug` и запустите тесты с помощью `ctest`: + +```sh +cd build/Debug +ctest -V +``` + +Вы также можете проверить форматирование кода. Подробнее смотрите на странице [флагов CMake](cmake_flags.md). + +### Использование C++ решателя задач в режиме Release + +#### Установка зависимостей с Conan + +Для установки выполните в корневой директории проекта: + +```sh +conan install . -s build_type=Release --build=missing +``` + +#### Сборка C++ решателя задач в режиме Release + +Для сборки без тестов выполните: + +```sh +cmake --preset release-conan +cmake --build --preset release +``` + +Для сборки с тестами выполните: + +```sh +cmake --preset release-with-tests-conan +cmake --build --preset release +``` + +#### Запуск тестов C++ решателя задач в режиме Release + +После этого выполните: + +```sh +cd build/Release +ctest -V +``` + +Вы также можете проверить форматирование кода. Подробнее смотрите на странице [флагов CMake](cmake_flags.md). + +## Разработка sc-web интерфейса + +### Установка зависимостей с npm + +Перейдите в директорию `sc-web` и выполните: + +```sh +cd sc-web +./scripts/install_dependencies.sh +``` + +### Сборка sc-web интерфейса + +Для сборки выполните: + +```sh +npm run build +``` + +### Запуск sc-web интерфейса + +Для запуска выполните: + +```sh +source .venv/bin/activate && python3 server/app.py +``` + +## Разработка Python решателя задач NIKA + +### Установка зависимостей с pip3 + +Для установки зависимостей выполните: + +```sh +python3 -m venv problem-solver/py/.venv +source problem-solver/py/.venv/bin/activate +pip3 install -r problem-solver/py/requirements.txt +``` + +### Запуск тестов Python решателя задач + +Для запуска Python решателя задач требуется работающий C++ решатель задач. Запустите его: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +``` + +Затем в новом терминале выполните: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 -m unittest discover problem-solver/py +``` + +### Запуск Python решателя задач + +Запустите C++ решатель задач: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +``` + +Затем в новом терминале выполните: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 problem-solver/py/server.py +``` + +## Разработка интерфейса NIKA + +### Установка зависимостей с npm + +Перейдите в директорию `interface` и выполните: + +```sh +cd interface +npm install +``` + +### Сборка интерфейса + +Для сборки выполните: + +```sh +npm run build +``` + +### Запуск интерфейса + +Для запуска выполните: + +```sh +npm run start +``` + +## Запуск NIKA + +Перед запуском NIKA [извлеките sc-machine из GitHub Releases](https://ostis-ai.github.io/sc-machine/quick_start/#github-releases) или [соберите его](https://ostis-ai.github.io/sc-machine/build/quick_start/). + +Сначала соберите базу знаний: + +```sh +./path/to/sc-builder/binary -i repo.path -o kb.bin --clear +``` + +Затем запустите C++ решатель задач: + +```sh +./path/to/sc-machine/binary -s kb.bin -c nika.ini \ + -e "path/to/nika/lib/extensions;path/to/sc-machine/lib/extensions;path/to/scl-machine/lib/extensions" +``` + +Запустите sc-web интерфейс в новом терминале: + +```sh +cd sc-web +source .venv/bin/activate && python3 server/app.py +``` + +Запустите Python решатель задач в новом терминале: + +```sh +source problem-solver/py/.venv/bin/activate && \ +python3 problem-solver/py/server.py +``` + +И запустите интерфейс в новом терминале: + +```sh +cd interface +npm run start +``` + +### Участие в разработке + +Чтобы внести изменения в проект, создайте [Pull Request](https://github.com/ostis-ai/nika/blob/main/docs/CONTRIBUTING.md). diff --git a/docs/dev/project_structure.md b/docs/dev/project_structure.md deleted file mode 100644 index 81c9e5de11..0000000000 --- a/docs/dev/project_structure.md +++ /dev/null @@ -1,101 +0,0 @@ -# Project Structure - -## kb - -Place for the knowledge base of your app. Put your *.scs* files here. - -## problem-solver - -Place for the problem solver of your app. Put your agents here. - -### C++ agents - -Some tips: - -- Store your modules with c++ agents in *problem-solver/cxx*; - -- After updating c++ code you will need to rebuild problem-solver. Just run: - -```sh -./scripts/build_problem_solver.sh -``` - -For a full rebuild with the deleting of the *bin* and *build* folders run: - -```sh -./scripts/build_problem_solver.sh -f -``` - -For building the project in release mode run: - -```sh -./scripts/build_problem_solver.sh -r -``` - -To build tests run: - -```sh -./scripts/build_problem_solver.sh -t -``` - -For a full rebuild with build tests and the deleting of the *bin* and *build* folders run: - -```sh -./scripts/build_problem_solver.sh -f -t -``` - -- Add an action deactivation check by using a function `ActionUtils::isActionDeactivated()` from the common module. Identifiers of deactivated actions are stored in `kb/non_subject_domain_concepts/action_deactivated.scs`. Example: - -```cpp -#include "utils/ActionUtils.hpp" - -sc_result MyModule::InitializeImpl() -{ - ScMemoryContext ctx(sc_access_lvl_make_min, "MyModule"); - if (ActionUtils::isActionDeactivated(&m_memoryCtx, Keynodes::action_of_my_agent)) - { - SC_LOG_ERROR("My agent action is deactivated") - } - else - { - ... - } - return SC_RESULT_OK; -} -``` - -### Logging - -You can change log mode and level in nika.ini configuration file. - -## sc-web - -- After updating js code you will need to rebuild sc-web. Just run: - -```sh -./scripts/build_sc_web.sh -``` - -## interface - -Place for your interface modules. - -## scripts - -Place for scripts of your app. - -### build_problem_solver.sh [-f, --full, -t, --tests, -r, --release, --help] - -Build the problem-solver of your app. Use an argument *-f* or *--full* for a complete rebuild of the problem-solver with the deleting of the *bin* and *build* folders. - -### run_interface.sh - -Run the interface of your app. - -### install_project.sh - -Install or update the ostis-web-platform. - -### install_subsystems.sh - -Building a problem solver and a knowledge base of subsystems. diff --git a/docs/dev/project_structure.ru.md b/docs/dev/project_structure.ru.md deleted file mode 100644 index b878bf2671..0000000000 --- a/docs/dev/project_structure.ru.md +++ /dev/null @@ -1,100 +0,0 @@ -# Project Structure - -## kb - -В данной папке хранятся фрагменты базы знаний. *(Например в файлах .scs)* - -## problem-solver - -В данной папке хранятся компоненты решателя задач в виде агентов и программ. - -### Агенты на C++ - -Несколько советов: - -- Храните свои модули с агентами c++ в *problem-solver/cxx*; - -- После обновления кода на c++ вам необходимо пересобрать решатель задач. Просто запустите: - - ```sh - ./scripts/build_problem_solver.sh - ``` - -- Добавьте проверку деактивации действия с помощью функции `ActionUtils::isActionDeactivated()` из общего модуля. Идентификаторы действий для деактивации хранятся в `kb/non_subject_domain_concepts/action_deactivated.scs`. Пример: - - ```cpp - #include "utils/ActionUtils.hpp" - - sc_result MyModule::InitializeImpl() - { - ScMemoryContext ctx(sc_access_lvl_make_min, "MyModule"); - if (ActionUtils::isActionDeactivated(&m_memoryCtx, Keynodes::action_of_my_agent)) - { - SC_LOG_ERROR("My agent action is deactivated") - } - else - { - ... - } - return SC_RESULT_OK; - } - ``` - -### Логирование - -Вы можете изменить режим и уровень ведения логов в файле конфигурации nika.ini. - -## sc-web - -- После обновления нужно пересобрать sc-web. Для этого запустите: - - ```sh - ./scripts/build_sc_web.sh - ``` - -## interface - -В данной папке можно хранить модули для интерфейса. - -## scripts - -В данной папке можно хранить скрипты. - -### build_problem_solver.sh [-f, --full] - -- Для полной пересборки с удалением содержимого папок *bin* и *build* запустите: - - ```sh - ./scripts/build_problem_solver.sh -f - ``` - -- Для сборки проекта в release mode запустите: - - ```sh - ./scripts/build_problem_solver.sh -r - ``` - -- Для сборки тестов запустите: - - ```sh - ./scripts/build_problem_solver.sh -t - ``` - -- Для полной пересборки с тестами и удалением содержимого папок *bin* и *build* запустите: - - ```sh - ./scripts/build_problem_solver.sh -f -t - ``` - -### run_interface.sh - -Запуск интерфейса. - -### install_project.sh - -Установка или обновление ostis-web-platform. - -### install_subsystems.sh - -Сборка решателя задач и базы знаний подсистем. - diff --git a/docs/index.md b/docs/index.md index 973f99e9f1..6893e49d42 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,28 +1,36 @@ # Documentation -- **Build** - * [Docker](build/docker-build.md) - * [Linux](build/linux-build.md) - -- **Development** - * [Git workflow](dev/git-workflow.md) - * [Pull Request](dev/pr.md) - *rules for creating a pull requests* - * [Codestyle](dev/codestyle.md) - *coding style documentation* - * [Project structure](dev/project_structure.md) - -- **Agents** - * [Non-atomic action interpretation agent](agents/nonAtomicActionInterpretationAgent.md) - * [Message reply agent](agents/messageReplyAgent.md) - * [Standard message reply agent](agents/standardMessageReplyAgent.md) - * [Message topic classification agent](agents/messageTopicClassificationAgent.md) - * [Alternative message topic classification agent](agents/alternativeMessageTopicClassificationAgent.md) - * [Phrase generation agent](agents/phraseGenerationAgent.md) - * [Change interface color agent](agents/changeInterfaceColorAgent.md) - * [Find word in set by first letter agent](agents/findWordInSetByFirstLetter.md) - * [Weather agent](agents/weatherAgent.md) +Welcome to [NIKA](https://github.com/ostis-apps/nika) documentation! -- **Patterns** - * [Knowledge base patterns](patterns/kb-patterns.md) +## What is NIKA? -- **Subsystems** - * [scl-machine](subsystems/scl-machine.md) +NIKA is an Intelligent Knowledge-driven Assistant that operates on the basis of the OSTIS Technology. It is a dialog system that can access the advantages of ostis-systems. For more information, ask NIKA: "What's NIKA?". + +Table of contents: + +- [Quick Start](quick_start.md) - *get up and running with NIKA quickly* +- **Build Instructions** - *guides for setting up and compiling NIKA* + - [Quick Start](build/quick_start.md) - *get NIKA running quickly with minimal setup* + - [Docker](build/docker_build.md) - *build, run, and deploy NIKA using Docker containers* + - [Build System](build/build_system.md) - *understand the underlying build system components* + - [CMake Flags](build/cmake_flags.md) - *configure the build process using available CMake options* +- **Development** - *resources for contributing to the NIKA project* + - [Git workflow](dev/git-workflow.md) - *follow our git workflow for effective collaboration* + - [Pull Request](dev/pr.md) - *guidelines for creating and submitting pull requests* + - [Codestyle](dev/codestyle.md) - *adhere to the project's coding style conventions* +- **Agents** - *description of agents within the NIKA system* + - [Non-atomic action interpretation agent](agents/nonAtomicActionInterpretationAgent.md) - *interprets non-atomic actions* + - [Message reply agent](agents/messageReplyAgent.md) - *generates appropriate responses to user messages* + - [Standard message reply agent](agents/standardMessageReplyAgent.md) - *provides message replies* + - [Message topic classification agent](agents/messageTopicClassificationAgent.md) - *identifies the topic of user messages using Wit.ai* + - [Alternative message topic classification agent](agents/alternativeMessageTopicClassificationAgent.md) - *approach to message topic classification using logic rules* + - [Phrase generation agent](agents/phraseGenerationAgent.md) - *creates natural language phrases* + - [Change interface color agent](agents/changeInterfaceColorAgent.md) - *dynamically adjusts the user interface color* + - [Find word in set by first letter agent](agents/findWordInSetByFirstLetter.md) - *searches for words within a defined set based on their initial letter* + - [Weather agent](agents/weatherAgent.md) - *retrieves and presents weather information* +- **Patterns** - *documentation of knowledge representation patterns* + - [Knowledge base patterns](patterns/kb-patterns.md) - *reusable patterns for structuring the knowledge base* +- **Subsystems** - *information about the internal components of NIKA* + - [scl-machine](subsystems/scl-machine.md) - *details on the `scl-machine` subsystem* +- [License](https://github.com/ostis-apps/nika/blob/main/LICENSE) +- [Changelog](changelog.md) diff --git a/docs/index.ru.md b/docs/index.ru.md index 31c0c9a929..829a7be786 100644 --- a/docs/index.ru.md +++ b/docs/index.ru.md @@ -1,28 +1,36 @@ # Документация -- **Сборка** - * [Docker](build/docker-build.md) - * [Linux](build/linux-build.md) - -- **Разработка** - * [Git workflow](dev/git-workflow.md) - * [Pull Request](dev/pr.md) - *правила создания pull requests* - * [Codestyle](dev/codestyle.md) - *документация по стилю написания кода* - * [Project structure](dev/project_structure.md) - -- **Агенты** - * [Агент интерпретации неатомарных действий](agents/nonAtomicActionInterpretationAgent.ru.md) - * [Агент ответа на сообщениеt](agents/messageReplyAgent.ru.md) - * [Агент генерации ответа на сообщение](agents/standardMessageReplyAgent.ru.md) - * [Агент классификации сообщений с помощью Wit.ai](agents/messageTopicClassificationAgent.ru.md) - * [Агент классификации сообщений с помощью логических правил](agents/alternativeMessageTopicClassificationAgent.ru.md) - * [Агент генерации фраз](agents/phraseGenerationAgent.ru.md) - * [Агент смены цвета компонента интерфейса](agents/changeInterfaceColorAgent.ru.md) - * [Агент поиска слова по первой букве](agents/findWordInSetByFirstLetter.ru.md) - * [Агент прогноза погоды](agents/weatherAgent.ru.md) +Добро пожаловать в документацию [NIKA](https://github.com/ostis-apps/nika)! -- **Шаблоны** - * [Шаблоны для базы знаний](patterns/kb-patterns.ru.md) +## Что такое NIKA? -- **Подсистемы** - * [scl-machine](subsystems/scl-machine.ru.md) +NIKA - это интеллектуальный ассистент, управляемый знаниями, который работает на основе Технологии OSTIS. Это диалоговая система, которая использует преимущества ostis-систем. Для получения дополнительной информации спросите NIKA: "Что такое NIKA?". + +Содержание: + +- [Быстрый старт](quick_start.md) - *быстро начните работу с NIKA* +- **Инструкции по сборке** - *руководства по настройке и компиляции NIKA* + - [Быстрый старт](build/quick_start.md) - *быстро соберите NIKA с минимальной настройкой* + - [Docker](build/docker_build.md) - *сборка, запуск и развертывание NIKA с использованием контейнеров Docker* + - [Система сборки](build/build_system.md) - *понимание компонентов базовой системы сборки* + - [Флаги CMake](build/cmake_flags.md) - *настройка процесса сборки с использованием доступных опций CMake* +- **Разработка** - *ресурсы для участия в проекте NIKA* + - [Git-процесс](dev/git-workflow.md) - *следуйте нашему git-процессу для эффективного сотрудничества* + - [Pull Request](dev/pr.md) - *рекомендации по созданию и отправке pull request'ов* + - [Стиль кода](dev/codestyle.md) - *придерживайтесь соглашений о стиле кодирования проекта* +- **Агенты** - *описание агентов в системе NIKA* + - [Агент интерпретации неатомарных действий](agents/nonAtomicActionInterpretationAgent.md) - *интерпретирует неатомарные действия* + - [Агент ответа на сообщения](agents/messageReplyAgent.md) - *генерирует соответствующие ответы на сообщения пользователя* + - [Стандартный агент ответа на сообщения](agents/standardMessageReplyAgent.md) - *предоставляет ответы на сообщения* + - [Агент классификации темы сообщения](agents/messageTopicClassificationAgent.md) - *определяет тему сообщений пользователя при помощи Wit.ai* + - [Альтернативный агент классификации темы сообщения](agents/alternativeMessageTopicClassificationAgent.md) - *подход к классификации темы сообщений пользователя при помощи логических правил* + - [Агент генерации фраз](agents/phraseGenerationAgent.md) - *создает фразы на естественном языке* + - [Агент изменения цвета компонента интерфейса](agents/changeInterfaceColorAgent.md) - *динамически настраивает цвет пользовательского интерфейса* + - [Агент поиска слова во множестве по первой букве](agents/findWordInSetByFirstLetter.md) - *ищет слова в определенном множестве на основе их начальной буквы* + - [Агент прогноза погоды](agents/weatherAgent.md) - *получает и представляет информацию о погоде* +- **Шаблоны** - *документация паттернов представления знаний* + - [Шаблоны базы знаний](patterns/kb-patterns.md) - *повторно используемые шаблоны для структурирования базы знаний* +- **Подсистемы** - *информация о внутренних компонентах NIKA* + - [scl-machine](subsystems/scl-machine.md) - *подробности о подсистеме `scl-машина`* +- [Лицензия](https://github.com/ostis-apps/nika/blob/main/LICENSE) +- [Список изменений](changelog.md) diff --git a/docs/ostis-logo.png b/docs/ostis-logo.png new file mode 100644 index 0000000000..45440d5f5c Binary files /dev/null and b/docs/ostis-logo.png differ diff --git a/docs/quick_start.md b/docs/quick_start.md new file mode 100644 index 0000000000..0b5a9cbe9f --- /dev/null +++ b/docs/quick_start.md @@ -0,0 +1,74 @@ +# Quick Start + +!!! Note + Currently, using NIKA natively on Windows isn't supported. + +1. Clone repository of the NIKA: + + ```sh + git clone https://github.com/NikitaZotov/nika + cd nika + git checkout feat/migrate_to_0.10.0 + git submodule update --init --recursive + ``` + +2. Install C++ problem solver: + + ```sh + ./scripts/install_cxx_problem_solver.sh + ``` + +3. Build knowledge base: + + ```sh + ./install/sc-machine/bin/sc-builder -i repo.path -o kb.bin --clear + ``` + +4. Run C++ problem solver: + + ```sh + ./install/sc-machine/bin/sc-machine -s kb.bin -c nika.ini \ + -e "install/sc-machine/lib/extensions;install/scl-machine/lib/extensions;install/problem-solver/lib/extensions" + ``` + +5. Install and build sc-web. Open new terminal and run: + + ```sh + cd sc-web + ./scripts/install_dependencies.sh + npm run build + ``` + +6. Run sc-web: + + ```sh + source .venv/bin/activate && python3 server/app.py + ``` + +7. Install Python problem solver dependencies. Open new terminal and run: + + ```sh + python3 -m venv problem-solver/py/.venv + source problem-solver/py/.venv/bin/activate + pip3 install -r problem-solver/py/requirements.txt + ``` + +8. Run Python problem-solver: + + ```sh + python3 problem-solver/py/server.py + ``` + +9. Install and build React interface. Open new terminal and run: + + ```sh + cd interface + npm install + npm run build + ``` + +10. Run React interface: + + ```sh + npm run start + ``` diff --git a/docs/quick_start.ru.md b/docs/quick_start.ru.md new file mode 100644 index 0000000000..9bd57f386b --- /dev/null +++ b/docs/quick_start.ru.md @@ -0,0 +1,74 @@ +# Быстрый старт + +!!! Примечание + В настоящее время NIKA не поддерживается нативно в Windows. + +1. Клонируйте репозиторий NIKA: + + ``` + git clone https://github.com/NikitaZotov/nika + cd nika + git checkout feat/migrate_to_0.10.0 + git submodule update --init --recursive + ``` + +2. Установите C++ решатель задач: + + ``` + ./scripts/install_cxx_problem_solver.sh + ``` + +3. Соберите базу знаний: + + ``` + ./install/sc-machine/bin/sc-builder -i repo.path -o kb.bin --clear + ``` + +4. Запустите C++ решатель задач: + + ``` + ./install/sc-machine/bin/sc-machine -s kb.bin -c nika.ini \ + -e "install/sc-machine/lib/extensions;install/scl-machine/lib/extensions;install/problem-solver/lib/extensions" + ``` + +5. Установите и соберите sc-web. Откройте новый терминал и выполните: + + ``` + cd sc-web + ./scripts/install_dependencies.sh + npm run build + ``` + +6. Запустите sc-web: + + ``` + source .venv/bin/activate && python3 server/app.py + ``` + +7. Установите зависимости Python решателя задач. Откройте новый терминал и выполните: + + ``` + python3 -m venv problem-solver/py/.venv + source problem-solver/py/.venv/bin/activate + pip3 install -r problem-solver/py/requirements.txt + ``` + +8. Запустите Python решатель задач: + + ``` + python3 problem-solver/py/server.py + ``` + +9. Установите и соберите React интерфейс. Откройте новый терминал и выполните: + + ``` + cd interface + npm install + npm run build + ``` + +10. Запустите React интерфейс: + + ``` + npm run start + ``` diff --git a/docs/subsystems/scl-machine.md b/docs/subsystems/scl-machine.md index c38454d860..ee2d5ffe70 100644 --- a/docs/subsystems/scl-machine.md +++ b/docs/subsystems/scl-machine.md @@ -1,2 +1,2 @@ [scl-machine](https://github.com/ostis-ai/scl-machine) allows processing knowledge base using logical formulas. -To read documentation about scl-machine click [here](https://github.com/ostis-ai/scl-machine/blob/main/docs/main.pdf). \ No newline at end of file +To read documentation about scl-machine click [here](https://github.com/ostis-ai/scl-machine/blob/main/docs/main.pdf). diff --git a/ellipsis.yaml b/ellipsis.yaml new file mode 100644 index 0000000000..7ff2e41da5 --- /dev/null +++ b/ellipsis.yaml @@ -0,0 +1,21 @@ +version: 1.3 +about: + - "NIKA is an Intelligent Knowledge-driven Assistant that operates on the basis of the OSTIS Technology" + +pr_review: + rules: + - "Code should be DRY (Don't Repeat Yourself)" + - "There should be no secrets or credentials in the code" + - "Extremely Complicated Code Needs Comments" + - "Use Descriptive Variable and Constant Names" + - "Don't log sensitive data" + - "Follow the Single Responsibility Principle" + - "Function and Method Naming Should Follow Consistent Patterns" + summary_rules: + - "Don't mention changes if the change is only whitespace" + - "When a rename occurs, mention the old and new file names, but don't mention every single spot where the file renamed occurred" + auto_review_enabled: true + enable_approve_prs: true + +pr_address_comments: + delivery: "new_commit" diff --git a/interface/package-lock.json b/interface/package-lock.json index edd49cdded..f3b0795804 100644 --- a/interface/package-lock.json +++ b/interface/package-lock.json @@ -21,6 +21,7 @@ "babel-preset-es2015": "^6.24.1", "dotenv": "^8.2.0", "ejs": "^3.1.6", + "eslint-plugin-sonarjs": "^0.15.0", "mini-css-extract-plugin": "^1.6.0", "nanoid": "^3.3.1", "react": "17.0.2", @@ -32,7 +33,7 @@ "redux-devtools-extension": "^2.13.8", "socket.io-client": "^4.4.1", "styled-components": "^5.3.0", - "ts-sc-client": "^0.1.3" + "ts-sc-client": "^0.5.0" }, "devDependencies": { "@babel/core": "^7.14.3", @@ -42,8 +43,8 @@ "@types/react": "^17.0.40", "@types/react-router-dom": "^5.3.3", "@types/styled-components": "^5.1.24", - "@typescript-eslint/eslint-plugin": "^4.14.0", - "@typescript-eslint/parser": "^4.14.0", + "@typescript-eslint/eslint-plugin": "^5.33.1", + "@typescript-eslint/parser": "^5.33.1", "babel-loader": "^8.2.2", "chalk": "4.1.2", "clean-webpack-plugin": "^3.0.0", @@ -1895,11 +1896,52 @@ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.1.1", @@ -1919,7 +1961,6 @@ "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -1934,7 +1975,6 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, "engines": { "node": ">= 4" } @@ -1943,7 +1983,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", @@ -1956,8 +1995,7 @@ "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, "node_modules/@jridgewell/gen-mapping": { "version": "0.1.1", @@ -2058,11 +2096,6 @@ "node": ">= 8" } }, - "node_modules/@ostis/sc-core": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@ostis/sc-core/-/sc-core-0.3.0.tgz", - "integrity": "sha512-5JF3E3UeYMtrvQTFy3zhwF6hxGN2kYA17U5SewLZWpTNlgwP1DWok5+UII34+sSSO+vyAvKVag5cV2hxKrDR5Q==" - }, "node_modules/@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.4.tgz", @@ -2580,6 +2613,13 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -2656,30 +2696,33 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", - "dev": true, - "dependencies": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -2702,81 +2745,88 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, + "license": "MIT", "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -2784,21 +2834,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -2811,13 +2862,51 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, + "license": "MIT", "dependencies": { - "lru-cache": "^6.0.0" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2826,22 +2915,36 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -3036,7 +3139,6 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -3048,7 +3150,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -3141,7 +3242,6 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, "engines": { "node": ">=6" } @@ -3162,7 +3262,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -3262,7 +3361,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -3337,7 +3435,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, "engines": { "node": ">=8" } @@ -4213,7 +4310,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -4638,7 +4734,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4841,8 +4936,7 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { "version": "4.2.2", @@ -5010,7 +5104,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -5172,8 +5265,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -5249,7 +5341,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, "dependencies": { "ansi-colors": "^4.1.1" }, @@ -5385,7 +5476,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "engines": { "node": ">=10" }, @@ -5397,7 +5487,6 @@ "version": "7.32.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -5552,6 +5641,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/eslint-plugin-sonarjs": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.15.0.tgz", + "integrity": "sha512-LuxHdAe6VqSbi1phsUvNjbmXLuvlobmryQJJNyQYbdubCfz6K8tmgoqNiJPnz0pP2AbYDbtuPm0ajOMgMrC+dQ==", + "license": "LGPL-3.0", + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -5572,29 +5673,10 @@ "node": ">=4.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, "node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, "engines": { "node": ">=10" } @@ -5603,7 +5685,6 @@ "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, "dependencies": { "@babel/highlight": "^7.10.4" } @@ -5612,7 +5693,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^1.1.0" }, @@ -5627,7 +5707,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, "engines": { "node": ">=4" } @@ -5636,7 +5715,6 @@ "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -5651,7 +5729,6 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, "engines": { "node": ">= 4" } @@ -5660,7 +5737,6 @@ "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -5675,7 +5751,6 @@ "version": "7.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, "dependencies": { "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", @@ -5689,7 +5764,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, "engines": { "node": ">=4" } @@ -5698,7 +5772,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -5711,7 +5784,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -5925,8 +5997,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -5962,7 +6033,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -6099,7 +6169,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -6112,7 +6181,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -6126,8 +6194,7 @@ "node_modules/flatted": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" }, "node_modules/follow-redirects": { "version": "1.15.1", @@ -6291,8 +6358,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", @@ -6334,8 +6400,7 @@ "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, "node_modules/functions-have-names": { "version": "1.2.3", @@ -6399,7 +6464,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6419,7 +6483,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -6465,6 +6528,13 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, "node_modules/gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -6846,7 +6916,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -6881,7 +6950,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, "engines": { "node": ">=0.8.19" } @@ -6899,7 +6967,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -6908,8 +6975,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-ip": { "version": "6.2.0", @@ -7112,7 +7178,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -7121,7 +7186,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -7130,7 +7194,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -7345,8 +7408,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isobject": { "version": "3.0.1", @@ -7410,7 +7472,6 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -7443,8 +7504,7 @@ "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "node_modules/json2mq": { "version": "0.2.0", @@ -7503,7 +7563,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -7567,14 +7626,12 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" }, "node_modules/loose-envify": { "version": "1.4.0", @@ -7600,7 +7657,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -7860,8 +7916,14 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", @@ -8084,7 +8146,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -8134,7 +8195,6 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -8258,7 +8318,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -8316,7 +8375,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -8331,7 +8389,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -8605,7 +8662,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -8665,7 +8721,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -9614,7 +9669,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, "engines": { "node": ">=8" }, @@ -9688,7 +9742,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -9750,7 +9803,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -10055,7 +10107,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -10067,7 +10118,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -10119,7 +10169,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -10279,8 +10328,7 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/stable": { "version": "0.1.8", @@ -10342,7 +10390,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10403,7 +10450,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -10424,7 +10470,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "engines": { "node": ">=8" }, @@ -10563,7 +10608,6 @@ "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", - "dev": true, "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -10579,7 +10623,6 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -10594,8 +10637,7 @@ "node_modules/table/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/tapable": { "version": "2.2.1", @@ -10674,8 +10716,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/thunky": { "version": "1.1.0", @@ -10737,9 +10778,10 @@ } }, "node_modules/ts-sc-client": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.1.3.tgz", - "integrity": "sha512-aVUidgGLPEAo3BaF+Yp97OTYR2vlDnSC9TzM4fTkgwKCw6bl5mtzyjBv+HSNhosoOtz1PaOz/F6BzlyIb6dHTw==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.5.0.tgz", + "integrity": "sha512-JKXADYsTYTydUWMgqTGAVyBpUfBzHt0rOVF1wnfDZzv6vyL6KSohBUTK5gBJg8+ZYP3JkhiiLDmX+VKZVzLaZg==", + "license": "MIT" }, "node_modules/tslib": { "version": "2.4.0", @@ -10752,6 +10794,7 @@ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -10766,13 +10809,13 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -10784,7 +10827,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -10969,8 +11011,7 @@ "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "node_modules/value-equal": { "version": "1.0.1", @@ -11475,7 +11516,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -11512,7 +11552,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -11520,8 +11559,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { "version": "8.2.3", @@ -11554,8 +11592,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { "version": "1.10.2", @@ -12825,11 +12862,33 @@ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, + "@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.4.3" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + } + } + }, + "@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true + }, "@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", @@ -12846,7 +12905,6 @@ "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, "requires": { "type-fest": "^0.20.2" } @@ -12854,8 +12912,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" } } }, @@ -12863,7 +12920,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", @@ -12873,8 +12929,7 @@ "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, "@jridgewell/gen-mapping": { "version": "0.1.1", @@ -12956,11 +13011,6 @@ "fastq": "^1.6.0" } }, - "@ostis/sc-core": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@ostis/sc-core/-/sc-core-0.3.0.tgz", - "integrity": "sha512-5JF3E3UeYMtrvQTFy3zhwF6hxGN2kYA17U5SewLZWpTNlgwP1DWok5+UII34+sSSO+vyAvKVag5cV2hxKrDR5Q==" - }, "@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.4.tgz", @@ -13307,6 +13357,12 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, + "@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -13381,18 +13437,20 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { @@ -13407,82 +13465,109 @@ } } }, - "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" } }, - "@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" } }, - "@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "dependencies": { + "semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true } } }, "@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + } } }, "@webassemblyjs/ast": { @@ -13662,14 +13747,12 @@ "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, "requires": {} }, "acorn-walk": { @@ -13737,8 +13820,7 @@ "ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==" }, "ansi-html-community": { "version": "0.0.8", @@ -13749,8 +13831,7 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", @@ -13830,7 +13911,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -13886,8 +13966,7 @@ "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" }, "async": { "version": "3.2.4", @@ -14672,8 +14751,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camel-case": { "version": "4.1.2", @@ -14991,7 +15069,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -15134,8 +15211,7 @@ "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "deepmerge": { "version": "4.2.2", @@ -15270,7 +15346,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "requires": { "esutils": "^2.0.2" } @@ -15395,8 +15470,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -15457,7 +15531,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, "requires": { "ansi-colors": "^4.1.1" } @@ -15562,14 +15635,12 @@ "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, "eslint": { "version": "7.32.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, "requires": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -15617,7 +15688,6 @@ "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, "requires": { "@babel/highlight": "^7.10.4" } @@ -15626,7 +15696,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" }, @@ -15634,8 +15703,7 @@ "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" } } }, @@ -15643,7 +15711,6 @@ "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, "requires": { "type-fest": "^0.20.2" } @@ -15651,14 +15718,12 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, "semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, "requires": { "lru-cache": "^6.0.0" } @@ -15732,6 +15797,12 @@ "dev": true, "requires": {} }, + "eslint-plugin-sonarjs": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.15.0.tgz", + "integrity": "sha512-LuxHdAe6VqSbi1phsUvNjbmXLuvlobmryQJJNyQYbdubCfz6K8tmgoqNiJPnz0pP2AbYDbtuPm0ajOMgMrC+dQ==", + "requires": {} + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -15748,26 +15819,15 @@ } } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, "eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" }, "espree": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, "requires": { "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", @@ -15777,22 +15837,19 @@ "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" } } }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, "requires": { "estraverse": "^5.1.0" } @@ -15961,8 +16018,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "fastest-levenshtein": { "version": "1.0.16", @@ -15992,7 +16048,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "requires": { "flat-cache": "^3.0.4" } @@ -16099,7 +16154,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -16109,7 +16163,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -16119,8 +16172,7 @@ "flatted": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" }, "follow-redirects": { "version": "1.15.1", @@ -16229,8 +16281,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "fsevents": { "version": "2.3.2", @@ -16259,8 +16310,7 @@ "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, "functions-have-names": { "version": "1.2.3", @@ -16303,7 +16353,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -16317,7 +16366,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -16351,6 +16399,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -16640,7 +16694,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -16659,8 +16712,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" }, "indent-string": { "version": "4.0.0", @@ -16672,7 +16724,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -16681,8 +16732,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "internal-ip": { "version": "6.2.0", @@ -16823,20 +16873,17 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -16979,8 +17026,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "isobject": { "version": "3.0.1", @@ -17028,7 +17074,6 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -17052,8 +17097,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "json2mq": { "version": "0.2.0", @@ -17098,7 +17142,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -17147,14 +17190,12 @@ "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" }, "loose-envify": { "version": "1.4.0", @@ -17177,7 +17218,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -17363,7 +17403,12 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, "negotiator": { @@ -17527,7 +17572,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "requires": { "wrappy": "1" } @@ -17562,7 +17606,6 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -17650,7 +17693,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" } @@ -17692,8 +17734,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-is-inside": { "version": "1.0.2", @@ -17704,8 +17745,7 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, "path-parse": { "version": "1.0.7", @@ -17901,8 +17941,7 @@ "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, "prettier": { "version": "2.7.1", @@ -17943,8 +17982,7 @@ "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "prop-types": { "version": "15.8.1", @@ -18630,8 +18668,7 @@ "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" }, "regexpu-core": { "version": "5.1.0", @@ -18688,8 +18725,7 @@ "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "requires-port": { "version": "1.0.0", @@ -18737,8 +18773,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "resolve-pathname": { "version": "3.0.0", @@ -18991,7 +19026,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -18999,8 +19033,7 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, "side-channel": { "version": "1.0.4", @@ -19040,7 +19073,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -19174,8 +19206,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "stable": { "version": "0.1.8", @@ -19221,7 +19252,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -19270,7 +19300,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -19284,8 +19313,7 @@ "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "style-loader": { "version": "2.0.0", @@ -19375,7 +19403,6 @@ "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", - "dev": true, "requires": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -19388,7 +19415,6 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -19399,8 +19425,7 @@ "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" } } }, @@ -19447,8 +19472,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "thunky": { "version": "1.1.0", @@ -19498,9 +19522,9 @@ "dev": true }, "ts-sc-client": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.1.3.tgz", - "integrity": "sha512-aVUidgGLPEAo3BaF+Yp97OTYR2vlDnSC9TzM4fTkgwKCw6bl5mtzyjBv+HSNhosoOtz1PaOz/F6BzlyIb6dHTw==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.5.0.tgz", + "integrity": "sha512-JKXADYsTYTydUWMgqTGAVyBpUfBzHt0rOVF1wnfDZzv6vyL6KSohBUTK5gBJg8+ZYP3JkhiiLDmX+VKZVzLaZg==" }, "tslib": { "version": "2.4.0", @@ -19529,7 +19553,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "requires": { "prelude-ls": "^1.2.1" } @@ -19537,8 +19560,7 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" }, "type-is": { "version": "1.6.18", @@ -19666,8 +19688,7 @@ "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "value-equal": { "version": "1.0.1", @@ -20010,7 +20031,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -20037,14 +20057,12 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "ws": { "version": "8.2.3", @@ -20060,8 +20078,7 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { "version": "1.10.2", diff --git a/interface/package.json b/interface/package.json index 03d88ee327..124d4030d0 100644 --- a/interface/package.json +++ b/interface/package.json @@ -78,7 +78,7 @@ "redux-devtools-extension": "^2.13.8", "socket.io-client": "^4.4.1", "styled-components": "^5.3.0", - "ts-sc-client": "^0.1.3", + "ts-sc-client": "^0.5.0", "eslint-plugin-sonarjs": "^0.15.0" }, "husky": { diff --git a/interface/src/App.tsx b/interface/src/App.tsx index bdf294590f..bf68d267a6 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -3,7 +3,7 @@ import { Route, Redirect } from "react-router-dom"; import { loadingComponent } from '@components/LoadingComponent'; import { routes } from '@constants'; import { client } from "@api"; -import { ScAddr, ScEventParams, ScEventType, ScTemplate, ScType } from "ts-sc-client"; +import { ScEventSubscriptionParams, ScEventType, ScTemplate, ScType } from "ts-sc-client"; import 'antd/dist/antd.css'; import './assets/main.css'; @@ -45,13 +45,13 @@ export const App = () => { const componentColor = 'nrel_component_color'; const baseKeynodes = [ - { id: conceptHeader, type: ScType.NodeConstClass }, - { id: conceptMainPart, type: ScType.NodeConstClass }, - { id: conceptFooter, type: ScType.NodeConstClass }, + { id: conceptHeader, type: ScType.ConstNodeClass }, + { id: conceptMainPart, type: ScType.ConstNodeClass }, + { id: conceptFooter, type: ScType.ConstNodeClass }, ]; const helpKeynodes = [ - { id: componentColor, type: ScType.NodeConstNoRole }, + { id: componentColor, type: ScType.ConstNodeNonRole }, ]; const colorAlias = '_color'; @@ -64,17 +64,17 @@ export const App = () => { const template = new ScTemplate(); template.triple( keynodes[baseKeynodes[i].id], - ScType.EdgeAccessVarPosPerm, - [ScType.NodeVar, componentAlias], + ScType.VarPermPosArc, + [ScType.VarNode, componentAlias], ); - template.tripleWithRelation( + template.quintuple( componentAlias, - ScType.EdgeDCommonVar, - [ScType.LinkVar, colorAlias], - ScType.EdgeAccessVarPosPerm, + ScType.VarCommonArc, + [ScType.VarNodeLink, colorAlias], + ScType.VarPermPosArc, hKeynodes[componentColor], ); - const resultColorLink = await client.templateSearch(template); + const resultColorLink = await client.searchByTemplate(template); if (resultColorLink.length) { const colorLink = resultColorLink[0].get(colorAlias); @@ -82,8 +82,8 @@ export const App = () => { if (resultColor.length) { let color = resultColor[0].data; funcChange[i](color as any); - const eventParams = new ScEventParams(colorLink, ScEventType.ChangeContent, fetchColorValue); - await client.eventsCreate([eventParams]); + const eventParams = new ScEventSubscriptionParams(colorLink, ScEventType.BeforeChangeLinkContent, fetchColorValue); + await client.createElementaryEventSubscriptions([eventParams]); } } } diff --git a/interface/src/api/sc/agents/dialogAgent.ts b/interface/src/api/sc/agents/dialogAgent.ts index cb0c93c7d5..f891898e84 100644 --- a/interface/src/api/sc/agents/dialogAgent.ts +++ b/interface/src/api/sc/agents/dialogAgent.ts @@ -5,8 +5,8 @@ const conceptDialog = 'concept_dialogue'; const rrelDialogParticipant = 'rrel_dialog_participant'; const baseKeynodes = [ - { id: conceptDialog, type: ScType.NodeConstClass }, - { id: rrelDialogParticipant, type: ScType.NodeConstRole }, + { id: conceptDialog, type: ScType.ConstNodeClass }, + { id: rrelDialogParticipant, type: ScType.ConstNodeRole }, ]; const findDialogNode = async (user: ScAddr) => { @@ -16,17 +16,17 @@ const findDialogNode = async (user: ScAddr) => { const template = new ScTemplate(); template.triple( keynodes[conceptDialog], - ScType.EdgeAccessVarPosPerm, - [ScType.NodeVar, dialog], + ScType.VarPermPosArc, + [ScType.VarNode, dialog], ); - template.tripleWithRelation( + template.quintuple( dialog, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, user, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[rrelDialogParticipant], ); - const resultDialogNode = await client.templateSearch(template); + const resultDialogNode = await client.searchByTemplate(template); if (resultDialogNode.length) { return resultDialogNode[0].get(dialog); diff --git a/interface/src/api/sc/agents/makeAgent.ts b/interface/src/api/sc/agents/makeAgent.ts index 1defce9870..363a4c6401 100644 --- a/interface/src/api/sc/agents/makeAgent.ts +++ b/interface/src/api/sc/agents/makeAgent.ts @@ -1,20 +1,20 @@ -import { ScAddr, ScConstruction, ScEventParams, ScEventType, ScTemplate, ScType } from 'ts-sc-client'; +import { ScAddr, ScConstruction, ScEventSubscriptionParams, ScEventType, ScTemplate, ScType } from 'ts-sc-client'; import { client } from '@api/sc/client'; const action = 'action'; const actionInitiated = 'action_initiated'; -const answer = 'nrel_answer'; +const result = 'nrel_result'; const actionFinished = 'action_finished'; const baseKeynodes = [ - { id: action, type: ScType.NodeConstClass }, - { id: actionInitiated, type: ScType.NodeConstClass }, - { id: answer, type: ScType.NodeConstNoRole }, - { id: actionFinished, type: ScType.NodeConstClass }, + { id: action, type: ScType.ConstNodeClass }, + { id: actionInitiated, type: ScType.ConstNodeClass }, + { id: result, type: ScType.ConstNodeNonRole }, + { id: actionFinished, type: ScType.ConstNodeClass }, ]; const describeAgent = async (template: ScTemplate, actionNodeAlias: string) => { - const generationResult = await client.templateGenerate(template, {}); + const generationResult = await client.generateByTemplate(template, {}); if (generationResult && generationResult.size > 0) { return generationResult.get(actionNodeAlias); @@ -26,17 +26,17 @@ const findResultCircuit = async (actionNode: ScAddr, keynodes: Record, onResponse: () => void) => { const onActionFinished = (_subscibedAddr: ScAddr, _arc: ScAddr, anotherAddr: ScAddr, eventId: number) => { if (anotherAddr.isValid() && anotherAddr.equal(keynodes[actionFinished])) { - client.eventsDestroy(eventId); + client.destroyElementaryEventSubscriptions(eventId); onResponse(); } }; - const eventParams = new ScEventParams(actionNode, ScEventType.AddIngoingEdge, onActionFinished); + const eventParams = new ScEventSubscriptionParams(actionNode, ScEventType.AfterGenerateIncomingArc, onActionFinished); - client.eventsCreate(eventParams); + client.createElementaryEventSubscriptions(eventParams); }; export const makeAgent = (template: ScTemplate, actionNodeAlias: string) => { @@ -65,8 +65,8 @@ export const makeAgent = (template: ScTemplate, actionNodeAlias: string) => { }; await subscribeToAgentAnswer(actionNode, keynodes, onResponse); const construction = new ScConstruction(); - construction.createEdge(ScType.EdgeAccessConstPosPerm, keynodes[actionInitiated], actionNode); - client.createElements(construction); + construction.generateConnector(ScType.ConstPermPosArc, keynodes[actionInitiated], actionNode); + client.generateElements(construction); }); }); }; diff --git a/interface/src/api/sc/agents/newMessageAgent.ts b/interface/src/api/sc/agents/newMessageAgent.ts index 603a2688f6..826491f42f 100644 --- a/interface/src/api/sc/agents/newMessageAgent.ts +++ b/interface/src/api/sc/agents/newMessageAgent.ts @@ -12,26 +12,26 @@ const conceptTextFile = 'concept_text_file'; const langEn = 'lang_en'; const langRu = 'lang_ru'; const actionFinished = 'action_finished'; -const answer = 'nrel_answer'; +const result = 'nrel_result'; const baseKeynodes = [ - { id: action, type: ScType.NodeConstClass }, - { id: actionInitiated, type: ScType.NodeConstClass }, - { id: actionReplyToMessage, type: ScType.NodeConstClass }, - { id: rrel1, type: ScType.NodeConstRole }, - { id: rrel2, type: ScType.NodeConstRole }, - { id: nrelAuthors, type: ScType.NodeConstNoRole }, - { id: conceptTextFile, type: ScType.NodeConstClass }, - { id: langEn, type: ScType.NodeConstClass }, - { id: langRu, type: ScType.NodeConstClass }, - { id: actionFinished, type: ScType.NodeConstClass }, - { id: answer, type: ScType.NodeConstNoRole }, + { id: action, type: ScType.ConstNodeClass }, + { id: actionInitiated, type: ScType.ConstNodeClass }, + { id: actionReplyToMessage, type: ScType.ConstNodeClass }, + { id: rrel1, type: ScType.ConstNodeRole }, + { id: rrel2, type: ScType.ConstNodeRole }, + { id: nrelAuthors, type: ScType.ConstNodeNonRole }, + { id: conceptTextFile, type: ScType.ConstNodeClass }, + { id: langEn, type: ScType.ConstNodeClass }, + { id: langRu, type: ScType.ConstNodeClass }, + { id: actionFinished, type: ScType.ConstNodeClass }, + { id: result, type: ScType.ConstNodeNonRole }, ]; -export const createLinkText = async (messageText: string) => { +export const generateLinkText = async (messageText: string) => { const constructionLink = new ScConstruction(); - constructionLink.createLink(ScType.LinkConst, new ScLinkContent(messageText, ScLinkContentType.String)); - const resultLinkNode = await client.createElements(constructionLink); + constructionLink.generateLink(ScType.ConstNodeLink, new ScLinkContent(messageText, ScLinkContentType.String)); + const resultLinkNode = await client.generateElements(constructionLink); if (resultLinkNode.length) { return resultLinkNode[0]; } @@ -48,32 +48,32 @@ const describeAgent = async ( const template = new ScTemplate(); - template.triple(keynodes[action], ScType.EdgeAccessVarPosPerm, [ScType.NodeVar, actionNodeAlias]); - template.triple(keynodes[actionReplyToMessage], ScType.EdgeAccessVarPosPerm, actionNodeAlias); + template.triple(keynodes[action], ScType.VarPermPosArc, [ScType.VarNode, actionNodeAlias]); + template.triple(keynodes[actionReplyToMessage], ScType.VarPermPosArc, actionNodeAlias); - template.tripleWithRelation( + template.quintuple( actionNodeAlias, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, linkAddr, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[rrel1], ); - template.tripleWithRelation( + template.quintuple( actionNodeAlias, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, chatNode, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[rrel2], ); - template.tripleWithRelation( + template.quintuple( actionNodeAlias, - ScType.EdgeDCommonVar, + ScType.VarCommonArc, author, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[nrelAuthors], ); - template.triple(keynodes[conceptTextFile], ScType.EdgeAccessVarPosPerm, linkAddr); - template.triple(keynodes[langRu], ScType.EdgeAccessVarPosPerm, linkAddr); + template.triple(keynodes[conceptTextFile], ScType.VarPermPosArc, linkAddr); + template.triple(keynodes[langRu], ScType.VarPermPosArc, linkAddr); return [template, actionNodeAlias] as const; }; @@ -82,8 +82,8 @@ const findNewMessageNode = async (circuitAddr: ScAddr) => { const message = '_message'; const template = new ScTemplate(); - template.triple(circuitAddr, ScType.EdgeAccessVarPosPerm, [ScType.NodeVar, message]); - const resultMessageNode = await client.templateSearch(template); + template.triple(circuitAddr, ScType.VarPermPosArc, [ScType.VarNode, message]); + const resultMessageNode = await client.searchByTemplate(template); if (resultMessageNode.length) { return resultMessageNode[0].get(message); diff --git a/interface/src/api/sc/agents/resolveUserAgent.ts b/interface/src/api/sc/agents/resolveUserAgent.ts index c723364518..96a4c02147 100644 --- a/interface/src/api/sc/agents/resolveUserAgent.ts +++ b/interface/src/api/sc/agents/resolveUserAgent.ts @@ -6,9 +6,9 @@ const conceptDialog = 'concept_dialogue'; const rrelDialogParticipant = 'rrel_dialog_participant'; const baseKeynodes = [ - { id: conceptUser, type: ScType.NodeConstClass }, - { id: conceptDialog, type: ScType.NodeConstClass }, - { id: rrelDialogParticipant, type: ScType.NodeConstRole }, + { id: conceptUser, type: ScType.ConstNodeClass }, + { id: conceptDialog, type: ScType.ConstNodeClass }, + { id: rrelDialogParticipant, type: ScType.ConstNodeRole }, ]; const getUser = async () => { @@ -18,10 +18,10 @@ const getUser = async () => { const template = new ScTemplate(); template.triple( keynodes[conceptUser], - ScType.EdgeAccessVarPosPerm, - [ScType.NodeVar, user], + ScType.VarPermPosArc, + [ScType.VarNode, user], ); - const result = await client.templateSearch(template); + const result = await client.searchByTemplate(template); if (result.length === 1) { return result[0].get(user); } @@ -36,22 +36,22 @@ const createUser = async () => { const template = new ScTemplate(); template.triple( keynodes[conceptUser], - ScType.EdgeAccessVarPosPerm, - [ScType.NodeVar, user], + ScType.VarPermPosArc, + [ScType.VarNode, user], ); template.triple( keynodes[conceptDialog], - ScType.EdgeAccessVarPosPerm, - [ScType.NodeVar, dialog], + ScType.VarPermPosArc, + [ScType.VarNode, dialog], ); - template.tripleWithRelation( + template.quintuple( dialog, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, user, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[rrelDialogParticipant], ); - const result = await client.templateGenerate(template, {}); + const result = await client.generateByTemplate(template, {}); return result?.get(user); } diff --git a/interface/src/api/sc/search/searchChatMessages.ts b/interface/src/api/sc/search/searchChatMessages.ts index d7db8852e5..2a0b994105 100644 --- a/interface/src/api/sc/search/searchChatMessages.ts +++ b/interface/src/api/sc/search/searchChatMessages.ts @@ -8,11 +8,11 @@ const nrelMessageSequence = 'nrel_message_sequence'; const rrelLast = 'rrel_last'; const baseKeynodes = [ - { id: rrel1, type: ScType.NodeConstRole }, - { id: nrelAuth, type: ScType.NodeConstNoRole }, - { id: nrelScTextTranslation, type: ScType.NodeConstNoRole }, - { id: nrelMessageSequence, type: ScType.NodeConstNoRole }, - { id: rrelLast, type: ScType.NodeConstRole }, + { id: rrel1, type: ScType.ConstNodeRole }, + { id: nrelAuth, type: ScType.ConstNodeNonRole }, + { id: nrelScTextTranslation, type: ScType.ConstNodeNonRole }, + { id: nrelMessageSequence, type: ScType.ConstNodeNonRole }, + { id: rrelLast, type: ScType.ConstNodeRole }, ]; interface IMessage { @@ -28,14 +28,14 @@ const findLastMessageNode = async (chatNode: ScAddr, keynodes: Record { const currentEdgeAlias = '_current_edge'; const template = new ScTemplate(); - template.triple(chatNode, [ScType.EdgeAccessVarPosPerm, currentEdgeAlias], messageNode); - const resultLastMessageEdge = await client.templateSearch(template); + template.triple(chatNode, [ScType.VarPermPosArc, currentEdgeAlias], messageNode); + const resultLastMessageEdge = await client.searchByTemplate(template); if (resultLastMessageEdge.length) { return resultLastMessageEdge[0].get(currentEdgeAlias); @@ -58,9 +58,9 @@ const findPreviousMessageNode = async (chatNode: ScAddr, currentEdge: ScAddr) => const previousMessageClassAlias = '_privious_message_class'; const templatePreviousMessageClass = new ScTemplate(); - templatePreviousMessageClass.triple(chatNode, currentEdge, [ScType.NodeVar, previousMessageClassAlias]); + templatePreviousMessageClass.triple(chatNode, currentEdge, [ScType.VarNode, previousMessageClassAlias]); - const resultNextMessageClassEdge = await client.templateSearch(templatePreviousMessageClass); + const resultNextMessageClassEdge = await client.searchByTemplate(templatePreviousMessageClass); if (resultNextMessageClassEdge.length) { return resultNextMessageClassEdge[0].get(previousMessageClassAlias); } @@ -72,17 +72,17 @@ const findPreviousEdge = async (chatNode: ScAddr, keynodes: Record, chatNode: ScAddr, messageNode: ScAddr) => { const template = new ScTemplate(); - template.tripleWithRelation( + template.quintuple( chatNode, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, messageNode, - ScType.EdgeAccessVarPosPerm, + ScType.VarPermPosArc, keynodes[rrel1], ); - const result = await client.templateSearch(template); + const result = await client.searchByTemplate(template); return !!result.length; }; diff --git a/interface/src/components/Chat/Chat.tsx b/interface/src/components/Chat/Chat.tsx index fc63408a26..a52304a886 100644 --- a/interface/src/components/Chat/Chat.tsx +++ b/interface/src/components/Chat/Chat.tsx @@ -97,7 +97,7 @@ export const Chat = forwardRef>( return arr[arr.length - 2]; }; - const checkMesssageInVisible = (el: Element | null | undefined) => { + const checkMessageInVisible = (el: Element | null | undefined) => { const elementTop = el?.getBoundingClientRect().top; const inputTop = footerRef.current?.lastElementChild?.getBoundingClientRect().top; @@ -105,11 +105,11 @@ export const Chat = forwardRef>( return elementTop - inputTop > -10; }; - const checkLastMesssageInVisible = () => checkMesssageInVisible(mainRef.current?.lastElementChild); + const checkLastMessageInVisible = () => checkMessageInVisible(mainRef.current?.lastElementChild); const onScroll = (e: React.UIEvent) => { setScrollHappened(true); - setShowArrow(checkLastMesssageInVisible()); + setShowArrow(checkLastMessageInVisible()); const currentScrollFromTop = e.currentTarget.scrollTop; if (currentScrollFromTop === 0) setShouldLoadMoreMessages(true); @@ -160,13 +160,13 @@ export const Chat = forwardRef>( }, [hasMoreMessages, shouldLoadMoreMessages, isLoading, onFetching]); useEffect(() => { - if (checkMesssageInVisible(mainRef.current?.lastElementChild) && !scrollHappened) { + if (checkMessageInVisible(mainRef.current?.lastElementChild) && !scrollHappened) { scrollToLastMessage(); } }, [children, scrollHappened]); useEffect(() => { - if (!checkMesssageInVisible(penultimateEl())) { + if (!checkMessageInVisible(penultimateEl())) { scrollToLastMessage(); } }, [children]); diff --git a/interface/src/hooks/useChat.ts b/interface/src/hooks/useChat.ts index b6e7a7f201..a6139f8476 100644 --- a/interface/src/hooks/useChat.ts +++ b/interface/src/hooks/useChat.ts @@ -1,9 +1,9 @@ import { useCallback, useEffect, useRef, useState } from 'react'; -import { ScAddr, ScEventParams, ScEventType, ScType } from 'ts-sc-client'; +import { ScAddr, ScEventSubscriptionParams, ScEventType, ScType } from 'ts-sc-client'; import { client } from '@api'; import { dialogAgent } from '@api/sc/agents/dialogAgent'; import { getInfoMessage, searchChatMessages } from '@api/sc/search/searchChatMessages'; -import { newMessageAgent, createLinkText } from '@api/sc/agents/newMessageAgent'; +import { newMessageAgent, generateLinkText } from '@api/sc/agents/newMessageAgent'; interface IMessage { addr: ScAddr; @@ -30,8 +30,8 @@ export const useChat = (user: ScAddr | null) => { const nrelScTextTranslation = 'nrel_sc_text_translation'; const baseKeynodes = [ - { id: nrelAuthors, type: ScType.NodeConstNoRole }, - { id: nrelScTextTranslation, type: ScType.NodeConstNoRole }, + { id: nrelAuthors, type: ScType.ConstNodeNonRole }, + { id: nrelScTextTranslation, type: ScType.ConstNodeNonRole }, ]; const keynodes = await client.resolveKeynodes(baseKeynodes); @@ -47,8 +47,8 @@ export const useChat = (user: ScAddr | null) => { }); if (newMessage.author.equal(user)) setIsAgentAnswer(true); }; - const eventParams = new ScEventParams(chatNode, ScEventType.AddOutgoingEdge, onActionFinished); - await client.eventsCreate([eventParams]); + const eventParams = new ScEventSubscriptionParams(chatNode, ScEventType.AfterGenerateOutgoingArc, onActionFinished); + await client.createElementaryEventSubscriptions([eventParams]); }, [chatNode, user]); const minNumberMessages = () => { @@ -90,7 +90,7 @@ export const useChat = (user: ScAddr | null) => { const sendMessage = useCallback( async (user: ScAddr, text: string) => { - const linkAddr = await createLinkText(text); + const linkAddr = await generateLinkText(text); if (!linkAddr || !chatNode) return; const date = new Date(); const message = { diff --git a/interface/yarn.lock b/interface/yarn.lock index 6788c7f2e3..870663d780 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -44,13 +44,6 @@ lodash "^4.17.21" resize-observer-polyfill "^1.5.1" -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" @@ -58,12 +51,19 @@ dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8": version "7.18.8" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz" integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== -"@babel/core@^7.14.3", "@babel/core@^7.18.5": +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.14.3", "@babel/core@^7.18.5", "@babel/core@^7.4.0-0": version "7.18.10" resolved "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz" integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== @@ -1071,6 +1071,18 @@ resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.1" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.4.0": + version "4.12.1" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz" @@ -1108,7 +1120,16 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.2" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/gen-mapping@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== @@ -1156,7 +1177,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -1258,7 +1279,7 @@ "@svgr/babel-plugin-transform-react-native-svg" "^6.3.1" "@svgr/babel-plugin-transform-svg-component" "^6.3.1" -"@svgr/core@^6.3.1": +"@svgr/core@^6.0.0", "@svgr/core@^6.3.1": version "6.3.1" resolved "https://registry.npmjs.org/@svgr/core/-/core-6.3.1.tgz" integrity sha512-Sm3/7OdXbQreemf9aO25keerZSbnKMpGEfmH90EyYpj1e8wMD4TuwJIb3THDSgRMWk1kYJfSRulELBy4gVgZUA== @@ -1460,6 +1481,11 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/semver@^7.3.12": + version "7.5.8" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz" @@ -1495,7 +1521,7 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@^4.4.31": +"@types/webpack@^4.4.31", "@types/webpack@4.x || 5.x": version "4.41.32" resolved "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.32.tgz" integrity sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg== @@ -1508,83 +1534,87 @@ source-map "^0.6.0" "@typescript-eslint/eslint-plugin@^5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz#c0a480d05211660221eda963cc844732fe9b1714" - integrity sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ== - dependencies: - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/type-utils" "5.33.1" - "@typescript-eslint/utils" "5.33.1" + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" - functional-red-black-tree "^1.0.1" + graphemer "^1.4.0" ignore "^5.2.0" - regexpp "^3.2.0" + natural-compare-lite "^1.4.0" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.33.1.tgz#e4b253105b4d2a4362cfaa4e184e2d226c440ff3" - integrity sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA== +"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.33.1": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/typescript-estree" "5.33.1" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz#8d31553e1b874210018ca069b3d192c6d23bc493" - integrity sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA== +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/visitor-keys" "5.33.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz#1a14e94650a0ae39f6e3b77478baff002cec4367" - integrity sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g== +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/utils" "5.33.1" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.33.1.tgz#3faef41793d527a519e19ab2747c12d6f3741ff7" - integrity sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz#a573bd360790afdcba80844e962d8b2031984f34" - integrity sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/visitor-keys" "5.33.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.33.1.tgz#171725f924fe1fe82bb776522bb85bc034e88575" - integrity sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ== +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: + "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/typescript-estree" "5.33.1" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.33.1": - version "5.33.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz#0155c7571c8cd08956580b880aea327d5c34a18b" - integrity sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.33.1" + "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -1758,12 +1788,22 @@ acorn-walk@^8.0.0: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.4.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^7.4.0: version "7.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1: +acorn@^8, acorn@^8.7.1: + version "8.8.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +acorn@^8.0.4: + version "8.8.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +acorn@^8.5.0: version "8.8.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -1795,7 +1835,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1805,7 +1845,27 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: +ajv@^8.0.0: + version "8.11.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.11.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ajv@^8.8.0, ajv@^8.8.2: version "8.11.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== @@ -1929,16 +1989,16 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - array-flatten@^2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-includes@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz" @@ -2456,7 +2516,7 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64id@2.0.0, base64id@~2.0.0: +base64id@~2.0.0, base64id@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== @@ -2533,7 +2593,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.3: +browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.3, "browserslist@>= 4.21.0": version "4.21.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz" integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== @@ -2599,14 +2659,6 @@ caniuse-lite@^1.0.30001370: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001378.tgz" integrity sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA== -chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" @@ -2627,6 +2679,14 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2, chalk@4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" @@ -2647,7 +2707,7 @@ chrome-trace-event@^1.0.2: resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== -classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1: +classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1, classnames@2.x: version "2.3.1" resolved "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz" integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== @@ -2695,16 +2755,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + colorette@^1.2.2: version "1.4.0" resolved "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz" @@ -2720,7 +2780,12 @@ commander@^2.20.0: resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^7.0.0, commander@^7.2.0: +commander@^7.0.0: + version "7.2.0" + resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +commander@^7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -2804,16 +2869,16 @@ cookie-signature@1.0.6: resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - cookie@~0.4.1: version "0.4.2" resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + copy-to-clipboard@^3.2.0: version "3.3.2" resolved "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz" @@ -2953,7 +3018,7 @@ dayjs@1.x: resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz" integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== -debug@2.6.9, debug@^2.6.8: +debug@^2.6.8: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2974,6 +3039,13 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.4, debug@~4.3.1, debug@~4.3 dependencies: ms "2.1.2" +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz" @@ -3043,16 +3115,16 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" -depd@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - depd@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + destroy@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" @@ -3346,7 +3418,12 @@ escape-html@~1.0.3: resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== @@ -3395,10 +3472,10 @@ eslint-plugin-react@^7.22.0: eslint-plugin-sonarjs@^0.15.0: version "0.15.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.15.0.tgz#f9c904f143f4e2336f2923be08399b32b5bd2781" + resolved "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.15.0.tgz" integrity sha512-LuxHdAe6VqSbi1phsUvNjbmXLuvlobmryQJJNyQYbdubCfz6K8tmgoqNiJPnz0pP2AbYDbtuPm0ajOMgMrC+dQ== -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@^5.1.1, eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3413,14 +3490,12 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" +eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -3431,11 +3506,16 @@ eslint-visitor-keys@^2.0.0: integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^7.18.0: +eslint@*, "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^7.18.0, eslint@>=5.0.0, eslint@>=7.0.0: version "7.32.0" resolved "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz" integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== @@ -3774,7 +3854,7 @@ fs.realpath@^1.0.0: fsevents@~2.3.2: version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: @@ -3858,7 +3938,14 @@ globals@^11.1.0: resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: +globals@^13.6.0: + version "13.17.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + +globals@^13.9.0: version "13.17.0" resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== @@ -3872,7 +3959,7 @@ globals@^9.18.0: globby@^11.0.1, globby@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -3898,6 +3985,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz" @@ -4036,6 +4128,16 @@ http-deceiver@^1.2.7: resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" @@ -4047,16 +4149,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-parser-js@>=0.5.1: version "0.5.8" resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz" @@ -4148,7 +4240,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3, inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4199,7 +4291,7 @@ ip@^1.1.0: resolved "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== -ipaddr.js@1.9.1, ipaddr.js@^1.9.1: +ipaddr.js@^1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== @@ -4209,6 +4301,11 @@ ipaddr.js@^2.0.1: resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz" integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-arguments@^1.0.4: version "1.1.1" resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" @@ -4393,16 +4490,16 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -4653,7 +4750,7 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": +"mime-db@>= 1.43.0 < 2", mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -4733,16 +4830,16 @@ mrmime@^1.0.0: resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz" integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== +ms@^2.1.1, ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.2, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - ms@2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" @@ -4766,6 +4863,11 @@ nanoid@^3.3.1, nanoid@^3.3.4: resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" @@ -5078,11 +5180,6 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - path-to-regexp@^1.7.0: version "1.8.0" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" @@ -5090,6 +5187,11 @@ path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -5184,7 +5286,7 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.2.15: +postcss@^8.1.0, postcss@^8.2.15: version "8.4.16" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz" integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== @@ -5205,7 +5307,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.2.1: +prettier@^2.2.1, prettier@>=1.13.0: version "2.7.1" resolved "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -5233,7 +5335,7 @@ progress@^2.0.0: resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.0.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -5250,16 +5352,16 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" - integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== - punycode@^2.1.0: version "2.1.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== + qs@6.10.3: version "6.10.3" resolved "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz" @@ -5667,7 +5769,7 @@ rc-virtual-list@^3.2.0, rc-virtual-list@^3.4.8: rc-resize-observer "^1.0.0" rc-util "^5.15.0" -react-dom@^17.0.1: +react-dom@*, react-dom@^17.0.1, "react-dom@>= 16.8.0", react-dom@>=16.0.0, react-dom@>=16.11.0, react-dom@>=16.9.0: version "17.0.2" resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -5676,7 +5778,22 @@ react-dom@^17.0.1: object-assign "^4.1.1" scheduler "^0.20.2" -react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: +react-is@^16.12.0: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-is@^16.6.0: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-is@^16.7.0: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -5686,7 +5803,12 @@ react-is@^17.0.2: resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-redux@^7.2.2: +"react-is@>= 16.8.0": + version "18.2.0" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + +"react-redux@^7.2.1 || ^8.0.2", react-redux@^7.2.2: version "7.2.8" resolved "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz" integrity sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw== @@ -5698,7 +5820,7 @@ react-redux@^7.2.2: prop-types "^15.7.2" react-is "^17.0.2" -react-refresh@0.11.0: +"react-refresh@>=0.10.0 <1.0.0", react-refresh@0.11.0: version "0.11.0" resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== @@ -5716,7 +5838,7 @@ react-router-dom@^5.3.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.3.3, react-router@^5.2.0: +react-router@^5.2.0, react-router@5.3.3: version "5.3.3" resolved "https://registry.npmjs.org/react-router/-/react-router-5.3.3.tgz" integrity sha512-mzQGUvS3bM84TnbtMYR8ZjKnuPJ71IjSzR+DE6UkUqvN4czWIqEs17yLL8xkAycv4ev0AiN+IGrWu88vJs/p2w== @@ -5732,7 +5854,7 @@ react-router@5.3.3, react-router@^5.2.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react@17.0.2: +react@*, "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "react@^16.8.3 || ^17 || ^18", "react@^16.9.0 || ^17.0.0 || ^18", "react@>= 16.8.0", react@>=15, react@>=16.0.0, react@>=16.11.0, react@>=16.9.0, react@17.0.2: version "17.0.2" resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -5786,7 +5908,7 @@ redux-thunk@^2.4.1: resolved "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz" integrity sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q== -redux@^4.0.0, redux@^4.1.0, redux@^4.1.2: +"redux@^3.1.0 || ^4.0.0", redux@^4, redux@^4.0.0, redux@^4.1.0, redux@^4.1.2: version "4.2.0" resolved "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz" integrity sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA== @@ -5840,9 +5962,9 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.1, regexp.prototype.f define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.1.0, regexpp@^3.2.0: +regexpp@^3.1.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^2.0.0: @@ -5997,12 +6119,17 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@>=5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@~5.2.0: +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -6020,16 +6147,6 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@4.0.0, schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - schema-utils@^2.6.5: version "2.7.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz" @@ -6048,6 +6165,26 @@ schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" + integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.8.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.0.0" + +schema-utils@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" + integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.8.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.0.0" + scroll-into-view-if-needed@^2.2.25: version "2.2.29" resolved "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.29.tgz" @@ -6067,23 +6204,37 @@ selfsigned@^1.10.11: dependencies: node-forge "^0.10.0" -semver@7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.5, semver@^7.3.7: +semver@^7.2.1: + version "7.3.7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +semver@^7.3.5: + version "7.3.7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +semver@^7.3.7: version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" +semver@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + send@0.18.0: version "0.18.0" resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" @@ -6275,7 +6426,12 @@ source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -6285,6 +6441,16 @@ source-map@^0.7.3: resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +source-map@~0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz" @@ -6323,15 +6489,29 @@ stackframe@^1.3.4: resolved "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz" integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + statuses@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" string-convert@^0.2.0: version "0.2.1" @@ -6379,20 +6559,6 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" @@ -6432,7 +6598,7 @@ style-loader@^2.0.0: loader-utils "^2.0.0" schema-utils "^3.0.0" -styled-components@^5.3.0: +styled-components@^5.3.0, "styled-components@>= 2": version "5.3.5" resolved "https://registry.npmjs.org/styled-components/-/styled-components-5.3.5.tgz" integrity sha512-ndETJ9RKaaL6q41B69WudeqLzOpY1A/ET/glXkNZ2T7dPjPqpPCXXQjDFYZWwNnE5co0wX+gTCqx9mfxTmSIPg== @@ -6453,7 +6619,14 @@ supports-color@^2.0.0: resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^5.5.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -6586,10 +6759,10 @@ totalist@^1.0.0: resolved "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== -ts-sc-client@^0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.1.3.tgz" - integrity sha512-aVUidgGLPEAo3BaF+Yp97OTYR2vlDnSC9TzM4fTkgwKCw6bl5mtzyjBv+HSNhosoOtz1PaOz/F6BzlyIb6dHTw== +ts-sc-client@^0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/ts-sc-client/-/ts-sc-client-0.5.0.tgz" + integrity sha512-JKXADYsTYTydUWMgqTGAVyBpUfBzHt0rOVF1wnfDZzv6vyL6KSohBUTK5gBJg8+ZYP3JkhiiLDmX+VKZVzLaZg== tslib@^1.8.1: version "1.14.1" @@ -6615,7 +6788,7 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-fest@^0.20.2: +type-fest@^0.20.2, "type-fest@>=0.17.0 <3.0.0": version "0.20.2" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== @@ -6628,7 +6801,7 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@4.6.2: +"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>3.6.0, typescript@4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz" integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== @@ -6671,7 +6844,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -6764,7 +6937,7 @@ webpack-bundle-analyzer@^4.3.0: sirv "^1.0.7" ws "^7.3.1" -webpack-cli@^4.7.2: +webpack-cli@^4.7.2, webpack-cli@4.x.x: version "4.10.0" resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz" integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== @@ -6793,7 +6966,7 @@ webpack-dev-middleware@^5.0.0: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@4.1.1: +"webpack-dev-server@3.x || 4.x", webpack-dev-server@4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.1.1.tgz" integrity sha512-Kl1mnCEw8Cy1Kw173gCxLIB242LfPKEOj9WoKhKz/MbryZTNrILzOJTk8kiczw/YUEPzn3gcltCQv6hDsLudRg== @@ -6824,7 +6997,7 @@ webpack-dev-server@4.1.1: webpack-dev-middleware "^5.0.0" ws "^8.1.0" -webpack-merge@5.8.0, webpack-merge@^5.7.3: +webpack-merge@^5.7.3, webpack-merge@5.8.0: version "5.8.0" resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz" integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== @@ -6845,7 +7018,7 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.36.2: +webpack@*, "webpack@^4 || ^5", "webpack@^4.0.0 || ^5.0.0", "webpack@^4.27.0 || ^5.0.0", "webpack@^4.37.0 || ^5.0.0", "webpack@^4.4.0 || ^5.0.0", webpack@^5.1.0, webpack@^5.11.0, webpack@^5.20.0, webpack@^5.36.2, webpack@>=2, "webpack@>=4.43.0 <6.0.0", "webpack@4.x.x || 5.x.x": version "5.74.0" resolved "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz" integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== @@ -6875,7 +7048,7 @@ webpack@^5.36.2: watchpack "^2.4.0" webpack-sources "^3.2.3" -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: +websocket-driver@^0.7.4, websocket-driver@>=0.5.1: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== diff --git a/kb/ims.ostis.kb b/kb/ims.ostis.kb deleted file mode 160000 index 2518ad2cd5..0000000000 --- a/kb/ims.ostis.kb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2518ad2cd54ac40a9e33b0e0bf9acb813e641b83 diff --git a/kb/extra/letter_search/concept_message_about_find_word_by_first_letter.scs b/knowledge-base/extra/letter_search/concept_message_about_find_word_by_first_letter.scs similarity index 100% rename from kb/extra/letter_search/concept_message_about_find_word_by_first_letter.scs rename to knowledge-base/extra/letter_search/concept_message_about_find_word_by_first_letter.scs diff --git a/kb/extra/letter_search/concept_phrase_about_find_word_by_first_letter.gwf b/knowledge-base/extra/letter_search/concept_phrase_about_find_word_by_first_letter.gwf similarity index 100% rename from kb/extra/letter_search/concept_phrase_about_find_word_by_first_letter.gwf rename to knowledge-base/extra/letter_search/concept_phrase_about_find_word_by_first_letter.gwf diff --git a/kb/extra/letter_search/example.scs b/knowledge-base/extra/letter_search/example.scs similarity index 100% rename from kb/extra/letter_search/example.scs rename to knowledge-base/extra/letter_search/example.scs diff --git a/kb/extra/letter_search/lr_classify_find_word_by_first_letter_message.gwf b/knowledge-base/extra/letter_search/lr_classify_find_word_by_first_letter_message.gwf similarity index 100% rename from kb/extra/letter_search/lr_classify_find_word_by_first_letter_message.gwf rename to knowledge-base/extra/letter_search/lr_classify_find_word_by_first_letter_message.gwf diff --git a/kb/extra/letter_search/lr_message_about_find_word_by_first_letter.gwf b/knowledge-base/extra/letter_search/lr_message_about_find_word_by_first_letter.gwf similarity index 100% rename from kb/extra/letter_search/lr_message_about_find_word_by_first_letter.gwf rename to knowledge-base/extra/letter_search/lr_message_about_find_word_by_first_letter.gwf diff --git a/kb/extra/weather_agent/cities.scs b/knowledge-base/extra/weather_agent/cities.scs similarity index 100% rename from kb/extra/weather_agent/cities.scs rename to knowledge-base/extra/weather_agent/cities.scs diff --git a/kb/extra/weather_agent/concept_message_about_weather.scs b/knowledge-base/extra/weather_agent/concept_message_about_weather.scs similarity index 100% rename from kb/extra/weather_agent/concept_message_about_weather.scs rename to knowledge-base/extra/weather_agent/concept_message_about_weather.scs diff --git a/kb/extra/weather_agent/concept_phrase_about_weather.gwf b/knowledge-base/extra/weather_agent/concept_phrase_about_weather.gwf similarity index 100% rename from kb/extra/weather_agent/concept_phrase_about_weather.gwf rename to knowledge-base/extra/weather_agent/concept_phrase_about_weather.gwf diff --git a/kb/extra/weather_agent/countries.scs b/knowledge-base/extra/weather_agent/countries.scs similarity index 95% rename from kb/extra/weather_agent/countries.scs rename to knowledge-base/extra/weather_agent/countries.scs index bc1bfdc72d..e8e53e5b1e 100644 --- a/kb/extra/weather_agent/countries.scs +++ b/knowledge-base/extra/weather_agent/countries.scs @@ -7,7 +7,7 @@ concept_country (* <- lang_en;; *);; nrel_include_city -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [Включать город] (* <- lang_ru;; *); diff --git a/kb/extra/weather_agent/lr_message_about_weather.gwf b/knowledge-base/extra/weather_agent/lr_message_about_weather.gwf similarity index 100% rename from kb/extra/weather_agent/lr_message_about_weather.gwf rename to knowledge-base/extra/weather_agent/lr_message_about_weather.gwf diff --git a/kb/extra/weather_agent/show_weather_answer_phrase.scs b/knowledge-base/extra/weather_agent/show_weather_answer_phrase.scs similarity index 100% rename from kb/extra/weather_agent/show_weather_answer_phrase.scs rename to knowledge-base/extra/weather_agent/show_weather_answer_phrase.scs diff --git a/kb/extra/weather_agent/temperature.scs b/knowledge-base/extra/weather_agent/temperature.scs similarity index 81% rename from kb/extra/weather_agent/temperature.scs rename to knowledge-base/extra/weather_agent/temperature.scs index 6425923315..b6bebc2ded 100644 --- a/kb/extra/weather_agent/temperature.scs +++ b/knowledge-base/extra/weather_agent/temperature.scs @@ -1,5 +1,5 @@ nrel_temperature -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [температура*] (* <- lang_ru;; *); diff --git a/knowledge-base/ims.ostis.kb b/knowledge-base/ims.ostis.kb new file mode 160000 index 0000000000..5921458356 --- /dev/null +++ b/knowledge-base/ims.ostis.kb @@ -0,0 +1 @@ +Subproject commit 592145835643500878d5fc837df99009cd756c24 diff --git a/kb/non_subject_domain_concepts/action_deactivated.scs b/knowledge-base/non_subject_domain_concepts/action_deactivated.scs similarity index 100% rename from kb/non_subject_domain_concepts/action_deactivated.scs rename to knowledge-base/non_subject_domain_concepts/action_deactivated.scs diff --git a/kb/non_subject_domain_concepts/concept_text_file.scs b/knowledge-base/non_subject_domain_concepts/concept_text_file.scs similarity index 100% rename from kb/non_subject_domain_concepts/concept_text_file.scs rename to knowledge-base/non_subject_domain_concepts/concept_text_file.scs diff --git a/kb/non_subject_domain_concepts/nrel_decomposition.scs b/knowledge-base/non_subject_domain_concepts/nrel_decomposition.scs similarity index 100% rename from kb/non_subject_domain_concepts/nrel_decomposition.scs rename to knowledge-base/non_subject_domain_concepts/nrel_decomposition.scs diff --git a/kb/non_subject_domain_concepts/nrel_definition.scs b/knowledge-base/non_subject_domain_concepts/nrel_definition.scs similarity index 89% rename from kb/non_subject_domain_concepts/nrel_definition.scs rename to knowledge-base/non_subject_domain_concepts/nrel_definition.scs index ca25f4dc1b..910b718261 100755 --- a/kb/non_subject_domain_concepts/nrel_definition.scs +++ b/knowledge-base/non_subject_domain_concepts/nrel_definition.scs @@ -1,5 +1,5 @@ nrel_definition -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [определение*] (* <- lang_ru;; *); diff --git a/kb/non_subject_domain_concepts/nrel_note.scs b/knowledge-base/non_subject_domain_concepts/nrel_note.scs similarity index 89% rename from kb/non_subject_domain_concepts/nrel_note.scs rename to knowledge-base/non_subject_domain_concepts/nrel_note.scs index 1c1bbaeb98..9e1ef6a285 100755 --- a/kb/non_subject_domain_concepts/nrel_note.scs +++ b/knowledge-base/non_subject_domain_concepts/nrel_note.scs @@ -1,5 +1,5 @@ nrel_note -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [примечание*] (* <- lang_ru;; *); diff --git a/kb/non_subject_domain_concepts/wit/concept_entity_possible_class.scs b/knowledge-base/non_subject_domain_concepts/wit/concept_entity_possible_class.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/concept_entity_possible_class.scs rename to knowledge-base/non_subject_domain_concepts/wit/concept_entity_possible_class.scs diff --git a/kb/non_subject_domain_concepts/wit/concept_intent_possible_class.scs b/knowledge-base/non_subject_domain_concepts/wit/concept_intent_possible_class.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/concept_intent_possible_class.scs rename to knowledge-base/non_subject_domain_concepts/wit/concept_intent_possible_class.scs diff --git a/kb/non_subject_domain_concepts/wit/concept_trait_possible_class.scs b/knowledge-base/non_subject_domain_concepts/wit/concept_trait_possible_class.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/concept_trait_possible_class.scs rename to knowledge-base/non_subject_domain_concepts/wit/concept_trait_possible_class.scs diff --git a/kb/non_subject_domain_concepts/wit/concept_wit_entity.scs b/knowledge-base/non_subject_domain_concepts/wit/concept_wit_entity.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/concept_wit_entity.scs rename to knowledge-base/non_subject_domain_concepts/wit/concept_wit_entity.scs diff --git a/kb/non_subject_domain_concepts/wit/nrel_entitiy_possible_role.scs b/knowledge-base/non_subject_domain_concepts/wit/nrel_entitiy_possible_role.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/nrel_entitiy_possible_role.scs rename to knowledge-base/non_subject_domain_concepts/wit/nrel_entitiy_possible_role.scs diff --git a/kb/non_subject_domain_concepts/wit/nrel_trait_possible_class.scs b/knowledge-base/non_subject_domain_concepts/wit/nrel_trait_possible_class.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/nrel_trait_possible_class.scs rename to knowledge-base/non_subject_domain_concepts/wit/nrel_trait_possible_class.scs diff --git a/kb/non_subject_domain_concepts/wit/nrel_wit_ai_idtf.scs b/knowledge-base/non_subject_domain_concepts/wit/nrel_wit_ai_idtf.scs similarity index 100% rename from kb/non_subject_domain_concepts/wit/nrel_wit_ai_idtf.scs rename to knowledge-base/non_subject_domain_concepts/wit/nrel_wit_ai_idtf.scs diff --git a/kb/pattern/gwf/class.gwf b/knowledge-base/pattern/gwf/class.gwf similarity index 100% rename from kb/pattern/gwf/class.gwf rename to knowledge-base/pattern/gwf/class.gwf diff --git a/kb/pattern/gwf/full_pattern_alternative.gwf b/knowledge-base/pattern/gwf/full_pattern_alternative.gwf similarity index 100% rename from kb/pattern/gwf/full_pattern_alternative.gwf rename to knowledge-base/pattern/gwf/full_pattern_alternative.gwf diff --git a/kb/pattern/gwf/instance.gwf b/knowledge-base/pattern/gwf/instance.gwf similarity index 100% rename from kb/pattern/gwf/instance.gwf rename to knowledge-base/pattern/gwf/instance.gwf diff --git a/kb/pattern/gwf/message.gwf b/knowledge-base/pattern/gwf/message.gwf similarity index 100% rename from kb/pattern/gwf/message.gwf rename to knowledge-base/pattern/gwf/message.gwf diff --git a/kb/pattern/gwf/nrel.gwf b/knowledge-base/pattern/gwf/nrel.gwf similarity index 100% rename from kb/pattern/gwf/nrel.gwf rename to knowledge-base/pattern/gwf/nrel.gwf diff --git a/kb/pattern/gwf/phrase.gwf b/knowledge-base/pattern/gwf/phrase.gwf similarity index 100% rename from kb/pattern/gwf/phrase.gwf rename to knowledge-base/pattern/gwf/phrase.gwf diff --git a/kb/pattern/gwf/phrase_with_template.gwf b/knowledge-base/pattern/gwf/phrase_with_template.gwf similarity index 100% rename from kb/pattern/gwf/phrase_with_template.gwf rename to knowledge-base/pattern/gwf/phrase_with_template.gwf diff --git a/kb/pattern/gwf/rule_answer.gwf b/knowledge-base/pattern/gwf/rule_answer.gwf similarity index 100% rename from kb/pattern/gwf/rule_answer.gwf rename to knowledge-base/pattern/gwf/rule_answer.gwf diff --git a/kb/pattern/gwf/rule_classification.gwf b/knowledge-base/pattern/gwf/rule_classification.gwf similarity index 100% rename from kb/pattern/gwf/rule_classification.gwf rename to knowledge-base/pattern/gwf/rule_classification.gwf diff --git a/kb/pattern/gwf/subject_domain.gwf b/knowledge-base/pattern/gwf/subject_domain.gwf similarity index 100% rename from kb/pattern/gwf/subject_domain.gwf rename to knowledge-base/pattern/gwf/subject_domain.gwf diff --git a/kb/pattern/gwf/wit_entity.gwf b/knowledge-base/pattern/gwf/wit_entity.gwf similarity index 100% rename from kb/pattern/gwf/wit_entity.gwf rename to knowledge-base/pattern/gwf/wit_entity.gwf diff --git a/kb/pattern/science/concept_science.gwf b/knowledge-base/pattern/science/concept_science.gwf similarity index 100% rename from kb/pattern/science/concept_science.gwf rename to knowledge-base/pattern/science/concept_science.gwf diff --git a/kb/pattern/science/rule_answer.gwf b/knowledge-base/pattern/science/rule_answer.gwf similarity index 100% rename from kb/pattern/science/rule_answer.gwf rename to knowledge-base/pattern/science/rule_answer.gwf diff --git a/kb/pattern/science/rule_classification.gwf b/knowledge-base/pattern/science/rule_classification.gwf similarity index 100% rename from kb/pattern/science/rule_classification.gwf rename to knowledge-base/pattern/science/rule_classification.gwf diff --git a/kb/pattern/science/science_phrase.gwf b/knowledge-base/pattern/science/science_phrase.gwf similarity index 100% rename from kb/pattern/science/science_phrase.gwf rename to knowledge-base/pattern/science/science_phrase.gwf diff --git a/kb/pattern/scs/class.scs b/knowledge-base/pattern/scs/class.scs similarity index 100% rename from kb/pattern/scs/class.scs rename to knowledge-base/pattern/scs/class.scs diff --git a/kb/pattern/scs/class_with_subdividing.scs b/knowledge-base/pattern/scs/class_with_subdividing.scs similarity index 100% rename from kb/pattern/scs/class_with_subdividing.scs rename to knowledge-base/pattern/scs/class_with_subdividing.scs diff --git a/kb/pattern/scs/instance.scs b/knowledge-base/pattern/scs/instance.scs similarity index 100% rename from kb/pattern/scs/instance.scs rename to knowledge-base/pattern/scs/instance.scs diff --git a/kb/pattern/scs/message.scs b/knowledge-base/pattern/scs/message.scs similarity index 100% rename from kb/pattern/scs/message.scs rename to knowledge-base/pattern/scs/message.scs diff --git a/kb/pattern/scs/nrel.scs b/knowledge-base/pattern/scs/nrel.scs similarity index 97% rename from kb/pattern/scs/nrel.scs rename to knowledge-base/pattern/scs/nrel.scs index f48ad9f12b..8cb184af8d 100644 --- a/kb/pattern/scs/nrel.scs +++ b/knowledge-base/pattern/scs/nrel.scs @@ -1,5 +1,5 @@ nrel_your_relation_identifier -<- sc_node_norole_relation; +<- sc_node_non_role_relation; <- relation; <- binary_relation; <- oriented_relation; diff --git a/kb/pattern/scs/phrase.scs b/knowledge-base/pattern/scs/phrase.scs similarity index 100% rename from kb/pattern/scs/phrase.scs rename to knowledge-base/pattern/scs/phrase.scs diff --git a/kb/pattern/scs/phrase_with_template.scs b/knowledge-base/pattern/scs/phrase_with_template.scs similarity index 78% rename from kb/pattern/scs/phrase_with_template.scs rename to knowledge-base/pattern/scs/phrase_with_template.scs index 749dff755d..73fc4bf443 100644 --- a/kb/pattern/scs/phrase_with_template.scs +++ b/knowledge-base/pattern/scs/phrase_with_template.scs @@ -1,11 +1,11 @@ @pattern = [* - _message _<- concept_message; + _message <-_ concept_message; _-> rrel_entity:: _entity;; - _entity _<- concept_your_class_identifier; + _entity <-_ concept_your_class_identifier; _=> nrel_main_idtf: [ ] (* => nrel_main_idtf: [_id];; - _<- lang_ru;; + <-_ lang_ru;; *);; *];; diff --git a/kb/pattern/scs/rule_answer.scs b/knowledge-base/pattern/scs/rule_answer.scs similarity index 71% rename from kb/pattern/scs/rule_answer.scs rename to knowledge-base/pattern/scs/rule_answer.scs index c5ec679ee7..882c81eea8 100644 --- a/kb/pattern/scs/rule_answer.scs +++ b/knowledge-base/pattern/scs/rule_answer.scs @@ -1,16 +1,16 @@ @if = [* _message - _<- concept_message; - _<- concept_your_message_class_name; + <-_ concept_message; + <-_ concept_your_message_class_name; _-> rrel_entity:: _entity;; - _entity _<- concept_your_class_identifier;; + _entity <-_ concept_your_class_identifier;; *];; @then = [* _message _=> nrel_reply:: _reply_message;; _reply_message - _<- concept_your_message_class_name; - _<- concept_atomic_message;; + <-_ concept_your_message_class_name; + <-_ concept_atomic_message;; *];; lr_message_about_your_class diff --git a/kb/pattern/scs/rule_classify.scs b/knowledge-base/pattern/scs/rule_classify.scs similarity index 96% rename from kb/pattern/scs/rule_classify.scs rename to knowledge-base/pattern/scs/rule_classify.scs index 0999f805bf..4f559e570f 100644 --- a/kb/pattern/scs/rule_classify.scs +++ b/knowledge-base/pattern/scs/rule_classify.scs @@ -1,6 +1,6 @@ if_message_content = [* _message - _<- concept_message; + <-_ concept_message; _=> nrel_sc_text_translation:: .._node;; @message_content_link = _[your message content];; .._node -> @message_content_link;; diff --git a/kb/pattern/scs/subject_domain.scs b/knowledge-base/pattern/scs/subject_domain.scs similarity index 100% rename from kb/pattern/scs/subject_domain.scs rename to knowledge-base/pattern/scs/subject_domain.scs diff --git a/kb/pattern/scs/wit_entity.scs b/knowledge-base/pattern/scs/wit_entity.scs similarity index 100% rename from kb/pattern/scs/wit_entity.scs rename to knowledge-base/pattern/scs/wit_entity.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_alternative_message_topic_classification.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_alternative_message_topic_classification.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_alternative_message_topic_classification.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_alternative_message_topic_classification.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_find_word_in_set_by_first_letter.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_find_word_in_set_by_first_letter.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_find_word_in_set_by_first_letter.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_find_word_in_set_by_first_letter.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_message_topic_classification.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_message_topic_classification.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_message_topic_classification.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_message_topic_classification.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_phrase_generation.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_phrase_generation.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_phrase_generation.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_phrase_generation.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_reply_to_message.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_reply_to_message.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_reply_to_message.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_reply_to_message.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_show_weather.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_show_weather.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_show_weather.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_show_weather.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/concepts/action_standard_message_reply.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_standard_message_reply.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/concepts/action_standard_message_reply.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/concepts/action_standard_message_reply.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/relations/rrel_dynamic_argument.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/relations/rrel_dynamic_argument.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/relations/rrel_dynamic_argument.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/relations/rrel_dynamic_argument.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/section_subject_domain_of_actions_and_tasks.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/section_subject_domain_of_actions_and_tasks.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/section_subject_domain_of_actions_and_tasks.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/section_subject_domain_of_actions_and_tasks.scs diff --git a/kb/section_subject_domain_of_actions_and_tasks/subject_domain_of_actions_and_tasks.scs b/knowledge-base/section_subject_domain_of_actions_and_tasks/subject_domain_of_actions_and_tasks.scs similarity index 100% rename from kb/section_subject_domain_of_actions_and_tasks/subject_domain_of_actions_and_tasks.scs rename to knowledge-base/section_subject_domain_of_actions_and_tasks/subject_domain_of_actions_and_tasks.scs diff --git a/kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_active_dialogue.scs b/knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_active_dialogue.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_active_dialogue.scs rename to knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_active_dialogue.scs diff --git a/kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue.scs b/knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue.scs rename to knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue.scs diff --git a/kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue_in_russian.scs b/knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue_in_russian.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue_in_russian.scs rename to knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_dialogue_in_russian.scs diff --git a/kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_empty_dialogue.scs b/knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_empty_dialogue.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_empty_dialogue.scs rename to knowledge-base/section_subject_domain_of_dialogues/concepts/concept_dialogue/concept_empty_dialogue.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/concepts/concept_message_processing_program.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/concepts/concept_message_processing_program.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/concepts/concept_message_processing_program.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/concepts/concept_message_processing_program.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs similarity index 60% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs index fb057378ca..a841496749 100644 --- a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs +++ b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/dialog_concepts.scs @@ -2,4 +2,4 @@ action_reply_to_message <- actions_class; <- atomic_action_class;; -nrel_authors <- sc_node_norole_relation;; +nrel_authors <- sc_node_non_role_relation;; diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/examples/message_processing_program.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/examples/message_processing_program.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/examples/message_processing_program.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/examples/message_processing_program.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule_class_by_priority.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule_class_by_priority.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule_class_by_priority.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_answer_on_standard_message_rule_class_by_priority.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_classify_message_rule.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_classify_message_rule.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_classify_message_rule.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/concept_classify_message_rule.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/template_phrases_class.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/template_phrases_class.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/template_phrases_class.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/concepts/template_phrases_class.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_classify_weather_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_classify_weather_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_classify_weather_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_classify_weather_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_color_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_color_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_color_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_color_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_greeting_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_greeting_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_greeting_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_greeting_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_lab_work_condition.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_lab_work_condition.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_lab_work_condition.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_lab_work_condition.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_entity.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_entity.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_entity.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_entity.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_skills.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_skills.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_skills.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_message_about_skills.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_subdividing_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_subdividing_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_subdividing_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_alternative_classification/lr_subdividing_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_greeting_message/lr_greeting_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_greeting_message/lr_greeting_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_greeting_message/lr_greeting_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_greeting_message/lr_greeting_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_entity.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_entity.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_entity.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_entity.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_study_system.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_study_system.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_study_system.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_study_system.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_unknown_entity.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_unknown_entity.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_unknown_entity.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_entity/lr_message_about_unknown_entity.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_skills/lr_message_about_skills.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_skills/lr_message_about_skills.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_skills/lr_message_about_skills.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_skills/lr_message_about_skills.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_condition.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_condition.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_condition.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_condition.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_deadline.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_deadline.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_deadline.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_lab_work_deadline.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_unknown_lab_work.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_unknown_lab_work.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_unknown_lab_work.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_studying/lr_message_about_unknown_lab_work.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_subdividing.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_subdividing.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_subdividing.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_subdividing.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_unknown_subdividing.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_unknown_subdividing.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_unknown_subdividing.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_message_about_subdividing/lr_message_about_unknown_subdividing.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_not_classified_message/lr_not_classified_by_intent_message.gwf b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_not_classified_message/lr_not_classified_by_intent_message.gwf similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_not_classified_message/lr_not_classified_by_intent_message.gwf rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/lr_not_classified_message/lr_not_classified_by_intent_message.gwf diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs similarity index 77% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs index b9e3a4f252..c02b6a5d4a 100644 --- a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs +++ b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/logic_rules/reply_target.scs @@ -6,6 +6,6 @@ @template_reply_target => nrel_system_identifier: [template_reply_target];; _reply_message <- sc_node;; _message <- sc_node;; -nrel_reply <- sc_node_norole_relation;; +nrel_reply <- sc_node_non_role_relation;; action_template_reply => nrel_template_reply_target: @template_reply_target;; -nrel_template_reply_target <- sc_node_norole_relation;; +nrel_template_reply_target <- sc_node_non_role_relation;; diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs similarity index 97% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs index b4faf54abc..7b78cf914f 100644 --- a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs +++ b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_answer_pattern.scs @@ -2,7 +2,7 @@ nrel_answer_pattern => nrel_main_idtf: [шаблон ответа*] (* <- lang_ru;; *); [answer pattern*] (* <- lang_en;; *); - <- sc_node_norole_relation;; + <- sc_node_non_role_relation;; ... <- definition; diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_phrase_template.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_phrase_template.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_phrase_template.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/relations/nrel_phrase_template.scs diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs similarity index 98% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs index 9797f4ef9b..cc2c9a24e7 100644 --- a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs +++ b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialog_control/section_subject_domain_of_dialogue_control_using_template_responses/section_subject_domain_of_dialogue_control_using_template_responses.scs @@ -2,7 +2,7 @@ section_subject_domain_of_dialogue_control_using_template_responses => nrel_main_idtf: [Раздел. Предметная область управления диалогом с использованием шаблонных ответов] (* <- lang_ru;; *); [Section. Subject domain of dialogue control using template responses] (* <- lang_en;; *); - <- sc_node_struct; + <- sc_node_structure; <- atomic_section;; diff --git a/kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialogues.scs b/knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialogues.scs similarity index 100% rename from kb/section_subject_domain_of_dialogues/section_subject_domain_of_dialogues.scs rename to knowledge-base/section_subject_domain_of_dialogues/section_subject_domain_of_dialogues.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_expert_system.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_expert_system.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_expert_system.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_expert_system.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_ostis_system.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_ostis_system.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_ostis_system.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_ostis_system.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_system.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_system.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_system.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_intelligent_study_system.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_lab_work.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_lab_work.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/concept_lab_work.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/concept_lab_work.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/lab_workshop/lab_workshop.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/lab_workshop/lab_workshop.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/lab_workshop/lab_workshop.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/lab_workshop/lab_workshop.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/nika.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/nika.scs similarity index 100% rename from kb/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/nika.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/concepts/instances/nika_docs/nika.scs diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs similarity index 69% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs index 1152540f14..d7c36d837d 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_aim.scs @@ -1,5 +1,5 @@ nrel_aim -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [цель*] (* <- lang_ru;; *);; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs similarity index 74% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs index e8828e19b5..0c9d4641b8 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_deadline.scs @@ -1,5 +1,5 @@ nrel_deadline -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [срок защиты*] (* <- lang_ru;; *);; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs similarity index 74% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs index 772a6120e3..20952fb3fd 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_knowledge_base.scs @@ -1,5 +1,5 @@ nrel_knowledge_base -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [база знаний*] (* <- lang_ru;; *);; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs similarity index 81% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs index 32c954db01..865c3ff61a 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_work_condition.scs @@ -1,5 +1,5 @@ nrel_lab_work_condition -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [условие лабораторной работы*] (* <- lang_ru;; *);; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs similarity index 97% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs index 5dd2a1c31f..ed125ec859 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_lab_workshop.scs @@ -1,5 +1,5 @@ nrel_lab_workshop -<- sc_node_norole_relation; +<- sc_node_non_role_relation; <- relation; <- binary_relation; <- oriented_relation; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs similarity index 89% rename from kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs index 9b8bc7e7d0..589376daf2 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/relations/nrel_skill.scs @@ -1,5 +1,5 @@ nrel_skill -<- sc_node_norole_relation; +<- sc_node_non_role_relation; <- relation; <- binary_relation; <- oriented_relation; diff --git a/kb/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs b/knowledge-base/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs similarity index 97% rename from kb/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs rename to knowledge-base/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs index ee38b6b145..a4a854c5cc 100644 --- a/kb/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs +++ b/knowledge-base/section_subject_domain_of_intelligent_study_systems/section_subject_domain_of_intelligent_study_systems.scs @@ -6,7 +6,7 @@ section_subject_domain_of_intelligent_study_systems section_subject_domain_of_intelligent_study_systems = [* subject_domain_of_intelligent_study_systems - <- sc_node_struct; + <- sc_node_structure; => nrel_main_idtf: [Предметная область интеллектуальных обучающих систем] (* <- lang_ru;; *); diff --git a/kb/section_subject_domain_of_messages/concepts/concept_empty_string.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_empty_string.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_empty_string.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_empty_string.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_atomic_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_atomic_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_atomic_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_atomic_message.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_greeting_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_greeting_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_greeting_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_greeting_message.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_entity.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_entity.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_entity.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_entity.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_condition.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_condition.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_condition.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_condition.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_deadline.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_deadline.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_deadline.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_lab_work_deadline.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_skill.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_skill.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_skill.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_skill.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_subdividing.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_subdividing.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_subdividing.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_message_about_subdividing.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_intent_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_intent_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_intent_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_intent_message.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_trait_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_trait_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_trait_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_atomic_message/concept_not_classified_by_trait_message.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_message.scs diff --git a/kb/section_subject_domain_of_messages/concepts/concept_message/concept_non_atomic_message.scs b/knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_non_atomic_message.scs similarity index 100% rename from kb/section_subject_domain_of_messages/concepts/concept_message/concept_non_atomic_message.scs rename to knowledge-base/section_subject_domain_of_messages/concepts/concept_message/concept_non_atomic_message.scs diff --git a/kb/section_subject_domain_of_messages/relations/nrel_message_sequence.scs b/knowledge-base/section_subject_domain_of_messages/relations/nrel_message_sequence.scs similarity index 97% rename from kb/section_subject_domain_of_messages/relations/nrel_message_sequence.scs rename to knowledge-base/section_subject_domain_of_messages/relations/nrel_message_sequence.scs index b78cddecaf..c7c40fb7c8 100644 --- a/kb/section_subject_domain_of_messages/relations/nrel_message_sequence.scs +++ b/knowledge-base/section_subject_domain_of_messages/relations/nrel_message_sequence.scs @@ -1,5 +1,5 @@ nrel_message_sequence -<-sc_node_norole_relation; +<-sc_node_non_role_relation; <-relation; <-binary_relation; <-oriented_relation; diff --git a/kb/section_subject_domain_of_messages/relations/nrel_phrase_template.scs b/knowledge-base/section_subject_domain_of_messages/relations/nrel_phrase_template.scs similarity index 97% rename from kb/section_subject_domain_of_messages/relations/nrel_phrase_template.scs rename to knowledge-base/section_subject_domain_of_messages/relations/nrel_phrase_template.scs index 210b579ca0..e6f1173521 100644 --- a/kb/section_subject_domain_of_messages/relations/nrel_phrase_template.scs +++ b/knowledge-base/section_subject_domain_of_messages/relations/nrel_phrase_template.scs @@ -1,5 +1,5 @@ nrel_phrase_template -<- sc_node_norole_relation; +<- sc_node_non_role_relation; <- relation; <- binary_relation; <- oriented_relation; diff --git a/kb/section_subject_domain_of_messages/relations/nrel_reply.scs b/knowledge-base/section_subject_domain_of_messages/relations/nrel_reply.scs similarity index 97% rename from kb/section_subject_domain_of_messages/relations/nrel_reply.scs rename to knowledge-base/section_subject_domain_of_messages/relations/nrel_reply.scs index bf1d4d77bb..0bdb90495e 100644 --- a/kb/section_subject_domain_of_messages/relations/nrel_reply.scs +++ b/knowledge-base/section_subject_domain_of_messages/relations/nrel_reply.scs @@ -1,5 +1,5 @@ nrel_reply -<-sc_node_norole_relation; +<-sc_node_non_role_relation; <-relation; <-binary_relation; <-oriented_relation; diff --git a/kb/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs b/knowledge-base/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs similarity index 92% rename from kb/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs rename to knowledge-base/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs index 2d3a20fe94..2065ab9071 100644 --- a/kb/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs +++ b/knowledge-base/section_subject_domain_of_messages/relations/nrel_semantic_equivalent.scs @@ -1,5 +1,5 @@ nrel_semantic_equivalent -<- sc_node_norole_relation; +<- sc_node_non_role_relation; <- relation; <- binary_relation; <- oriented_relation; diff --git a/kb/section_subject_domain_of_messages/relations/rrel_entity.scs b/knowledge-base/section_subject_domain_of_messages/relations/rrel_entity.scs similarity index 100% rename from kb/section_subject_domain_of_messages/relations/rrel_entity.scs rename to knowledge-base/section_subject_domain_of_messages/relations/rrel_entity.scs diff --git a/kb/section_subject_domain_of_messages/section_subject_domain_of_messages.scs b/knowledge-base/section_subject_domain_of_messages/section_subject_domain_of_messages.scs similarity index 100% rename from kb/section_subject_domain_of_messages/section_subject_domain_of_messages.scs rename to knowledge-base/section_subject_domain_of_messages/section_subject_domain_of_messages.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_greeting_phrase.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_greeting_phrase.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_greeting_phrase.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_greeting_phrase.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_misunderstanding_phrase.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_misunderstanding_phrase.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_misunderstanding_phrase.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_misunderstanding_phrase.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_condition.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_condition.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_condition.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_condition.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_deadline.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_deadline.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_deadline.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_lab_work_deadline.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_study_system.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_study_system.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_study_system.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_study_system.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_entity.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_entity.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_entity.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_entity.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_lab_work.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_lab_work.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_lab_work.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_lab_work.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_subdividing.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_subdividing.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_subdividing.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_declarative_phrase/concept_phrase_about_unknown_subdividing.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_phrase.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_phrase.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_phrase.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/concepts/concept_phrase.scs diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_greeting_phrase/concept_greeting_phrase.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_greeting_phrase/concept_greeting_phrase.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_greeting_phrase/concept_greeting_phrase.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_greeting_phrase/concept_greeting_phrase.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_misunderstanding_phrase/concept_misunderstanding_phrase.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_misunderstanding_phrase/concept_misunderstanding_phrase.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_misunderstanding_phrase/concept_misunderstanding_phrase.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_misunderstanding_phrase/concept_misunderstanding_phrase.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_entity.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_entity.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_entity.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_entity.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_study_system.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_study_system.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_study_system.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_study_system.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_unknown_entity.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_unknown_entity.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_unknown_entity.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_entity/concept_phrase_about_unknown_entity.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_skills/concept_phrase_about_skills.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_skills/concept_phrase_about_skills.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_skills/concept_phrase_about_skills.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_skills/concept_phrase_about_skills.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_condition.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_condition.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_condition.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_condition.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_deadline.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_deadline.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_deadline.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_lab_work_deadline.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_unknown_lab_work.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_unknown_lab_work.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_unknown_lab_work.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_studying/concept_phrase_about_unknown_lab_work.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_subdividing.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_subdividing.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_subdividing.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_subdividing.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_unknown_subdividing.gwf b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_unknown_subdividing.gwf similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_unknown_subdividing.gwf rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/examples/concept_phrase_about_subdividing/concept_phrase_about_unknown_subdividing.gwf diff --git a/kb/section_subject_domain_of_messages/subject_domain_of_phrases/subject_domain_of_phrases.scs b/knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/subject_domain_of_phrases.scs similarity index 100% rename from kb/section_subject_domain_of_messages/subject_domain_of_phrases/subject_domain_of_phrases.scs rename to knowledge-base/section_subject_domain_of_messages/subject_domain_of_phrases/subject_domain_of_phrases.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/NIKA_interface.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/NIKA_interface.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/NIKA_interface.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/NIKA_interface.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_atomic_user_interface_component.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_atomic_user_interface_component.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_atomic_user_interface_component.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_atomic_user_interface_component.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_button.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_button.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_button.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_button.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_data_input_component.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_data_input_component.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_data_input_component.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_data_input_component.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_decorative_user_interface_component.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_decorative_user_interface_component.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_decorative_user_interface_component.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_decorative_user_interface_component.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_footer.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_footer.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_footer.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_footer.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_header.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_header.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_header.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_header.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_main_part.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_main_part.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_main_part.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_main_part.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu_item.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu_item.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu_item.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_menu_item.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_non_atomic_user_interface_component.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_non_atomic_user_interface_component.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_non_atomic_user_interface_component.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_non_atomic_user_interface_component.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface_component.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface_component.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface_component.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_user_interface_component.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_visual_part_of_user_interface.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_visual_part_of_user_interface.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_visual_part_of_user_interface.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_visual_part_of_user_interface.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_window.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_window.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/concepts/concept_window.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/concepts/concept_window.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/entities/interface_entities.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/entities/interface_entities.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/entities/interface_entities.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/entities/interface_entities.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_color_phrase.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_color_phrase.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_color_phrase.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_color_phrase.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_phrase_about_unknown_entity.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_phrase_about_unknown_entity.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_phrase_about_unknown_entity.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_phrase_about_unknown_entity.scs diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_unknown_color_phrase.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_unknown_color_phrase.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/phrases/concept_unknown_color_phrase.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/phrases/concept_unknown_color_phrase.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs similarity index 97% rename from kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs index ebcdd08c78..7fea1236b0 100644 --- a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs +++ b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_component_color.scs @@ -1,5 +1,5 @@ nrel_component_color -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [цвет компонента*] (* <- lang_ru;; *); diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs similarity index 97% rename from kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs index 2aab6ee6d6..e76b9facc3 100644 --- a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs +++ b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_size.scs @@ -1,5 +1,5 @@ nrel_font_size -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [размер шрифта*] (* <- lang_ru;; *); diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs similarity index 97% rename from kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs index a67f2ffe99..4a1c72f92c 100644 --- a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs +++ b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_font_type.scs @@ -1,5 +1,5 @@ nrel_font_type -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [тип шрифта*] (* <- lang_ru;; *); diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs similarity index 97% rename from kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs index 3fedf47b59..8b97364f5d 100644 --- a/kb/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs +++ b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/relations/nrel_visual_interface.scs @@ -1,5 +1,5 @@ nrel_visual_interface -<- sc_node_norole_relation; +<- sc_node_non_role_relation; => nrel_main_idtf: [визуальный интерфейс*] (* <- lang_ru;; *); diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_color_message.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_color_message.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_color_message.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_color_message.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_random_color_message.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_random_color_message.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_random_color_message.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_random_color_message.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_unknown_color_message.gwf b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_unknown_color_message.gwf similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/rules/lr_unknown_color_message.gwf rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/rules/lr_unknown_color_message.gwf diff --git a/kb/section_subject_domain_of_ostis_system_interfaces/section_subject_domain_of_ostis_system_interfaces.scs b/knowledge-base/section_subject_domain_of_ostis_system_interfaces/section_subject_domain_of_ostis_system_interfaces.scs similarity index 100% rename from kb/section_subject_domain_of_ostis_system_interfaces/section_subject_domain_of_ostis_system_interfaces.scs rename to knowledge-base/section_subject_domain_of_ostis_system_interfaces/section_subject_domain_of_ostis_system_interfaces.scs diff --git a/kb/ui_menu/ui_main_menu.scs b/knowledge-base/ui_menu/ui_main_menu.scs similarity index 100% rename from kb/ui_menu/ui_main_menu.scs rename to knowledge-base/ui_menu/ui_main_menu.scs diff --git a/kb/ui_menu/ui_menu_na_keynodes.scs b/knowledge-base/ui_menu/ui_menu_na_keynodes.scs similarity index 100% rename from kb/ui_menu/ui_menu_na_keynodes.scs rename to knowledge-base/ui_menu/ui_menu_na_keynodes.scs diff --git a/kb/ui_menu/ui_start_sc_element.scs b/knowledge-base/ui_menu/ui_start_sc_element.scs similarity index 100% rename from kb/ui_menu/ui_start_sc_element.scs rename to knowledge-base/ui_menu/ui_start_sc_element.scs diff --git a/mkdocs.yml b/mkdocs.yml index 8a966e3954..f1da27c0e9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,7 @@ site_name: NIKA - -dev_addr: 127.0.0.1:8002 +dev_addr: 127.0.0.1:9001 +repo_url: https://github.com/ostis-apps/nika +edit_uri: edit/main/docs/ extra_css: - _assets/main.css @@ -8,47 +9,20 @@ extra_javascript: - _assets/scg.min.js - _assets/main.js -plugins: - - search - - i18n: - default_language: en - languages: - en: English - ru: Русский - no_translation: - ru: "Эта страница не переведена на русский язык" - en: "This page isn't translated to English" - translate_nav: - ru: - Home: "Главная" - Build: "Сборка" - Development: "Разработка" - Project structure: "Структура проекта" - Agents: "Агенты" - Patterns: "Шаблоны" - Knowledge base patterns: "Шаблоны для базы знаний" - Message reply agent: "Агент ответа на сообщение" - Non-atomic action interpretation agent: "Агент интерпретации неатомарных действий" - Alternative message topic classification agent: "Агент классификации сообщений с помощью логических правил" - Message topic classification agent: "Агент классификации сообщений с помощью Wit.ai" - Standard message reply agent: "Агент генерации ответа на сообщение" - Phrase generation agent: "Агент генерации фраз" - Interface component color changer agent: "Агент смены цвета компонента интерфейса" - Weather agent: "Агент прогноза погоды" - Find word in set by first letter agent: "Агент поиска слова по первой букве" - Changelog: "Список изменений" - Subsystems: "Подсистемы" - License: "Лицензия" - - nav: - Home: index.md - Home: index.ru.md - - Build: - - Docker: build/docker-build.md - - Docker: build/docker-build.ru.md - - Debian-based distros / Linux: build/linux-build.md - - Debian-based distros / Linux: build/linux-build.ru.md + - Quick Start: quick_start.md + - Quick Start: quick_start.ru.md + - Build Instructions: + - Quick Start: build/quick_start.md + - Quick Start: build/quick_start.ru.md + - Docker: build/docker_build.md + - Docker: build/docker_build.ru.md + - Build System: build/build_system.md + - Build System: build/build_system.ru.md + - CMake Flags: build/cmake_flags.md + - CMake Flags: build/cmake_flags.ru.md - Development: - Git-workflow: dev/git-workflow.md - Git-workflow: dev/git-workflow.ru.md @@ -56,8 +30,6 @@ nav: - Pull requests: dev/pr.ru.md - Codestyle: dev/codestyle.md - Codestyle: dev/codestyle.ru.md - - Project structure: dev/project_structure.md - - Project structure: dev/project_structure.ru.md - Agents: - Message reply agent: agents/messageReplyAgent.md - Message reply agent: agents/messageReplyAgent.ru.md @@ -77,26 +49,90 @@ nav: - Weather agent: agents/weatherAgent.ru.md - Find word in set by first letter agent: agents/findWordInSetByFirstLetter.md - Find word in set by first letter agent: agents/findWordInSetByFirstLetter.ru.md - - Subsystems: - - scl-machine: subsystems/scl-machine.md - - scl-machine: subsystems/scl-machine.ru.md - Patterns: - Knowledge base patterns: patterns/kb-patterns.md - Knowledge base patterns: patterns/kb-patterns.ru.md - - Changelog: changelog.md + - Subsystems: + - scl-machine: subsystems/scl-machine.md + - scl-machine: subsystems/scl-machine.ru.md - Thirdparty: thirdparty.md - Thirdparty: thirdparty.ru.md - License: license.md + - Changelog: changelog.md + +plugins: + - search: + lang: en + separator: '[\s\-\.]+' + - i18n: + default_language: en + languages: + en: English + ru: Русский + no_translation: + ru: "Эта страница не переведена на русский язык" + en: "This page isn't translated to English" + translate_nav: + ru: + Home: "Главная" + Quick Start: "Быстрый старт" + Build Instructions: "Инструкции сборки" + Build System: "Система сборки" + CMake Flags: "Флаги CMake" + Development: "Разработка" + Agents: "Агенты" + Patterns: "Шаблоны" + Knowledge base patterns: "Шаблоны для базы знаний" + Message reply agent: "Агент ответа на сообщение" + Non-atomic action interpretation agent: "Агент интерпретации неатомарных действий" + Alternative message topic classification agent: "Альтернативный агент классификации темы сообщения" + Message topic classification agent: "Агент классификации сообщений" + Standard message reply agent: "Агент генерации ответа на сообщение" + Phrase generation agent: "Агент генерации фраз" + Interface component color changer agent: "Агент смены цвета компонента интерфейса" + Weather agent: "Агент прогноза погоды" + Find word in set by first letter agent: "Агент поиска слова по первой букве" + Subsystems: "Подсистемы" + License: "Лицензия" + Changelog: "Список изменений" theme: - name: material - language: en + name: material + favicon: ostis-logo.png + logo: ostis-logo.png + palette: # Defines color schemes for light and dark modes + - media: "(prefers-color-scheme: light)" + scheme: default + primary: indigo + accent: indigo + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: indigo + accent: indigo + toggle: + icon: material/brightness-4 + name: Switch to light mode + features: + - navigation.instant # Enables instant loading of pages + - navigation.tracking # Automatically focuses active section in sidebar + - navigation.tabs # Adds top-level sections as tabs + - navigation.sections # Renders top-level sections as groups in sidebar + - navigation.expand # Expands all collapsible sections by default + - navigation.top # Adds a "back to top" button + - search.suggest # Displays search suggestions + - search.highlight # Highlights search terms on result page + - content.action.edit # Adds links to edit doc files + - content.tabs.link # Shares link when clicking on a tab + - content.code.copy # Adds a copy button to code blocks extra: # Default mkdocs-material alternate links for untranslated pages # https://squidfunk.github.io/mkdocs-material/setup/changing-the-language/#site-language-selector # For translated pages the language name is replaced by the string configured in i18n plugin - # secction and link is replaced by the link to the translated page + # section and link is replaced by the link to the translated page alternate: - name: "Home" link: "" @@ -106,9 +142,12 @@ extra: link: index.ru lang: ru - markdown_extensions: - - admonition + - admonition # Allows creation of call-out boxes (e.g., notes, warnings) - codehilite - - pymdownx.details - - pymdownx.superfences + - md_in_html # Allows Markdown syntax inside HTML blocks + - pymdownx.highlight: # Enhances code block highlighting + anchor_linenums: true + - pymdownx.inlinehilite # Enables inline code highlighting + - pymdownx.details # Allows creating collapsible elements + - pymdownx.superfences # Enables advanced fenced code blocks diff --git a/nika.ini b/nika.ini index 6b96d6010b..8dc60a85a5 100644 --- a/nika.ini +++ b/nika.ini @@ -3,11 +3,10 @@ max_loaded_segments = 1000 max_threads = 32 max_events_and_agents_threads = 32 -save_period = 3600 -update_period = 1800 +dump_memory_period = 3600 +dump_memory_statistics_period = 1800 -repo_path = kb.bin -extensions_path = bin/extensions +storage = kb.bin log_type = Console log_file = sc-memory.log diff --git a/problem-solver/cxx/.gitignore b/problem-solver/cxx/.gitignore deleted file mode 100644 index a65b41774a..0000000000 --- a/problem-solver/cxx/.gitignore +++ /dev/null @@ -1 +0,0 @@ -lib diff --git a/problem-solver/cxx/CMakeLists.txt b/problem-solver/cxx/CMakeLists.txt index 07e32f9720..760f44c8e0 100755 --- a/problem-solver/cxx/CMakeLists.txt +++ b/problem-solver/cxx/CMakeLists.txt @@ -1,11 +1,7 @@ -set(SC_COMMON_MODULE_SRC "${CMAKE_CURRENT_LIST_DIR}/commonModule") -set(DIALOG_CONTROL_MODULE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/dialogControlModule") -set(MESSAGE_REPLY_MODULE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/messageReplyModule") -set(INTERFACE_MODULE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/interfaceModule") - -add_subdirectory(commonModule) -add_subdirectory(messageReplyModule) -add_subdirectory(dialogControlModule) -add_subdirectory(messageClassificationModule) -add_subdirectory(interfaceModule) -add_subdirectory(messageProcessingModule) +add_subdirectory(common-module) +add_subdirectory(non-atomic-action-interpreter-module) +add_subdirectory(message-reply-module) +add_subdirectory(dialog-control-module) +add_subdirectory(message-classification-module) +add_subdirectory(interface-module) +add_subdirectory(message-processing-module) diff --git a/problem-solver/cxx/common-module/CMakeLists.txt b/problem-solver/cxx/common-module/CMakeLists.txt new file mode 100755 index 0000000000..365989eced --- /dev/null +++ b/problem-solver/cxx/common-module/CMakeLists.txt @@ -0,0 +1,28 @@ +file(GLOB SOURCES CONFIGURE_DEPENDS + "src/*/*.hpp" "src/*/*.cpp" + "include/common/*/*.hpp" "include/common/*/*.cpp" +) + +find_package(nlohmann_json REQUIRED) +find_package(CURL REQUIRED) + +add_library(common SHARED ${SOURCES}) +target_link_libraries(common + LINK_PUBLIC sc-machine::sc-memory + LINK_PUBLIC sc-machine::sc-agents-common + LINK_PRIVATE nlohmann_json::nlohmann_json + LINK_PRIVATE CURL::libcurl +) +target_include_directories(common + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src + PUBLIC $ + PUBLIC $ +) + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(common) +endif() diff --git a/problem-solver/cxx/commonModule/handler/LinkHandler.hpp b/problem-solver/cxx/common-module/include/common/handler/LinkHandler.hpp similarity index 87% rename from problem-solver/cxx/commonModule/handler/LinkHandler.hpp rename to problem-solver/cxx/common-module/include/common/handler/LinkHandler.hpp index e3901e5f29..2aa7cd2d65 100644 --- a/problem-solver/cxx/commonModule/handler/LinkHandler.hpp +++ b/problem-solver/cxx/common-module/include/common/handler/LinkHandler.hpp @@ -1,4 +1,4 @@ -#include "sc-memory/sc_memory.hpp" +#include #include diff --git a/problem-solver/cxx/commonModule/handler/NumberHandler.hpp b/problem-solver/cxx/common-module/include/common/handler/NumberHandler.hpp similarity index 85% rename from problem-solver/cxx/commonModule/handler/NumberHandler.hpp rename to problem-solver/cxx/common-module/include/common/handler/NumberHandler.hpp index a5fd3673ed..b89e262067 100644 --- a/problem-solver/cxx/commonModule/handler/NumberHandler.hpp +++ b/problem-solver/cxx/common-module/include/common/handler/NumberHandler.hpp @@ -1,8 +1,8 @@ #pragma once -#include "sc-memory/sc_memory.hpp" +#include -#include "handler/LinkHandler.hpp" +#include "common/handler/LinkHandler.hpp" namespace commonModule { diff --git a/problem-solver/cxx/commonModule/handler/ParameterHandler.hpp b/problem-solver/cxx/common-module/include/common/handler/ParameterHandler.hpp similarity index 92% rename from problem-solver/cxx/commonModule/handler/ParameterHandler.hpp rename to problem-solver/cxx/common-module/include/common/handler/ParameterHandler.hpp index 77a4cd0767..62a468c2c2 100644 --- a/problem-solver/cxx/commonModule/handler/ParameterHandler.hpp +++ b/problem-solver/cxx/common-module/include/common/handler/ParameterHandler.hpp @@ -1,8 +1,8 @@ #pragma once -#include "sc-memory/sc_memory.hpp" +#include -#include "handler/NumberHandler.hpp" +#include "common/handler/NumberHandler.hpp" namespace commonModule { diff --git a/problem-solver/cxx/commonModule/http/sc_http.hpp b/problem-solver/cxx/common-module/include/common/http/sc_http.hpp similarity index 100% rename from problem-solver/cxx/commonModule/http/sc_http.hpp rename to problem-solver/cxx/common-module/include/common/http/sc_http.hpp diff --git a/problem-solver/cxx/commonModule/http/sc_http_request.hpp b/problem-solver/cxx/common-module/include/common/http/sc_http_request.hpp similarity index 100% rename from problem-solver/cxx/commonModule/http/sc_http_request.hpp rename to problem-solver/cxx/common-module/include/common/http/sc_http_request.hpp diff --git a/problem-solver/cxx/commonModule/http/sc_http_response.hpp b/problem-solver/cxx/common-module/include/common/http/sc_http_response.hpp similarity index 91% rename from problem-solver/cxx/commonModule/http/sc_http_response.hpp rename to problem-solver/cxx/common-module/include/common/http/sc_http_response.hpp index 500743e7fd..6c0b6bb708 100644 --- a/problem-solver/cxx/commonModule/http/sc_http_response.hpp +++ b/problem-solver/cxx/common-module/include/common/http/sc_http_response.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_utils.hpp" +#include #include #include diff --git a/problem-solver/cxx/common-module/include/common/keynodes/Keynodes.hpp b/problem-solver/cxx/common-module/include/common/keynodes/Keynodes.hpp new file mode 100644 index 0000000000..6378dcc453 --- /dev/null +++ b/problem-solver/cxx/common-module/include/common/keynodes/Keynodes.hpp @@ -0,0 +1,47 @@ +#pragma once + +#include + +namespace commonModule +{ +class Keynodes : public ScKeynodes +{ +public: + static inline ScKeynode const action_deactivated{"action_deactivated", ScType::ConstNodeClass}; + + static inline ScKeynode const number{"number", ScType::ConstNodeClass}; + + static inline ScKeynode const nrel_sc_text_translation{"nrel_sc_text_translation", ScType::ConstNodeNonRole}; + + static inline ScKeynode const action_interpret_non_atomic_action{ + "action_interpret_non_atomic_action", + ScType::ConstNodeClass}; + + static inline ScKeynode const nrel_message_decomposition{"nrel_message_decomposition"}; + + static inline ScKeynode const nrel_message_sequence{"nrel_message_sequence"}; + + static inline ScKeynode const nrel_authors{"nrel_authors"}; + + static inline ScKeynode const rrel_message_theme{"rrel_message_theme"}; + + static inline ScKeynode const languages{"languages", ScType::ConstNode}; + + static inline ScKeynode const nrel_decomposition_of_action{"nrel_decomposition_of_action", ScType::ConstNodeNonRole}; + + static inline ScKeynode const nrel_then{"nrel_then", ScType::ConstNodeNonRole}; + + static inline ScKeynode const nrel_else{"nrel_else", ScType::ConstNodeNonRole}; + + static inline ScKeynode const nrel_goto{"nrel_goto", ScType::ConstNodeNonRole}; + + static inline ScKeynode const file{"file", ScType::ConstNode}; + + static inline ScKeynode const power_of_set{"power_of_set", ScType::ConstNode}; + + static inline ScKeynode const nrel_measurement{"nrel_measurement", ScType::ConstNodeNonRole}; + + static inline ScKeynode const lang_en{"lang_en", ScType::ConstNodeClass}; +}; + +} // namespace commonModule diff --git a/problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.hpp b/problem-solver/cxx/common-module/include/common/searcher/MessageSearcher.hpp similarity index 84% rename from problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.hpp rename to problem-solver/cxx/common-module/include/common/searcher/MessageSearcher.hpp index 71d11aeb2e..b2a7ea32a9 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.hpp +++ b/problem-solver/cxx/common-module/include/common/searcher/MessageSearcher.hpp @@ -1,8 +1,8 @@ #pragma once -#include "sc-memory/sc_memory.hpp" +#include -namespace dialogControlModule +namespace commonModule { class MessageSearcher { @@ -24,4 +24,4 @@ class MessageSearcher private: ScMemoryContext * context; }; -} // namespace dialogControlModule +} // namespace commonModule diff --git a/problem-solver/cxx/commonModule/utils/ActionUtils.hpp b/problem-solver/cxx/common-module/include/common/utils/ActionUtils.hpp similarity index 100% rename from problem-solver/cxx/commonModule/utils/ActionUtils.hpp rename to problem-solver/cxx/common-module/include/common/utils/ActionUtils.hpp diff --git a/problem-solver/cxx/commonModule/utils/RelationUtils.hpp b/problem-solver/cxx/common-module/include/common/utils/RelationUtils.hpp similarity index 88% rename from problem-solver/cxx/commonModule/utils/RelationUtils.hpp rename to problem-solver/cxx/common-module/include/common/utils/RelationUtils.hpp index 1573788123..176e4f203f 100644 --- a/problem-solver/cxx/commonModule/utils/RelationUtils.hpp +++ b/problem-solver/cxx/common-module/include/common/utils/RelationUtils.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_memory.hpp" +#include class RelationUtils { diff --git a/problem-solver/cxx/commonModule/utils/ScTemplateUtils.hpp b/problem-solver/cxx/common-module/include/common/utils/ScTemplateUtils.hpp similarity index 82% rename from problem-solver/cxx/commonModule/utils/ScTemplateUtils.hpp rename to problem-solver/cxx/common-module/include/common/utils/ScTemplateUtils.hpp index a465ae7a83..1ce794b0e8 100644 --- a/problem-solver/cxx/commonModule/utils/ScTemplateUtils.hpp +++ b/problem-solver/cxx/common-module/include/common/utils/ScTemplateUtils.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_template.hpp" +#include class ScTemplateUtils { diff --git a/problem-solver/cxx/commonModule/handler/LinkHandler.cpp b/problem-solver/cxx/common-module/src/handler/LinkHandler.cpp similarity index 87% rename from problem-solver/cxx/commonModule/handler/LinkHandler.cpp rename to problem-solver/cxx/common-module/src/handler/LinkHandler.cpp index eab8b09dcf..4ea98c9874 100644 --- a/problem-solver/cxx/commonModule/handler/LinkHandler.cpp +++ b/problem-solver/cxx/common-module/src/handler/LinkHandler.cpp @@ -1,4 +1,4 @@ -#include "LinkHandler.hpp" +#include "common/handler/LinkHandler.hpp" using namespace commonModule; diff --git a/problem-solver/cxx/commonModule/handler/NumberHandler.cpp b/problem-solver/cxx/common-module/src/handler/NumberHandler.cpp similarity index 80% rename from problem-solver/cxx/commonModule/handler/NumberHandler.cpp rename to problem-solver/cxx/common-module/src/handler/NumberHandler.cpp index fe95e70b9e..afd6ed68ca 100644 --- a/problem-solver/cxx/commonModule/handler/NumberHandler.cpp +++ b/problem-solver/cxx/common-module/src/handler/NumberHandler.cpp @@ -1,8 +1,7 @@ -#include "NumberHandler.hpp" +#include "common/handler/NumberHandler.hpp" -#include "sc-agents-common/utils//IteratorUtils.hpp" - -#include "keynodes/Keynodes.hpp" +#include "common/keynodes/Keynodes.hpp" +#include ScAddr commonModule::NumberHandler::getNumberNode(const double & number) { @@ -28,7 +27,7 @@ ScAddr commonModule::NumberHandler::findNumberNode(const double & number) { ScAddr candidateNode = utils::IteratorUtils::getAnyByInRelation(this->context, candidateLink, ScKeynodes::nrel_idtf); - if (this->context->CheckConnector(Keynodes::number, candidateNode, ScType::EdgeAccessConstPosPerm)) + if (this->context->CheckConnector(Keynodes::number, candidateNode, ScType::ConstPermPosArc)) { numberNode = candidateNode; break; @@ -43,13 +42,13 @@ ScAddr commonModule::NumberHandler::generateNumberNode(const double & number) ScAddr numberLink = this->linkHandler->createLink(numberAsString); ScTemplate scTemplate; scTemplate.Quintuple( - ScType::NodeVar >> "_number_node", - ScType::EdgeDCommonVar, + ScType::VarNode >> "_number_node", + ScType::VarCommonArc, numberLink, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::nrel_idtf); - scTemplate.Triple(Keynodes::file, ScType::EdgeAccessVarPosPerm, numberLink); - scTemplate.Triple(Keynodes::number, ScType::EdgeAccessVarPosPerm, "_number_node"); + scTemplate.Triple(Keynodes::file, ScType::VarPermPosArc, numberLink); + scTemplate.Triple(Keynodes::number, ScType::VarPermPosArc, "_number_node"); ScTemplateGenResult genResult; this->context->GenerateByTemplate(scTemplate, genResult); diff --git a/problem-solver/cxx/commonModule/handler/ParameterHandler.cpp b/problem-solver/cxx/common-module/src/handler/ParameterHandler.cpp similarity index 78% rename from problem-solver/cxx/commonModule/handler/ParameterHandler.cpp rename to problem-solver/cxx/common-module/src/handler/ParameterHandler.cpp index 1d0b100d63..cf302ccad5 100644 --- a/problem-solver/cxx/commonModule/handler/ParameterHandler.cpp +++ b/problem-solver/cxx/common-module/src/handler/ParameterHandler.cpp @@ -1,7 +1,7 @@ -#include "ParameterHandler.hpp" +#include "common/handler/ParameterHandler.hpp" -#include "utils//RelationUtils.hpp" -#include "utils//ScTemplateUtils.hpp" +#include "common/utils/RelationUtils.hpp" +#include "common/utils/ScTemplateUtils.hpp" using namespace commonModule; @@ -13,14 +13,14 @@ ScAddr ParameterHandler::updateMeasurableParameter( { ScAddr numberNode = this->numberHandler->getNumberNode(number); ScAddr parameterNode = getParameterNode(parameterClass, measurementRel, numberNode); - if (!this->context->CheckConnector(parameterNode, entity, ScType::EdgeAccessConstPosPerm)) + if (!this->context->CheckConnector(parameterNode, entity, ScType::ConstPermPosArc)) { ScAddr currentParameterNode = this->findParameterNodeByEntity(parameterClass, entity); if (currentParameterNode.IsValid()) { - RelationUtils::eraseAllEdges(this->context, currentParameterNode, entity, ScType::EdgeAccessConstPosPerm); + RelationUtils::eraseAllEdges(this->context, currentParameterNode, entity, ScType::ConstPermPosArc); } - this->context->GenerateConnector(ScType::EdgeAccessConstPosPerm, parameterNode, entity); + this->context->GenerateConnector(ScType::ConstPermPosArc, parameterNode, entity); } return parameterNode; } @@ -46,9 +46,8 @@ ScAddr ParameterHandler::findParameterNodeByNumber( { ScAddr parameterNode = ScAddr(); ScTemplate scTemplate; - scTemplate.Triple(parameterClass, ScType::EdgeAccessVarPosPerm, ScType::NodeVar >> "_parameter_node"); - scTemplate.Quintuple( - "_parameter_node", ScType::EdgeDCommonVar, numberNode, ScType::EdgeAccessVarPosPerm, measurementRel); + scTemplate.Triple(parameterClass, ScType::VarPermPosArc, ScType::VarNode >> "_parameter_node"); + scTemplate.Quintuple("_parameter_node", ScType::VarCommonArc, numberNode, ScType::VarPermPosArc, measurementRel); ScAddrVector parameterNodes = ScTemplateUtils::getAllWithKey(this->context, scTemplate, "_parameter_node"); if (parameterNodes.size() == 1) parameterNode = parameterNodes[0]; @@ -74,8 +73,8 @@ ScAddr ParameterHandler::findParameterNodeByEntity(const ScAddr & parameterClass { ScAddr parameterNode = ScAddr(); ScTemplate scTemplate; - scTemplate.Triple(parameterClass, ScType::EdgeAccessVarPosPerm, ScType::NodeVar >> "_parameter_node"); - scTemplate.Triple("_parameter_node", ScType::EdgeAccessVarPosPerm, entity); + scTemplate.Triple(parameterClass, ScType::VarPermPosArc, ScType::VarNode >> "_parameter_node"); + scTemplate.Triple("_parameter_node", ScType::VarPermPosArc, entity); ScAddrVector parameterNodes = ScTemplateUtils::getAllWithKey(this->context, scTemplate, "_parameter_node"); if (parameterNodes.size() == 1) parameterNode = parameterNodes[0]; @@ -103,9 +102,8 @@ ScAddr ParameterHandler::generateParameterNode( const ScAddr & numberNode) { ScTemplate scTemplate; - scTemplate.Triple(parameterClass, ScType::EdgeAccessVarPosPerm, ScType::NodeVar >> "_parameter_node"); - scTemplate.Quintuple( - "_parameter_node", ScType::EdgeDCommonVar, numberNode, ScType::EdgeAccessVarPosPerm, measurementRel); + scTemplate.Triple(parameterClass, ScType::VarPermPosArc, ScType::VarNode >> "_parameter_node"); + scTemplate.Quintuple("_parameter_node", ScType::VarCommonArc, numberNode, ScType::VarPermPosArc, measurementRel); ScTemplateGenResult genResult; this->context->GenerateByTemplate(scTemplate, genResult); diff --git a/problem-solver/cxx/commonModule/http/sc_http.cpp b/problem-solver/cxx/common-module/src/http/sc_http.cpp similarity index 89% rename from problem-solver/cxx/commonModule/http/sc_http.cpp rename to problem-solver/cxx/common-module/src/http/sc_http.cpp index 612a960a6d..1520c4ad03 100644 --- a/problem-solver/cxx/commonModule/http/sc_http.cpp +++ b/problem-solver/cxx/common-module/src/http/sc_http.cpp @@ -1,4 +1,4 @@ -#include "sc_http.hpp" +#include "common/http/sc_http.hpp" #include diff --git a/problem-solver/cxx/commonModule/http/sc_http_request.cpp b/problem-solver/cxx/common-module/src/http/sc_http_request.cpp similarity index 97% rename from problem-solver/cxx/commonModule/http/sc_http_request.cpp rename to problem-solver/cxx/common-module/src/http/sc_http_request.cpp index af906bdc49..4173fa64fb 100644 --- a/problem-solver/cxx/commonModule/http/sc_http_request.cpp +++ b/problem-solver/cxx/common-module/src/http/sc_http_request.cpp @@ -1,6 +1,6 @@ -#include "sc_http_request.hpp" +#include "common/http/sc_http_request.hpp" -#include "sc-memory/sc_debug.hpp" +#include #include diff --git a/problem-solver/cxx/commonModule/http/sc_http_response.cpp b/problem-solver/cxx/common-module/src/http/sc_http_response.cpp similarity index 91% rename from problem-solver/cxx/commonModule/http/sc_http_response.cpp rename to problem-solver/cxx/common-module/src/http/sc_http_response.cpp index d46d158be9..04d7c795d4 100644 --- a/problem-solver/cxx/commonModule/http/sc_http_response.cpp +++ b/problem-solver/cxx/common-module/src/http/sc_http_response.cpp @@ -1,4 +1,4 @@ -#include "sc_http_response.hpp" +#include "common/http/sc_http_response.hpp" #include #include diff --git a/problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.cpp b/problem-solver/cxx/common-module/src/searcher/MessageSearcher.cpp similarity index 71% rename from problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.cpp rename to problem-solver/cxx/common-module/src/searcher/MessageSearcher.cpp index 362744e937..9f0c16f2d5 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/MessageSearcher.cpp +++ b/problem-solver/cxx/common-module/src/searcher/MessageSearcher.cpp @@ -1,12 +1,10 @@ -#include "MessageSearcher.hpp" +#include "common/searcher/MessageSearcher.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "keynodes/Keynodes.hpp" -#include "keynodes/MessageKeynodes.hpp" +#include "common/keynodes/Keynodes.hpp" #include +#include -using namespace dialogControlModule; +using namespace commonModule; MessageSearcher::MessageSearcher(ScMemoryContext * context) : context(context) @@ -19,17 +17,13 @@ ScAddr MessageSearcher::getFirstMessage(const ScAddr & nonAtomicMessageNode) const std::string VAR_MESSAGE = "_message"; ScTemplate templ; templ.Quintuple( - ScType::NodeVarTuple >> VAR_TUPLE, - ScType::EdgeDCommonVar, + ScType::VarNodeTuple >> VAR_TUPLE, + ScType::VarCommonArc, nonAtomicMessageNode, - ScType::EdgeAccessVarPosPerm, - MessageKeynodes::nrel_message_decomposition); + ScType::VarPermPosArc, + Keynodes::nrel_message_decomposition); templ.Quintuple( - VAR_TUPLE, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> VAR_MESSAGE, - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); + VAR_TUPLE, ScType::VarPermPosArc, ScType::VarNode >> VAR_MESSAGE, ScType::VarPermPosArc, ScKeynodes::rrel_1); ScTemplateSearchResult result; context->SearchByTemplate(templ, result); @@ -53,14 +47,14 @@ ScAddr MessageSearcher::getNextMessage(const ScAddr & messageNode) const std::string VAR_TUPLE = "_tuple", VAR_EDGE_1 = "_edge_1", VAR_EDGE_2 = "_edge_2", VAR_D_COMMON_EDGE = "_d_common_edge", VAR_MESSAGE = "_message"; ScTemplate templ; - templ.Triple(ScType::NodeVarTuple >> VAR_TUPLE, ScType::EdgeAccessVarPosPerm >> VAR_EDGE_1, messageNode); + templ.Triple(ScType::VarNodeTuple >> VAR_TUPLE, ScType::VarPermPosArc >> VAR_EDGE_1, messageNode); templ.Quintuple( VAR_EDGE_1, - ScType::EdgeDCommonVar >> VAR_D_COMMON_EDGE, - ScType::EdgeAccessVarPosPerm >> VAR_EDGE_2, - ScType::EdgeAccessVarPosPerm, - MessageKeynodes::nrel_message_sequence); - templ.Triple(VAR_TUPLE, VAR_EDGE_2, ScType::NodeVar >> VAR_MESSAGE); + ScType::VarCommonArc >> VAR_D_COMMON_EDGE, + ScType::VarPermPosArc >> VAR_EDGE_2, + ScType::VarPermPosArc, + Keynodes::nrel_message_sequence); + templ.Triple(VAR_TUPLE, VAR_EDGE_2, ScType::VarNode >> VAR_MESSAGE); ScTemplateSearchResult result; context->SearchByTemplate(templ, result); @@ -84,11 +78,7 @@ ScAddr MessageSearcher::getMessageAuthor(const ScAddr & messageNode) ScTemplate templ; const std::string VAR_AUTHOR = "_author"; templ.Quintuple( - messageNode, - ScType::EdgeDCommonVar, - ScType::NodeVar >> VAR_AUTHOR, - ScType::EdgeAccessVarPosPerm, - MessageKeynodes::nrel_authors); + messageNode, ScType::VarCommonArc, ScType::VarNode >> VAR_AUTHOR, ScType::VarPermPosArc, Keynodes::nrel_authors); ScTemplateSearchResult result; context->SearchByTemplate(templ, result); @@ -113,10 +103,10 @@ ScAddr MessageSearcher::getMessageTheme(const ScAddr & messageNode) const std::string VAR_THEME = "_theme"; templ.Quintuple( messageNode, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> VAR_THEME, - ScType::EdgeAccessVarPosPerm, - MessageKeynodes::rrel_message_theme); + ScType::VarPermPosArc, + ScType::VarNode >> VAR_THEME, + ScType::VarPermPosArc, + Keynodes::rrel_message_theme); ScTemplateSearchResult result; context->SearchByTemplate(templ, result); @@ -147,12 +137,12 @@ ScAddrVector MessageSearcher::getMessageLinks(ScAddr const & message, ScAddrVect } ScIterator3Ptr const linkIterator = - context->CreateIterator3(translationNode, ScType::EdgeAccessConstPosPerm, ScType::LinkConst); + context->CreateIterator3(translationNode, ScType::ConstPermPosArc, ScType::ConstNodeLink); while (linkIterator->Next()) { ScAddr const & linkAddr = linkIterator->Get(2); bool result = std::all_of(linkClasses.cbegin(), linkClasses.cend(), [this, &linkAddr](auto const & addr) { - return context->CheckConnector(addr, linkAddr, ScType::EdgeAccessConstPosPerm); + return context->CheckConnector(addr, linkAddr, ScType::ConstPermPosArc); }); if (result == SC_TRUE) diff --git a/problem-solver/cxx/commonModule/utils/ActionUtils.cpp b/problem-solver/cxx/common-module/src/utils/ActionUtils.cpp similarity index 86% rename from problem-solver/cxx/commonModule/utils/ActionUtils.cpp rename to problem-solver/cxx/common-module/src/utils/ActionUtils.cpp index 355b4cd4e2..d8bebe785c 100644 --- a/problem-solver/cxx/commonModule/utils/ActionUtils.cpp +++ b/problem-solver/cxx/common-module/src/utils/ActionUtils.cpp @@ -1,12 +1,12 @@ -#include "ActionUtils.hpp" +#include "common/utils/ActionUtils.hpp" -#include "keynodes/Keynodes.hpp" +#include "common/keynodes/Keynodes.hpp" using namespace commonModule; bool ActionUtils::isActionDeactivated(ScAgentContext * context, ScAddr const & action) { - return context->CheckConnector(commonModule::Keynodes::action_deactivated, action, ScType::EdgeAccessConstPosPerm); + return context->CheckConnector(commonModule::Keynodes::action_deactivated, action, ScType::ConstPermPosArc); } ScAction ActionUtils::CreateAction( diff --git a/problem-solver/cxx/commonModule/utils/RelationUtils.cpp b/problem-solver/cxx/common-module/src/utils/RelationUtils.cpp similarity index 86% rename from problem-solver/cxx/commonModule/utils/RelationUtils.cpp rename to problem-solver/cxx/common-module/src/utils/RelationUtils.cpp index ce94a2ed80..7189305d2b 100644 --- a/problem-solver/cxx/commonModule/utils/RelationUtils.cpp +++ b/problem-solver/cxx/common-module/src/utils/RelationUtils.cpp @@ -1,7 +1,7 @@ -#include "RelationUtils.hpp" +#include "common/utils/RelationUtils.hpp" -#include "sc-memory/sc_keynodes.hpp" -#include "sc-memory/sc_memory.hpp" +#include +#include ScAddr RelationUtils::getIndexRelation(ScMemoryContext * context, int const & index) { diff --git a/problem-solver/cxx/commonModule/utils/ScTemplateUtils.cpp b/problem-solver/cxx/common-module/src/utils/ScTemplateUtils.cpp similarity index 83% rename from problem-solver/cxx/commonModule/utils/ScTemplateUtils.cpp rename to problem-solver/cxx/common-module/src/utils/ScTemplateUtils.cpp index cfea1d60e3..415e061f00 100644 --- a/problem-solver/cxx/commonModule/utils/ScTemplateUtils.cpp +++ b/problem-solver/cxx/common-module/src/utils/ScTemplateUtils.cpp @@ -1,6 +1,6 @@ -#include "ScTemplateUtils.hpp" +#include "common/utils/ScTemplateUtils.hpp" -#include "sc-memory/sc_memory.hpp" +#include ScAddrVector ScTemplateUtils::getAllWithKey( ScMemoryContext * context, diff --git a/problem-solver/cxx/commonModule/CMakeLists.txt b/problem-solver/cxx/commonModule/CMakeLists.txt deleted file mode 100755 index 74c3b6ab52..0000000000 --- a/problem-solver/cxx/commonModule/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -set(SOURCES - "CommonModule.cpp" - "agent/NonAtomicActionInterpreterAgent.cpp" - "interpreter/NonAtomicActionInterpreter.cpp" - "handler/NumberHandler.cpp" - "handler/LinkHandler.cpp" - "handler/ParameterHandler.cpp" - "utils/RelationUtils.cpp" - "utils/ActionUtils.cpp" - "utils/ScTemplateUtils.cpp" - "http/sc_http.cpp" - "http/sc_http_request.cpp" - "http/sc_http_response.cpp" -) - -set(HEADERS - "CommonModule.hpp" - "keynodes/Keynodes.hpp" - "agent/NonAtomicActionInterpreterAgent.hpp" - "interpreter/NonAtomicActionInterpreter.hpp" - "handler/NumberHandler.hpp" - "handler/LinkHandler.hpp" - "handler/ParameterHandler.hpp" - "utils/RelationUtils.hpp" - "utils/ActionUtils.hpp" - "utils/ScTemplateUtils.hpp" - "http/sc_http.hpp" - "http/sc_http_request.hpp" - "http/sc_http_response.hpp" -) - -find_package(CURL REQUIRED) -find_package(nlohmann_json 3.7.3 REQUIRED) - -include_directories(${CMAKE_CURRENT_LIST_DIR} ${SC_MEMORY_SRC} ${SC_KPM_SRC} ${SC_TOOLS_SRC}) - -add_library(common SHARED ${SOURCES} ${HEADERS}) - -target_link_libraries(common sc-memory sc-agents-common nlohmann_json::nlohmann_json curl) - -if(${SC_BUILD_TESTS}) - include(${CMAKE_CURRENT_LIST_DIR}/test/tests.cmake) -endif() - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(common) -endif() diff --git a/problem-solver/cxx/commonModule/CommonModule.cpp b/problem-solver/cxx/commonModule/CommonModule.cpp deleted file mode 100644 index c4c8125b8e..0000000000 --- a/problem-solver/cxx/commonModule/CommonModule.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "CommonModule.hpp" - -#include "agent/NonAtomicActionInterpreterAgent.hpp" - -using namespace commonModule; - -SC_MODULE_REGISTER(CommonModule)->Agent(); diff --git a/problem-solver/cxx/commonModule/CommonModule.hpp b/problem-solver/cxx/commonModule/CommonModule.hpp deleted file mode 100644 index 2f6ff343ef..0000000000 --- a/problem-solver/cxx/commonModule/CommonModule.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "sc-memory/sc_module.hpp" - -namespace commonModule -{ -class CommonModule : public ScModule -{ -}; - -} // namespace commonModule diff --git a/problem-solver/cxx/commonModule/keynodes/Keynodes.hpp b/problem-solver/cxx/commonModule/keynodes/Keynodes.hpp deleted file mode 100644 index 367f0963a0..0000000000 --- a/problem-solver/cxx/commonModule/keynodes/Keynodes.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include - -namespace commonModule -{ -class Keynodes : public ScKeynodes -{ -public: - static inline ScKeynode const action_deactivated{"action_deactivated", ScType::NodeConstClass}; - - static inline ScKeynode const number{"number", ScType::NodeConstClass}; - - static inline ScKeynode const nrel_sc_text_translation{"nrel_sc_text_translation", ScType::NodeConstNoRole}; - - static inline ScKeynode const action_interpret_non_atomic_action{ - "action_interpret_non_atomic_action", - ScType::NodeConstClass}; - - static inline ScKeynode const languages{"languages", ScType::NodeConst}; - - static inline ScKeynode const nrel_decomposition_of_action{"nrel_decomposition_of_action", ScType::NodeConstNoRole}; - - static inline ScKeynode const nrel_then{"nrel_then", ScType::NodeConstNoRole}; - - static inline ScKeynode const nrel_else{"nrel_else", ScType::NodeConstNoRole}; - - static inline ScKeynode const nrel_goto{"nrel_goto", ScType::NodeConstNoRole}; - - static inline ScKeynode const file{"file", ScType::NodeConst}; - - static inline ScKeynode const power_of_set{"power_of_set", ScType::NodeConst}; - - static inline ScKeynode const nrel_measurement{"nrel_measurement", ScType::NodeConstNoRole}; - - static inline ScKeynode const lang_en{"lang_en", ScType::NodeConstClass}; -}; - -} // namespace commonModule diff --git a/problem-solver/cxx/commonModule/test/tests.cmake b/problem-solver/cxx/commonModule/test/tests.cmake deleted file mode 100644 index 17d3744bfb..0000000000 --- a/problem-solver/cxx/commonModule/test/tests.cmake +++ /dev/null @@ -1,22 +0,0 @@ -file(GLOB COMMON_TEST_AGENTS - "${CMAKE_CURRENT_LIST_DIR}/agent/*.cpp" "${CMAKE_CURRENT_LIST_DIR}/agent/*.hpp" - "${CMAKE_CURRENT_LIST_DIR}/keynodes/*.cpp" "${CMAKE_CURRENT_LIST_DIR}/keynodes/*.hpp" -) -add_library(common_test_agents ${COMMON_TEST_AGENTS}) -target_link_libraries( - common_test_agents - common - sc-agents-common -) - -make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units - NAME common_test_starter - DEPENDS common_test_agents sc-builder-lib - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${SC_COMMON_MODULE_SRC} ${SC_MACHINE_ROOT}/sc-tools -) - -add_definitions(-DCOMMON_MODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}") - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(common_test_starter) -endif() diff --git a/problem-solver/cxx/dialogControlModule/CMakeLists.txt b/problem-solver/cxx/dialog-control-module/CMakeLists.txt similarity index 55% rename from problem-solver/cxx/dialogControlModule/CMakeLists.txt rename to problem-solver/cxx/dialog-control-module/CMakeLists.txt index c3bbe5cb08..52dde4b92d 100755 --- a/problem-solver/cxx/dialogControlModule/CMakeLists.txt +++ b/problem-solver/cxx/dialog-control-module/CMakeLists.txt @@ -1,12 +1,9 @@ -set(INFERENCE_MODULE_SRC "${SUBSYSTEMS_PATH}/scl-machine/problem-solver/cxx/inferenceModule") - set(SOURCES "DialogControlModule.cpp" "generator/MessageConstructionsGenerator.cpp" "agent/PhraseGenerationAgent.cpp" "agent/StandardMessageReplyAgent.cpp" "searcher/LanguageSearcher.cpp" - "searcher/MessageSearcher.cpp" "searcher/PhraseSearcher.cpp" "searcher/TokenDomainSearcher.cpp" "handler/MessageHandler.cpp" @@ -20,28 +17,27 @@ set(HEADERS "agent/PhraseGenerationAgent.hpp" "agent/StandardMessageReplyAgent.hpp" "searcher/LanguageSearcher.hpp" - "searcher/MessageSearcher.hpp" "searcher/PhraseSearcher.hpp" "searcher/TokenDomainSearcher.hpp" "handler/MessageHandler.hpp" ) -include_directories( - ${CMAKE_CURRENT_LIST_DIR} - ${SC_MEMORY_SRC} - ${SC_KPM_SRC} - ${SC_TOOLS_SRC} - ${INFERENCE_MODULE_SRC} - ${SC_COMMON_MODULE_SRC} +add_library(dialog-control-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(dialog-control-module + LINK_PUBLIC sc-machine::sc-builder-lib + LINK_PUBLIC scl-machine::inference + LINK_PUBLIC common ) - -add_library(dialogControlModule SHARED ${SOURCES} ${HEADERS}) -target_link_libraries(dialogControlModule sc-memory sc-agents-common common sc-builder-lib inferenceModule) +target_include_directories(dialog-control-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(dialog-control-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) if(${SC_BUILD_TESTS}) - include(${CMAKE_CURRENT_LIST_DIR}/test/tests.cmake) + set(DIALOG_CONTROL_MODULE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(test) endif() if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(dialogControlModule) + target_clangformat_setup(dialog-control-module) endif() diff --git a/problem-solver/cxx/dialogControlModule/DialogControlModule.cpp b/problem-solver/cxx/dialog-control-module/DialogControlModule.cpp similarity index 100% rename from problem-solver/cxx/dialogControlModule/DialogControlModule.cpp rename to problem-solver/cxx/dialog-control-module/DialogControlModule.cpp diff --git a/problem-solver/cxx/dialogControlModule/DialogControlModule.hpp b/problem-solver/cxx/dialog-control-module/DialogControlModule.hpp similarity index 64% rename from problem-solver/cxx/dialogControlModule/DialogControlModule.hpp rename to problem-solver/cxx/dialog-control-module/DialogControlModule.hpp index 694408564c..98be948d0e 100644 --- a/problem-solver/cxx/dialogControlModule/DialogControlModule.hpp +++ b/problem-solver/cxx/dialog-control-module/DialogControlModule.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_module.hpp" +#include class DialogControlModule : public ScModule { diff --git a/problem-solver/cxx/dialogControlModule/agent/PhraseGenerationAgent.cpp b/problem-solver/cxx/dialog-control-module/agent/PhraseGenerationAgent.cpp similarity index 81% rename from problem-solver/cxx/dialogControlModule/agent/PhraseGenerationAgent.cpp rename to problem-solver/cxx/dialog-control-module/agent/PhraseGenerationAgent.cpp index cd9f4c020d..3e6472d927 100644 --- a/problem-solver/cxx/dialogControlModule/agent/PhraseGenerationAgent.cpp +++ b/problem-solver/cxx/dialog-control-module/agent/PhraseGenerationAgent.cpp @@ -1,18 +1,16 @@ #include "PhraseGenerationAgent.hpp" -#include "sc-agents-common/utils/CommonUtils.hpp" -#include "sc-agents-common/utils/GenerationUtils.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "handler/LinkHandler.hpp" #include "keynodes/DialogKeynodes.hpp" #include "keynodes/MessageKeynodes.hpp" -#include "manager/templateManager/TemplateManager.hpp" #include "searcher/LanguageSearcher.hpp" -#include "utils/ScTemplateUtils.hpp" +#include +#include +#include #include +#include +#include +#include -using namespace inference; using namespace utils; namespace dialogControlModule @@ -23,13 +21,13 @@ ScResult PhraseGenerationAgent::DoProgram(ScActionInitiatedEvent const & event, ScAddr const & replyMessageNode = action.GetArgument(ScKeynodes::rrel_1); if (!m_context.IsElement(replyMessageNode)) { - SC_AGENT_LOG_ERROR("Action doesn't have a reply message node."); + m_logger.Error("Action doesn't have a reply message node."); return action.FinishWithError(); } ScAddr const & phraseLink = action.GetArgument(ScKeynodes::rrel_2); if (!m_context.IsElement(phraseLink)) { - SC_AGENT_LOG_ERROR("Action doesn't have a link with a text template."); + m_logger.Error("Action doesn't have a link with a text template."); return action.FinishWithError(); } ScAddr templateNode = @@ -37,25 +35,25 @@ ScResult PhraseGenerationAgent::DoProgram(ScActionInitiatedEvent const & event, ScAddr const & parametersNode = action.GetArgument(ScKeynodes::rrel_3); if (!m_context.IsElement(parametersNode)) { - SC_AGENT_LOG_ERROR("Action doesn't have a parameters node."); + m_logger.Error("Action doesn't have a parameters node."); return action.FinishWithError(); } ScAddr const & linkResult = generateLinkByTemplate(templateNode, parametersNode, phraseLink); if (!m_context.IsElement(linkResult)) { - SC_AGENT_LOG_ERROR("Answer isn't found."); + m_logger.Error("Answer isn't found."); return action.FinishUnsuccessfully(); } LanguageSearcher searcher(&m_context); ScAddr const & langNode = searcher.getLanguage(phraseLink); if (m_context.IsElement(langNode)) { - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, langNode, linkResult); + m_context.GenerateConnector(ScType::ConstPermPosArc, langNode, linkResult); } else { - SC_AGENT_LOG_DEBUG("Language link isn't found."); + m_logger.Debug("Language link isn't found."); } if (!m_context.IsElement(templateNode)) { @@ -91,7 +89,7 @@ ScAddr PhraseGenerationAgent::generateLinkByTemplate( } else { - SC_AGENT_LOG_DEBUG("Text template doesn't have variables."); + m_logger.Debug("Text template doesn't have variables."); textResult = text; } if (!textResult.empty()) @@ -99,7 +97,7 @@ ScAddr PhraseGenerationAgent::generateLinkByTemplate( linkResult = handler.createLink(textResult); std::string linkContent; m_context.GetLinkContent(linkResult, linkContent); - SC_AGENT_LOG_DEBUG("Generated text: \"" << linkContent << "\""); + m_logger.Debug("Generated text: \"", linkContent, "\""); } return linkResult; } @@ -144,7 +142,7 @@ std::string PhraseGenerationAgent::findResultText( } else { - SC_AGENT_LOG_DEBUG("Phrase template isn't found."); + m_logger.Debug("Phrase template isn't found."); } return textResult; } @@ -153,7 +151,7 @@ std::vector PhraseGenerationAgent::findParametersList( const ScAddr & templateNode, const ScAddr & parametersNode) { - TemplateManager manager(&m_context); + inference::TemplateManager manager(&m_context); ScAddrVector arguments = IteratorUtils::getAllWithType(&m_context, parametersNode, ScType::Node); manager.setArguments(arguments); std::vector parametersList; @@ -228,9 +226,9 @@ std::string PhraseGenerationAgent::processScTemplate( void PhraseGenerationAgent::generateSemanticEquivalent(const ScAddr & replyMessageNode, const ScAddr & templateNode) { - ScAddr semanticEquivalent = m_context.GenerateNode(ScType::NodeConstStruct); + ScAddr semanticEquivalent = m_context.GenerateNode(ScType::ConstNodeStructure); ScIterator3Ptr semanticEquivalentIterator = - m_context.CreateIterator3(MessageKeynodes::answer_structure, ScType::EdgeAccessConstPosPerm, ScType::Unknown); + m_context.CreateIterator3(MessageKeynodes::answer_structure, ScType::ConstPermPosArc, ScType::Unknown); while (semanticEquivalentIterator->Next()) { @@ -240,9 +238,9 @@ void PhraseGenerationAgent::generateSemanticEquivalent(const ScAddr & replyMessa ScTemplate semanticEquivalentStructure; semanticEquivalentStructure.Quintuple( replyMessageNode, - ScType::EdgeDCommonVar, + ScType::VarCommonArc, semanticEquivalent, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, MessageKeynodes::nrel_semantic_equivalent); ScTemplateGenResult result; @@ -307,23 +305,23 @@ void PhraseGenerationAgent::replaceSetElementsVariables( } ScAddr set = phraseSemanticResult[variable]; ScIterator3Ptr const & setElementsIterator = - m_context.CreateIterator3(set, ScType::EdgeAccessConstPosPerm, ScType::NodeConst); + m_context.CreateIterator3(set, ScType::ConstPermPosArc, ScType::ConstNode); if (setElementsIterator->Next()) { setElementsTextStream << CommonUtils::getMainIdtf(&m_context, setElementsIterator->Get(2), {ScKeynodes::lang_ru}); m_context.GenerateConnector( - ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, setElementsIterator->Get(1)); + ScType::ConstPermPosArc, MessageKeynodes::answer_structure, setElementsIterator->Get(1)); m_context.GenerateConnector( - ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, setElementsIterator->Get(2)); + ScType::ConstPermPosArc, MessageKeynodes::answer_structure, setElementsIterator->Get(2)); } while (setElementsIterator->Next()) { setElementsTextStream << ", " << CommonUtils::getMainIdtf(&m_context, setElementsIterator->Get(2), {ScKeynodes::lang_ru}); m_context.GenerateConnector( - ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, setElementsIterator->Get(1)); + ScType::ConstPermPosArc, MessageKeynodes::answer_structure, setElementsIterator->Get(1)); m_context.GenerateConnector( - ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, setElementsIterator->Get(2)); + ScType::ConstPermPosArc, MessageKeynodes::answer_structure, setElementsIterator->Get(2)); } std::string variableRegular = regex_replace( @@ -334,11 +332,11 @@ void PhraseGenerationAgent::replaceSetElementsVariables( void PhraseGenerationAgent::updateSemanticAnswer(const ScTemplateSearchResultItem & phraseSemanticResult) { - ScAddr const & phraseStruct = m_context.GenerateNode(ScType::NodeStruct); + ScAddr const & phraseStruct = m_context.GenerateNode(ScType::ConstNodeStructure); ScAddrVector phraseElements; for (size_t i = 0; i < phraseSemanticResult.Size(); i++) { - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, phraseStruct, phraseSemanticResult[i]); + m_context.GenerateConnector(ScType::ConstPermPosArc, phraseStruct, phraseSemanticResult[i]); phraseElements.push_back(phraseSemanticResult[i]); } @@ -359,7 +357,7 @@ void PhraseGenerationAgent::updateSemanticAnswer(const ScTemplateSearchResultIte for (auto & phraseElement : phraseElements) { - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, phraseElement); + m_context.GenerateConnector(ScType::ConstPermPosArc, MessageKeynodes::answer_structure, phraseElement); } m_context.EraseElement(phraseStruct); @@ -371,7 +369,7 @@ void PhraseGenerationAgent::updateSemanticAnswer(const ScAddr & phraseAddr) phraseElements.push_back(phraseAddr); ScIterator3Ptr const classesIt3 = - m_context.CreateIterator3(ScType::NodeConstClass, ScType::EdgeAccessConstPosPerm, phraseAddr); + m_context.CreateIterator3(ScType::ConstNodeClass, ScType::ConstPermPosArc, phraseAddr); while (classesIt3->Next()) { phraseElements.push_back(classesIt3->Get(0)); @@ -379,7 +377,7 @@ void PhraseGenerationAgent::updateSemanticAnswer(const ScAddr & phraseAddr) } ScIterator5Ptr const relationsIt5 = m_context.CreateIterator5( - phraseAddr, ScType::Unknown, ScType::Unknown, ScType::EdgeAccessConstPosPerm, ScType::NodeConst); + phraseAddr, ScType::Unknown, ScType::Unknown, ScType::ConstPermPosArc, ScType::ConstNode); while (relationsIt5->Next()) { phraseElements.push_back(relationsIt5->Get(1)); @@ -390,7 +388,7 @@ void PhraseGenerationAgent::updateSemanticAnswer(const ScAddr & phraseAddr) for (auto & phraseElement : phraseElements) { - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, MessageKeynodes::answer_structure, phraseElement); + m_context.GenerateConnector(ScType::ConstPermPosArc, MessageKeynodes::answer_structure, phraseElement); } } @@ -400,8 +398,8 @@ void PhraseGenerationAgent::addToRemoveNodes( ScAddrVector & vector) { ScTemplate templateNode; - templateNode.Triple(structNode, ScType::EdgeAccessVarPosPerm, ScType::Unknown >> "_node"); - templateNode.Triple(conceptNode, ScType::EdgeAccessVarPosPerm, "_node"); + templateNode.Triple(structNode, ScType::VarPermPosArc, ScType::Unknown >> "_node"); + templateNode.Triple(conceptNode, ScType::VarPermPosArc, "_node"); ScTemplateSearchResult templateResult; m_context.SearchByTemplate(templateNode, templateResult); @@ -419,25 +417,25 @@ ScAddrVector PhraseGenerationAgent::getIncidentElements(const ScAddr & node, con ScTemplate templateNode; templateNode.Quintuple( - node, ScType::EdgeDCommonVar >> "_remove_arc_1", ScType::Unknown, ScType::EdgeAccessVarPosPerm, structNode); + node, ScType::VarCommonArc >> "_remove_arc_1", ScType::Unknown, ScType::VarPermPosArc, structNode); buffElements = ScTemplateUtils::getAllWithKey(&m_context, templateNode, "_remove_arc_1"); incidentElements.insert(incidentElements.end(), buffElements.begin(), buffElements.end()); templateNode.Clear(); templateNode.Quintuple( - node, ScType::EdgeAccessVarPosPerm >> "_remove_arc_1", ScType::Unknown, ScType::EdgeAccessVarPosPerm, structNode); + node, ScType::VarPermPosArc >> "_remove_arc_1", ScType::Unknown, ScType::VarPermPosArc, structNode); buffElements = ScTemplateUtils::getAllWithKey(&m_context, templateNode, "_remove_arc_1"); incidentElements.insert(incidentElements.end(), buffElements.begin(), buffElements.end()); templateNode.Clear(); templateNode.Quintuple( - ScType::Unknown, ScType::EdgeDCommonVar >> "_remove_arc_1", node, ScType::EdgeAccessVarPosPerm, structNode); + ScType::Unknown, ScType::VarCommonArc >> "_remove_arc_1", node, ScType::VarPermPosArc, structNode); buffElements = ScTemplateUtils::getAllWithKey(&m_context, templateNode, "_remove_arc_1"); incidentElements.insert(incidentElements.end(), buffElements.begin(), buffElements.end()); templateNode.Clear(); templateNode.Quintuple( - ScType::Unknown, ScType::EdgeAccessVarPosPerm >> "_remove_arc_1", node, ScType::EdgeAccessVarPosPerm, structNode); + ScType::Unknown, ScType::VarPermPosArc >> "_remove_arc_1", node, ScType::VarPermPosArc, structNode); buffElements = ScTemplateUtils::getAllWithKey(&m_context, templateNode, "_remove_arc_1"); incidentElements.insert(incidentElements.end(), buffElements.begin(), buffElements.end()); diff --git a/problem-solver/cxx/dialogControlModule/agent/PhraseGenerationAgent.hpp b/problem-solver/cxx/dialog-control-module/agent/PhraseGenerationAgent.hpp similarity index 100% rename from problem-solver/cxx/dialogControlModule/agent/PhraseGenerationAgent.hpp rename to problem-solver/cxx/dialog-control-module/agent/PhraseGenerationAgent.hpp diff --git a/problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.cpp b/problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.cpp similarity index 74% rename from problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.cpp rename to problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.cpp index 57e88b265d..ae345d53dc 100644 --- a/problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.cpp +++ b/problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.cpp @@ -1,10 +1,8 @@ #include "StandardMessageReplyAgent.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "keynodes/InferenceKeynodes.hpp" #include "keynodes/MessageKeynodes.hpp" -#include "utils/ActionUtils.hpp" +#include +#include using namespace utils; @@ -16,20 +14,20 @@ ScResult StandardMessageReplyAgent::DoProgram(ScActionInitiatedEvent const & eve ScAddr messageNode = action.GetArgument(ScKeynodes::rrel_1); if (!messageNode.IsValid()) { - SC_AGENT_LOG_DEBUG("The action doesn't have a message node"); + m_logger.Debug("The action doesn't have a message node"); } ScAddr logicRuleNode = generateReplyMessage(messageNode); ScAddr replyMessageNode = IteratorUtils::getAnyByOutRelation(&m_context, messageNode, MessageKeynodes::nrel_reply); - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, MessageKeynodes::concept_message, replyMessageNode); + m_context.GenerateConnector(ScType::ConstPermPosArc, MessageKeynodes::concept_message, replyMessageNode); if (!replyMessageNode.IsValid()) { - SC_AGENT_LOG_ERROR("The reply message isn't generated"); + m_logger.Error("The reply message isn't generated"); return action.FinishUnsuccessfully(); } - SC_AGENT_LOG_DEBUG("The reply message is generated"); + m_logger.Debug("The reply message is generated"); initFields(); ScAddr langNode = langSearcher->getMessageLanguage(messageNode); @@ -38,7 +36,7 @@ ScResult StandardMessageReplyAgent::DoProgram(ScActionInitiatedEvent const & eve if (!messageHandler->processReplyMessage(replyMessageNode, logicRuleNode, langNode, parametersNode)) { - SC_AGENT_LOG_ERROR("The reply message is formed incorrectly"); + m_logger.Error("The reply message is formed incorrectly"); ScIterator5Ptr it5 = IteratorUtils::getIterator5(&m_context, replyMessageNode, MessageKeynodes::nrel_reply, false); if (it5->Next()) { @@ -50,7 +48,7 @@ ScResult StandardMessageReplyAgent::DoProgram(ScActionInitiatedEvent const & eve ScAddr responseNode = action.GetArgument(ScKeynodes::rrel_2); if (m_context.IsElement(responseNode)) - m_context.GenerateConnector(ScType::EdgeAccessConstPosTemp, responseNode, replyMessageNode); + m_context.GenerateConnector(ScType::ConstTempPosArc, responseNode, replyMessageNode); action.SetResult(replyMessageNode); return action.FinishSuccessfully(); @@ -70,7 +68,7 @@ ScAddr StandardMessageReplyAgent::generateReplyMessage(const ScAddr & messageNod wrapInSet(messageNode)}; ScAction actionDirectInference = - ActionUtils::CreateAction(&m_context, inference::InferenceKeynodes::action_direct_inference, argsVector); + ActionUtils::CreateAction(&m_context, MessageKeynodes::action_direct_inference, argsVector); bool const result = actionDirectInference.InitiateAndWait(DIRECT_INFERENCE_AGENT_WAIT_TIME); if (result) { @@ -85,8 +83,8 @@ ScAddr StandardMessageReplyAgent::generateReplyMessage(const ScAddr & messageNod ScAddr StandardMessageReplyAgent::wrapInSet(ScAddr const & addr) { - ScAddr set = m_context.GenerateNode(ScType::NodeConstTuple); - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, set, addr); + ScAddr set = m_context.GenerateNode(ScType::ConstNodeTuple); + m_context.GenerateConnector(ScType::ConstPermPosArc, set, addr); return set; } @@ -103,11 +101,11 @@ ScAddr StandardMessageReplyAgent::generatePhraseAgentParametersNode(const ScAddr if (themeNode.IsValid()) parameters.push_back(themeNode); - ScAddr parametersNode = m_context.GenerateNode(ScType::NodeConst); + ScAddr parametersNode = m_context.GenerateNode(ScType::ConstNode); for (auto & node : parameters) { - if (!m_context.CheckConnector(parametersNode, node, ScType::EdgeAccessConstPosPerm)) - m_context.GenerateConnector(ScType::EdgeAccessConstPosPerm, parametersNode, node); + if (!m_context.CheckConnector(parametersNode, node, ScType::ConstPermPosArc)) + m_context.GenerateConnector(ScType::ConstPermPosArc, parametersNode, node); } return parametersNode; @@ -116,7 +114,7 @@ ScAddr StandardMessageReplyAgent::generatePhraseAgentParametersNode(const ScAddr void StandardMessageReplyAgent::initFields() { this->langSearcher = std::make_unique(&m_context); - this->messageSearcher = std::make_unique(&m_context); + this->messageSearcher = std::make_unique(&m_context); this->messageHandler = std::make_unique(&m_context); } diff --git a/problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.hpp b/problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.hpp similarity index 91% rename from problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.hpp rename to problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.hpp index 1fed134ffe..4ac0f50252 100644 --- a/problem-solver/cxx/dialogControlModule/agent/StandardMessageReplyAgent.hpp +++ b/problem-solver/cxx/dialog-control-module/agent/StandardMessageReplyAgent.hpp @@ -18,7 +18,7 @@ class StandardMessageReplyAgent : public ScActionInitiatedAgent std::unique_ptr langSearcher; std::unique_ptr messageHandler; - std::unique_ptr messageSearcher; + std::unique_ptr messageSearcher; ScAddr generatePhraseAgentParametersNode(const ScAddr & messageNode); diff --git a/problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.cpp b/problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.cpp similarity index 59% rename from problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.cpp rename to problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.cpp index ded77625de..8b77cbc72d 100644 --- a/problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.cpp +++ b/problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.cpp @@ -1,8 +1,8 @@ #include "MessageConstructionsGenerator.hpp" -#include "handler/LinkHandler.hpp" -#include "keynodes/Keynodes.hpp" #include "keynodes/MessageKeynodes.hpp" +#include +#include namespace dialogControlModule { @@ -19,7 +19,7 @@ void MessageConstructionsGenerator::generateTextTranslationConstruction( commonModule::LinkHandler handler(context); ScAddr linkAddr = handler.createLink(messageText); - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, langAddr, linkAddr); + context->GenerateConnector(ScType::ConstPermPosArc, langAddr, linkAddr); generateTextTranslationConstruction(messageAddr, linkAddr); } @@ -27,12 +27,12 @@ void MessageConstructionsGenerator::generateTextTranslationConstruction( const ScAddr & messageAddr, const ScAddr & linkAddr) { - ScAddr translationAddr = context->GenerateNode(ScType::NodeConst); - ScAddr translationEdgeAddr = context->GenerateConnector(ScType::EdgeDCommonConst, translationAddr, messageAddr); + ScAddr translationAddr = context->GenerateNode(ScType::ConstNode); + ScAddr translationEdgeAddr = context->GenerateConnector(ScType::ConstCommonArc, translationAddr, messageAddr); context->GenerateConnector( - ScType::EdgeAccessConstPosPerm, commonModule::Keynodes::nrel_sc_text_translation, translationEdgeAddr); - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, translationAddr, linkAddr); - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, MessageKeynodes::concept_text_file, linkAddr); + ScType::ConstPermPosArc, commonModule::Keynodes::nrel_sc_text_translation, translationEdgeAddr); + context->GenerateConnector(ScType::ConstPermPosArc, translationAddr, linkAddr); + context->GenerateConnector(ScType::ConstPermPosArc, MessageKeynodes::concept_text_file, linkAddr); } } // namespace dialogControlModule diff --git a/problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.hpp b/problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.hpp similarity index 93% rename from problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.hpp rename to problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.hpp index 912d12fa74..35fe6a622b 100644 --- a/problem-solver/cxx/dialogControlModule/generator/MessageConstructionsGenerator.hpp +++ b/problem-solver/cxx/dialog-control-module/generator/MessageConstructionsGenerator.hpp @@ -1,4 +1,4 @@ -#include "sc-memory/sc_memory.hpp" +#include namespace dialogControlModule { diff --git a/problem-solver/cxx/dialogControlModule/handler/MessageHandler.cpp b/problem-solver/cxx/dialog-control-module/handler/MessageHandler.cpp similarity index 94% rename from problem-solver/cxx/dialogControlModule/handler/MessageHandler.cpp rename to problem-solver/cxx/dialog-control-module/handler/MessageHandler.cpp index 35d7e933e4..f4de394d84 100644 --- a/problem-solver/cxx/dialogControlModule/handler/MessageHandler.cpp +++ b/problem-solver/cxx/dialog-control-module/handler/MessageHandler.cpp @@ -9,7 +9,7 @@ MessageHandler::MessageHandler(ScAgentContext * context) : context(context) , languageSearcher(std::make_unique(context)) , messageConstructionsGenerator(std::make_unique(context)) - , messageSearcher(std::make_unique(context)) + , messageSearcher(std::make_unique(context)) , phraseSearcher(std::make_unique(context)) { } @@ -48,9 +48,8 @@ bool MessageHandler::processReplyMessage( } clearSemanticAnswer(); - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, parametersNode, langNode); - if (context->CheckConnector( - MessageKeynodes::concept_atomic_message, replyMessageNode, ScType::EdgeAccessConstPosPerm)) + context->GenerateConnector(ScType::ConstPermPosArc, parametersNode, langNode); + if (context->CheckConnector(MessageKeynodes::concept_atomic_message, replyMessageNode, ScType::ConstPermPosArc)) { SC_LOG_DEBUG(getClassNameForLog() + ": The message is atomic"); ScAddr phraseClassNode = phraseSearcher->getFirstPhraseClass(logicRuleNode); @@ -86,7 +85,7 @@ bool MessageHandler::processAtomicMessage( void MessageHandler::clearSemanticAnswer() { ScTemplate clearAnswer; - clearAnswer.Triple(MessageKeynodes::answer_structure, ScType::EdgeAccessVarPosPerm >> "_remove_arc", ScType::Unknown); + clearAnswer.Triple(MessageKeynodes::answer_structure, ScType::VarPermPosArc >> "_remove_arc", ScType::Unknown); ScTemplateSearchResult clearAnswerResult; context->SearchByTemplate(clearAnswer, clearAnswerResult); diff --git a/problem-solver/cxx/dialogControlModule/handler/MessageHandler.hpp b/problem-solver/cxx/dialog-control-module/handler/MessageHandler.hpp similarity index 92% rename from problem-solver/cxx/dialogControlModule/handler/MessageHandler.hpp rename to problem-solver/cxx/dialog-control-module/handler/MessageHandler.hpp index 1bb7b505ed..e8a1c19254 100644 --- a/problem-solver/cxx/dialogControlModule/handler/MessageHandler.hpp +++ b/problem-solver/cxx/dialog-control-module/handler/MessageHandler.hpp @@ -1,7 +1,7 @@ #include "generator/MessageConstructionsGenerator.hpp" #include "searcher/LanguageSearcher.hpp" -#include "searcher/MessageSearcher.hpp" #include "searcher/PhraseSearcher.hpp" +#include namespace dialogControlModule { @@ -34,7 +34,7 @@ class MessageHandler ScAgentContext * context; std::unique_ptr languageSearcher; std::unique_ptr messageConstructionsGenerator; - std::unique_ptr messageSearcher; + std::unique_ptr messageSearcher; std::unique_ptr phraseSearcher; void clearSemanticAnswer(); diff --git a/problem-solver/cxx/dialogControlModule/keynodes/DialogKeynodes.hpp b/problem-solver/cxx/dialog-control-module/keynodes/DialogKeynodes.hpp similarity index 77% rename from problem-solver/cxx/dialogControlModule/keynodes/DialogKeynodes.hpp rename to problem-solver/cxx/dialog-control-module/keynodes/DialogKeynodes.hpp index ec5c507810..688f4535ad 100644 --- a/problem-solver/cxx/dialogControlModule/keynodes/DialogKeynodes.hpp +++ b/problem-solver/cxx/dialog-control-module/keynodes/DialogKeynodes.hpp @@ -7,9 +7,9 @@ namespace dialogControlModule class DialogKeynodes : public ScKeynodes { public: - static inline ScKeynode const nrel_sc_text_translation{"nrel_sc_text_translation", ScType::NodeConstNoRole}; + static inline ScKeynode const nrel_sc_text_translation{"nrel_sc_text_translation", ScType::ConstNodeNonRole}; - static inline ScKeynode const nrel_phrase_template{"nrel_phrase_template", ScType::NodeConstNoRole}; + static inline ScKeynode const nrel_phrase_template{"nrel_phrase_template", ScType::ConstNodeNonRole}; }; } // namespace dialogControlModule diff --git a/problem-solver/cxx/dialogControlModule/keynodes/MessageKeynodes.hpp b/problem-solver/cxx/dialog-control-module/keynodes/MessageKeynodes.hpp similarity index 82% rename from problem-solver/cxx/dialogControlModule/keynodes/MessageKeynodes.hpp rename to problem-solver/cxx/dialog-control-module/keynodes/MessageKeynodes.hpp index 645fa07d9a..b2a863c0d1 100644 --- a/problem-solver/cxx/dialogControlModule/keynodes/MessageKeynodes.hpp +++ b/problem-solver/cxx/dialog-control-module/keynodes/MessageKeynodes.hpp @@ -11,6 +11,8 @@ class MessageKeynodes : public ScKeynodes static inline ScKeynode const action_standard_message_reply{"action_standard_message_reply"}; + static inline ScKeynode const action_direct_inference{"action_direct_inference", ScType::ConstNodeClass}; + static inline ScKeynode const concept_answer_on_standard_message_rule{"concept_answer_on_standard_message_rule"}; static inline ScKeynode const concept_answer_on_standard_message_rule_class_by_priority{ @@ -24,18 +26,10 @@ class MessageKeynodes : public ScKeynodes static inline ScKeynode const nrel_answer_pattern{"nrel_answer_pattern"}; - static inline ScKeynode const nrel_authors{"nrel_authors"}; - static inline ScKeynode const nrel_message_key_elements{"nrel_message_key_elements"}; - static inline ScKeynode const nrel_message_decomposition{"nrel_message_decomposition"}; - - static inline ScKeynode const nrel_message_sequence{"nrel_message_sequence"}; - static inline ScKeynode const nrel_reply{"nrel_reply"}; - static inline ScKeynode const rrel_message_theme{"rrel_message_theme"}; - static inline ScKeynode const concept_text_file{"concept_text_file"}; static inline ScKeynode const template_reply_target{"template_reply_target"}; diff --git a/problem-solver/cxx/dialogControlModule/searcher/LanguageSearcher.cpp b/problem-solver/cxx/dialog-control-module/searcher/LanguageSearcher.cpp similarity index 81% rename from problem-solver/cxx/dialogControlModule/searcher/LanguageSearcher.cpp rename to problem-solver/cxx/dialog-control-module/searcher/LanguageSearcher.cpp index d170e4e6ca..0be6224c04 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/LanguageSearcher.cpp +++ b/problem-solver/cxx/dialog-control-module/searcher/LanguageSearcher.cpp @@ -1,7 +1,7 @@ #include "LanguageSearcher.hpp" -#include "keynodes/Keynodes.hpp" #include "searcher/TokenDomainSearcher.hpp" +#include using namespace commonModule; using namespace dialogControlModule; @@ -37,8 +37,8 @@ ScAddr LanguageSearcher::getLanguage(const ScAddr & node) ScAddr langNode; ScTemplate templateLang; ScTemplateSearchResult result; - templateLang.Triple(ScType::NodeVarClass >> lang, ScType::EdgeAccessVarPosPerm, node); - templateLang.Triple(Keynodes::languages, ScType::EdgeAccessVarPosPerm, lang); + templateLang.Triple(ScType::VarNodeClass >> lang, ScType::VarPermPosArc, node); + templateLang.Triple(Keynodes::languages, ScType::VarPermPosArc, lang); if (context->SearchByTemplate(templateLang, result)) langNode = result[0][lang]; diff --git a/problem-solver/cxx/dialogControlModule/searcher/LanguageSearcher.hpp b/problem-solver/cxx/dialog-control-module/searcher/LanguageSearcher.hpp similarity index 100% rename from problem-solver/cxx/dialogControlModule/searcher/LanguageSearcher.hpp rename to problem-solver/cxx/dialog-control-module/searcher/LanguageSearcher.hpp diff --git a/problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.cpp b/problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.cpp similarity index 76% rename from problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.cpp rename to problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.cpp index a2c2539cd7..fa20743eca 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.cpp +++ b/problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.cpp @@ -1,11 +1,10 @@ #include "PhraseSearcher.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - #include "keynodes/MessageKeynodes.hpp" #include #include #include +#include using namespace dialogControlModule; @@ -18,8 +17,8 @@ ScAddrVector PhraseSearcher::getPhrases(const ScAddr & phraseClassNode, const Sc { ScTemplate phraseTemplate; const std::string VAR_PHRASE = "_phrase"; - phraseTemplate.Triple(phraseClassNode, ScType::EdgeAccessVarPosPerm, ScType::Link >> VAR_PHRASE); - phraseTemplate.Triple(langNode, ScType::EdgeAccessVarPosPerm, VAR_PHRASE); + phraseTemplate.Triple(phraseClassNode, ScType::VarPermPosArc, ScType::VarNodeLink >> VAR_PHRASE); + phraseTemplate.Triple(langNode, ScType::VarPermPosArc, VAR_PHRASE); ScTemplateSearchResult result; context->SearchByTemplate(phraseTemplate, result); @@ -57,10 +56,10 @@ ScAddr PhraseSearcher::getNextPhraseClass(const ScAddr & phraseClassNode) VAR_D_COMMON_EDGE = "_d_common_edge", VAR_PHRASE_CLASS = "_phrase_class"; ScTemplate templ; - templ.Triple(ScType::NodeVarTuple >> VAR_TUPLE, ScType::EdgeAccessVarPosPerm >> VAR_EDGE_1, phraseClassNode); - templ.Triple(VAR_EDGE_1, ScType::EdgeDCommonVar >> VAR_D_COMMON_EDGE, ScType::EdgeAccessVarPosPerm >> VAR_EDGE_2); - templ.Triple(ScKeynodes::nrel_basic_sequence, ScType::EdgeAccessVarPosPerm, VAR_D_COMMON_EDGE); - templ.Triple(VAR_TUPLE, VAR_EDGE_2, ScType::NodeVar >> VAR_PHRASE_CLASS); + templ.Triple(ScType::VarNodeTuple >> VAR_TUPLE, ScType::VarPermPosArc >> VAR_EDGE_1, phraseClassNode); + templ.Triple(VAR_EDGE_1, ScType::VarCommonArc >> VAR_D_COMMON_EDGE, ScType::VarPermPosArc >> VAR_EDGE_2); + templ.Triple(ScKeynodes::nrel_basic_sequence, ScType::VarPermPosArc, VAR_D_COMMON_EDGE); + templ.Triple(VAR_TUPLE, VAR_EDGE_2, ScType::VarNode >> VAR_PHRASE_CLASS); ScTemplateSearchResult result; context->SearchByTemplate(templ, result); diff --git a/problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.hpp b/problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.hpp similarity index 92% rename from problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.hpp rename to problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.hpp index 4a30f9955e..fa1586f82d 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/PhraseSearcher.hpp +++ b/problem-solver/cxx/dialog-control-module/searcher/PhraseSearcher.hpp @@ -1,4 +1,4 @@ -#include "sc-memory/sc_memory.hpp" +#include #include diff --git a/problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.cpp b/problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.cpp similarity index 89% rename from problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.cpp rename to problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.cpp index a0c08b34da..60fc6a34ed 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.cpp +++ b/problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.cpp @@ -1,8 +1,7 @@ #include "TokenDomainSearcher.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - #include "keynodes/DialogKeynodes.hpp" +#include #include using namespace dialogControlModule; @@ -23,7 +22,7 @@ ScAddr TokenDomainSearcher::getMessageText(const ScAddr & message) throw std::runtime_error("Invalid params: the text of the message is not specified."); } - ScIterator3Ptr iterator3 = context->CreateIterator3(translationNode, ScType::EdgeAccessConstPosPerm, ScType::Link); + ScIterator3Ptr iterator3 = context->CreateIterator3(translationNode, ScType::ConstPermPosArc, ScType::ConstNodeLink); if (!iterator3->Next()) { throw std::runtime_error("Invalid params: the text of the message is not specified."); diff --git a/problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.hpp b/problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.hpp similarity index 81% rename from problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.hpp rename to problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.hpp index 5619d755e2..97df5f5e9d 100644 --- a/problem-solver/cxx/dialogControlModule/searcher/TokenDomainSearcher.hpp +++ b/problem-solver/cxx/dialog-control-module/searcher/TokenDomainSearcher.hpp @@ -1,8 +1,8 @@ #pragma once -#include "sc-memory/sc_addr.hpp" +#include -#include "handler/LinkHandler.hpp" +#include namespace dialogControlModule { diff --git a/problem-solver/cxx/dialog-control-module/test/CMakeLists.txt b/problem-solver/cxx/dialog-control-module/test/CMakeLists.txt new file mode 100644 index 0000000000..c0df98709e --- /dev/null +++ b/problem-solver/cxx/dialog-control-module/test/CMakeLists.txt @@ -0,0 +1,9 @@ +make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units + NAME dialog-control-module-tests + DEPENDS dialog-control-module + INCLUDES ${DIALOG_CONTROL_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(dialog-control-module-tests) +endif() diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionDoesntHaveLinkTemplateTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionDoesntHaveLinkTemplateTest.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionDoesntHaveLinkTemplateTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionDoesntHaveLinkTemplateTest.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionDoesntHaveParametersTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionDoesntHaveParametersTest.scs similarity index 95% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionDoesntHaveParametersTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionDoesntHaveParametersTest.scs index 280705e4ba..e5a18bc82e 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionDoesntHaveParametersTest.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionDoesntHaveParametersTest.scs @@ -17,7 +17,7 @@ test_action_node _=>nrel_main_idtf:: @var_name (* - _<- lang_en;; + <-_ lang_en;; *);; _mes @@ -51,7 +51,7 @@ message_of_guilderoy_lockhart (* <-lang_en;; *);; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionNodeDoesntHaveLinkTemplateTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionNodeDoesntHaveLinkTemplateTest.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/actionNodeDoesntHaveLinkTemplateTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/actionNodeDoesntHaveLinkTemplateTest.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/agentDoesntGenerateAPhraseTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/agentDoesntGenerateAPhraseTest.scs similarity index 95% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/agentDoesntGenerateAPhraseTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/agentDoesntGenerateAPhraseTest.scs index ee010fc74a..b63ea71c21 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/agentDoesntGenerateAPhraseTest.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/agentDoesntGenerateAPhraseTest.scs @@ -20,14 +20,14 @@ test_action_node _hum1 _=> nrel_main_idtf:: @var_name1 - (* _<- _lang;; *); + (* <-_ _lang;; *); _=> nrel_mother:: _hum2;; _hum2 _=> nrel_main_idtf:: @var_name2 - (* _<- _lang;; *);; + (* <-_ _lang;; *);; concept_human _-> _hum1;; @@ -77,7 +77,7 @@ human_ruslan_korshunov [Ruslan Korshunov] (* <-lang_en;; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest.scs similarity index 96% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest.scs index c8b5e96634..466a0b839b 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest.scs @@ -17,7 +17,7 @@ test_action_node _=>nrel_main_idtf:: @var_name (* - _<- _lang;; + <-_ _lang;; *);; _mes @@ -58,7 +58,7 @@ message_of_guilderoy_lockhart (* <-lang_en;; *);; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest2.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest2.scs similarity index 95% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest2.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest2.scs index bbd95cec63..c0b3b34deb 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest2.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest2.scs @@ -20,14 +20,14 @@ test_action_node _hum1 _=> nrel_main_idtf:: @var_name1 - (* _<- _lang;; *); + (* <-_ _lang;; *); _=> nrel_mother:: _hum2;; _hum2 _=> nrel_main_idtf:: @var_name2 - (* _<- _lang;; *);; + (* <-_ _lang;; *);; concept_human _-> _hum1;; @@ -78,7 +78,7 @@ human_ruslan_korshunov [Ruslan Korshunov] (* <-lang_en;; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest3.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest3.scs similarity index 95% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest3.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest3.scs index 2799de6f86..74e8b1fb5a 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/correctTest3.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/correctTest3.scs @@ -21,7 +21,7 @@ test_action_node _hum1 _=> nrel_main_idtf:: @var_name1 - (* _<- _lang;; *); + (* <-_ _lang;; *); _=> nrel_father:: _hum2;; @@ -29,7 +29,7 @@ test_action_node _hum3 _=> nrel_main_idtf:: @var_name3 - (* _<- _lang;; *); + (* <-_ _lang;; *); _=> nrel_father:: _hum2;; @@ -84,7 +84,7 @@ human_andrey_ivanov [Andrey Ivanov] (* <-lang_en;; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveALanguageNodeTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveALanguageNodeTest.scs similarity index 96% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveALanguageNodeTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveALanguageNodeTest.scs index 0cb37342a4..20ce4b6849 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveALanguageNodeTest.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveALanguageNodeTest.scs @@ -16,7 +16,7 @@ test_action_node _=>nrel_main_idtf:: @var_name (* - _<- lang_en;; + <-_ lang_en;; *);; _mes @@ -56,7 +56,7 @@ message_of_guilderoy_lockhart (* <-lang_en;; *);; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveLanguageNode.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveLanguageNode.scs similarity index 96% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveLanguageNode.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveLanguageNode.scs index 0cb37342a4..20ce4b6849 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/generatedLinkDoesntHaveLanguageNode.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/generatedLinkDoesntHaveLanguageNode.scs @@ -16,7 +16,7 @@ test_action_node _=>nrel_main_idtf:: @var_name (* - _<- lang_en;; + <-_ lang_en;; *);; _mes @@ -56,7 +56,7 @@ message_of_guilderoy_lockhart (* <-lang_en;; *);; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/linkTemplateDoesntHaveTemplateTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/linkTemplateDoesntHaveTemplateTest.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/linkTemplateDoesntHaveTemplateTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/linkTemplateDoesntHaveTemplateTest.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/parametersNodeAreEmptyTest.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/parametersNodeAreEmptyTest.scs similarity index 95% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/parametersNodeAreEmptyTest.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/parametersNodeAreEmptyTest.scs index f6d487b744..c6eac7c8ff 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/parametersNodeAreEmptyTest.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/parametersNodeAreEmptyTest.scs @@ -17,7 +17,7 @@ test_action_node _=>nrel_main_idtf:: @var_name (* - _<- lang_en;; + <-_ lang_en;; *);; _mes @@ -55,4 +55,4 @@ message_of_guilderoy_lockhart lang_en <-languages; -<-sc_node_not_relation;; +<-sc_node_class;; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/textTemplateDoesntHaveVariables.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/textTemplateDoesntHaveVariables.scs similarity index 97% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/textTemplateDoesntHaveVariables.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/textTemplateDoesntHaveVariables.scs index e518d9b3b4..3bdf9b7f88 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/phraseGeneration/textTemplateDoesntHaveVariables.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/phrase-generation/textTemplateDoesntHaveVariables.scs @@ -37,7 +37,7 @@ message_of_guilderoy_lockhart (* <-lang_en;; *);; *);; -sc_node_not_relation +sc_node_class ->lang_en; ->languages; ->concept_message; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/actions/correctAction.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/actions/correctAction.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/actions/correctAction.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/actions/correctAction.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/actions/incorrectAction.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/actions/incorrectAction.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/actions/incorrectAction.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/actions/incorrectAction.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/concept_answer_on_standard_message_rule_class_by_priority.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/concept_answer_on_standard_message_rule_class_by_priority.scs similarity index 96% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/concept_answer_on_standard_message_rule_class_by_priority.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/concept_answer_on_standard_message_rule_class_by_priority.scs index d66665ba50..3865dc570d 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/concept_answer_on_standard_message_rule_class_by_priority.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/concept_answer_on_standard_message_rule_class_by_priority.scs @@ -2,7 +2,7 @@ concept_answer_on_standard_message_rule_class_by_priority => nrel_main_idtf: [множество правил ответов на стандартные сообщения] (* <- lang_ru;; *); [set of rules for responding to standard messages] (* <- lang_en;; *); - <-sc_node_not_relation;; + <-sc_node_class;; @access_arc_1 = (concept_answer_on_standard_message_rule_class_by_priority -> rrel_1: concept_answer_on_standard_message_rule_priority_1);; @access_arc_2 = (concept_answer_on_standard_message_rule_class_by_priority -> concept_answer_on_standard_message_rule_priority_2);; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr1.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr1.scs similarity index 70% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr1.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr1.scs index 96d4f1d6a7..33b7a46dae 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr1.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr1.scs @@ -1,14 +1,14 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _atomic_message_1 _<- concept_atomic_message;; - _atomic_message_1 _<- concept_politeness_message;; + _atomic_message_1 <-_ concept_atomic_message;; + _atomic_message_1 <-_ concept_politeness_message;; - _atomic_message_2 _<- concept_atomic_message;; - _atomic_message_2 _<- concept_information_request_message;; + _atomic_message_2 <-_ concept_atomic_message;; + _atomic_message_2 <-_ concept_information_request_message;; @pair1 = (_tuple_node _-> _atomic_message_1);; rrel_1 _-> @pair1;; @@ -16,12 +16,12 @@ @pair4 = (@pair1 _=> @pair2);; nrel_message_sequence _-> @pair4;; - _reply_message _<- concept_non_atomic_message;; + _reply_message <-_ concept_non_atomic_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; - @pair6 = (_reply_message _<= _tuple_node);; + @pair6 = (_reply_message <=_ _tuple_node);; nrel_message_decomposition _-> @pair6;; *];; @@ -46,11 +46,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr2.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr2.scs similarity index 69% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr2.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr2.scs index f41cb111f6..ca882ce4c2 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr2.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr2.scs @@ -1,26 +1,26 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _atomic_message_1 _<- concept_atomic_message;; - _atomic_message_1 _<- concept_politeness_message;; + _atomic_message_1 <-_ concept_atomic_message;; + _atomic_message_1 <-_ concept_politeness_message;; - _atomic_message_2 _<- concept_atomic_message;; - _atomic_message_2 _<- concept_information_request_message;; + _atomic_message_2 <-_ concept_atomic_message;; + _atomic_message_2 <-_ concept_information_request_message;; @pair1 = (_tuple_node _-> _atomic_message_1);; @pair2 = (_tuple_node _-> _atomic_message_2);; @pair4 = (@pair1 _=> @pair2);; nrel_message_sequence _-> @pair4;; - _reply_message _<- concept_non_atomic_message;; + _reply_message <-_ concept_non_atomic_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; - @pair6 = (_reply_message _<= _tuple_node);; + @pair6 = (_reply_message <=_ _tuple_node);; nrel_message_decomposition _-> @pair6;; *];; @@ -45,11 +45,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr3.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr3.scs similarity index 69% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr3.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr3.scs index 1944e9b593..98271a3b81 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr3.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr3.scs @@ -1,14 +1,14 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _atomic_message_1 _<- concept_atomic_message;; - _atomic_message_1 _<- concept_politeness_message;; + _atomic_message_1 <-_ concept_atomic_message;; + _atomic_message_1 <-_ concept_politeness_message;; - _atomic_message_2 _<- concept_atomic_message;; - _atomic_message_2 _<- concept_information_request_message;; + _atomic_message_2 <-_ concept_atomic_message;; + _atomic_message_2 <-_ concept_information_request_message;; @pair1 = (_tuple_node _-> _atomic_message_1);; rrel_1 _-> @pair1;; @@ -16,12 +16,12 @@ @pair4 = (@pair1 _=> @pair2);; nrel_message_sequence _-> @pair4;; - _reply_message _<- concept_non_atomic_message;; + _reply_message <-_ concept_non_atomic_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; - @pair6 = (_reply_message _<= _tuple_node);; + @pair6 = (_reply_message <=_ _tuple_node);; nrel_message_decomposition _-> @pair6;; *];; @@ -45,11 +45,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr4.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr4.scs similarity index 74% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr4.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr4.scs index a2b10f44cd..bccdc4f9d3 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr4.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr4.scs @@ -1,13 +1,13 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _reply_message _<- concept_atomic_message;; - _reply_message _<- concept_politeness_message;; + _reply_message <-_ concept_atomic_message;; + _reply_message <-_ concept_politeness_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; *];; @@ -29,11 +29,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr5.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr5.scs similarity index 67% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr5.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr5.scs index e149df8aef..0d308ebb0a 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr5.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr5.scs @@ -1,14 +1,14 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _atomic_message_1 _<- concept_atomic_message;; - _atomic_message_1 _<- concept_politeness_message;; + _atomic_message_1 <-_ concept_atomic_message;; + _atomic_message_1 <-_ concept_politeness_message;; - _atomic_message_2 _<- concept_atomic_message;; - _atomic_message_2 _<- concept_information_request_message;; + _atomic_message_2 <-_ concept_atomic_message;; + _atomic_message_2 <-_ concept_information_request_message;; @pair1 = (_tuple_node _-> _atomic_message_1);; rrel_1 _-> @pair1;; @@ -16,12 +16,12 @@ @pair4 = (@pair1 _=> @pair2);; nrel_message_sequence _-> @pair4;; - _reply_message _<- concept_non_atomic_message;; + _reply_message <-_ concept_non_atomic_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; - @pair6 = (_reply_message _<= _tuple_node);; + @pair6 = (_reply_message <=_ _tuple_node);; nrel_message_decomposition _-> @pair6;; *];; @@ -43,11 +43,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr6.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr6.scs similarity index 72% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr6.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr6.scs index 765e03bcdb..477346010d 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/lr6.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/lr6.scs @@ -1,20 +1,20 @@ @contour0 = [* - _test_message _<- concept_informing_message_about_object;; - _test_message _<- concept_message_with_negative_tone;; + _test_message <-_ concept_informing_message_about_object;; + _test_message <-_ concept_message_with_negative_tone;; *];; @contour1 = [* - _atomic_message_1 _<- concept_atomic_message;; - _atomic_message_1 _<- concept_politeness_message;; + _atomic_message_1 <-_ concept_atomic_message;; + _atomic_message_1 <-_ concept_politeness_message;; @pair1 = (_tuple_node _-> _atomic_message_1);; - _reply_message _<- concept_non_atomic_message;; + _reply_message <-_ concept_non_atomic_message;; - @pair5 = (_reply_message _<= _test_message);; + @pair5 = (_reply_message <=_ _test_message);; nrel_reply _-> @pair5;; - @pair6 = (_reply_message _<= _tuple_node);; + @pair6 = (_reply_message <=_ _tuple_node);; nrel_message_decomposition _-> @pair6;; *];; @@ -39,11 +39,11 @@ sc_node_tuple sc_node_role_relation -> rrel_main_key_sc_element;; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_answer_pattern; -> nrel_message_decomposition;; -sc_node_not_relation +sc_node_class -> concept_informing_message_about_object; -> concept_message_with_negative_tone; -> concept_answer_on_standard_message_rule; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/reply_target.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/reply_target.scs similarity index 75% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/reply_target.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/reply_target.scs index c8da968900..42875f2ce1 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/logicRules/reply_target.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/logic-rules/reply_target.scs @@ -5,6 +5,6 @@ @template_reply_target => nrel_system_identifier: [template_reply_target];; _reply_message <- sc_node;; _message <- sc_node;; -nrel_reply <- sc_node_norole_relation;; +nrel_reply <- sc_node_non_role_relation;; action_template_reply => nrel_template_reply_target: @template_reply_target;; -nrel_template_reply_target <- sc_node_norole_relation;; +nrel_template_reply_target <- sc_node_non_role_relation;; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message1.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message1.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message1.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message1.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message2.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message2.scs similarity index 100% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message2.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message2.scs diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message3.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message3.scs similarity index 84% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message3.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message3.scs index d057a6ee74..03bbbedb20 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message3.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message3.scs @@ -12,8 +12,8 @@ test_message *);; lang_en -<- sc_node_not_relation;; +<- sc_node_class;; languages -<- sc_node_not_relation; +<- sc_node_class; -> lang_en;; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message4.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message4.scs similarity index 93% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message4.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message4.scs index a935597101..44dcf5ee93 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/messages/message4.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/messages/message4.scs @@ -31,7 +31,7 @@ human_ivan_ivanov <- lang_en;; *);; -sc_node_norole_relation +sc_node_non_role_relation -> nrel_authors; -> nrel_surname; -> nrel_name; @@ -40,7 +40,7 @@ sc_node_norole_relation sc_node_role_relation -> rrel_message_theme;; -sc_node_not_relation +sc_node_class -> concept_human; -> lang_en; -> languages;; diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase1.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase1.scs similarity index 94% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase1.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase1.scs index c9e2fda8ab..c942b54be6 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase1.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase1.scs @@ -18,14 +18,14 @@ concept_phrase_of_compassion -> _=>nrel_surname:: @var_surname (* - _<- _lang;; + <-_ _lang;; *);; _hum _=>nrel_honorific:: @var_honorific (* - _<- _lang;; + <-_ _lang;; *);; _mes diff --git a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase2.scs b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase2.scs similarity index 96% rename from problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase2.scs rename to problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase2.scs index 574a456c4e..5e00bfd5dd 100644 --- a/problem-solver/cxx/dialogControlModule/test/testsStructures/standardMessageReply/phrases/phrase2.scs +++ b/problem-solver/cxx/dialog-control-module/test/tests-structures/standard-message-reply/phrases/phrase2.scs @@ -14,7 +14,7 @@ concept_information_request_for_reasons_phrase -> _=>nrel_name:: @var_name (* - _<- _lang;; + <-_ _lang;; *);; _mes diff --git a/problem-solver/cxx/dialogControlModule/test/units/testPhraseGenerationAgent.cpp b/problem-solver/cxx/dialog-control-module/test/units/testPhraseGenerationAgent.cpp similarity index 93% rename from problem-solver/cxx/dialogControlModule/test/units/testPhraseGenerationAgent.cpp rename to problem-solver/cxx/dialog-control-module/test/units/testPhraseGenerationAgent.cpp index c3990a84dc..971f24fd09 100644 --- a/problem-solver/cxx/dialogControlModule/test/units/testPhraseGenerationAgent.cpp +++ b/problem-solver/cxx/dialog-control-module/test/units/testPhraseGenerationAgent.cpp @@ -1,11 +1,10 @@ #include - -#include "sc-builder/src/scs_loader.hpp" -#include "sc_test.hpp" +#include #include "agent/PhraseGenerationAgent.hpp" -#include "handler/LinkHandler.cpp" #include "searcher/LanguageSearcher.hpp" +#include +#include using namespace dialogControlModule; using namespace commonModule; @@ -13,7 +12,7 @@ using namespace commonModule; namespace testPhraseGenerationAgent { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = DIALOG_CONTROL_MODULE_TEST_SRC_PATH "/testsStructures/phraseGeneration/"; +std::string const TEST_FILES_DIR_PATH = "../tests-structures/phrase-generation/"; int const WAIT_TIME = 5000; using PhraseGenerationTest = ScMemoryTest; @@ -24,11 +23,7 @@ void checkLinkContent(ScAgentContext & context, ScAddr action, std::string const ScTemplateSearchResult result; std::string const LINK_ALIAS = "_link"; scTemplate.Quintuple( - action, - ScType::EdgeDCommonVar, - ScType::LinkVar >> LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, - ScKeynodes::nrel_result); + action, ScType::VarCommonArc, ScType::VarNodeLink >> LINK_ALIAS, ScType::VarPermPosArc, ScKeynodes::nrel_result); EXPECT_TRUE(context.SearchByTemplate(scTemplate, result)); ScAddr link = result[0][LINK_ALIAS]; @@ -165,9 +160,9 @@ TEST_F(PhraseGenerationTest, GeneratedLinkDoesNotHaveALanguageNode) std::string const LINK_ALIAS = "_link"; scTemplate.Quintuple( test_action_node, - ScType::EdgeDCommonVar, - ScType::LinkVar >> LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNodeLink >> LINK_ALIAS, + ScType::VarPermPosArc, ScKeynodes::nrel_result); EXPECT_TRUE(context.SearchByTemplate(scTemplate, result)); diff --git a/problem-solver/cxx/dialogControlModule/test/units/testStandardMessageReplyAgent.cpp b/problem-solver/cxx/dialog-control-module/test/units/testStandardMessageReplyAgent.cpp similarity index 92% rename from problem-solver/cxx/dialogControlModule/test/units/testStandardMessageReplyAgent.cpp rename to problem-solver/cxx/dialog-control-module/test/units/testStandardMessageReplyAgent.cpp index b13f6bc7b0..28c7584fcc 100644 --- a/problem-solver/cxx/dialogControlModule/test/units/testStandardMessageReplyAgent.cpp +++ b/problem-solver/cxx/dialog-control-module/test/units/testStandardMessageReplyAgent.cpp @@ -1,24 +1,22 @@ #include +#include -#include "sc-agents-common/utils/IteratorUtils.hpp" -#include "sc-builder/src/scs_loader.hpp" -#include "sc_test.hpp" - -#include "agent/DirectInferenceAgent.hpp" #include "agent/PhraseGenerationAgent.hpp" #include "agent/StandardMessageReplyAgent.hpp" #include "keynodes/MessageKeynodes.hpp" #include "searcher/TokenDomainSearcher.hpp" +#include +#include +#include -using namespace inference; using namespace dialogControlModule; namespace testStandardMessageReplyAgent { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = DIALOG_CONTROL_MODULE_TEST_SRC_PATH "/testsStructures/standardMessageReply/"; +std::string const TEST_FILES_DIR_PATH = "../tests-structures/standard-message-reply/"; std::string const ACTION_DIR_PATH = "actions/"; -std::string const LR_DIR_PATH = "logicRules/"; +std::string const LR_DIR_PATH = "logic-rules/"; std::string const MES_DIR_PATH = "messages/"; std::string const PHRASE_DIR_PATH = "phrases/"; int const WAIT_TIME = 20000; @@ -27,14 +25,14 @@ using StandardMessageReplyTest = ScMemoryTest; void initialize(ScAgentContext & context) { - context.SubscribeAgent(); + context.SubscribeAgent(); context.SubscribeAgent(); context.SubscribeAgent(); } void shutdown(ScAgentContext & context) { - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); context.UnsubscribeAgent(); context.UnsubscribeAgent(); } @@ -138,12 +136,12 @@ TEST_F(StandardMessageReplyTest, SystemDoesNotHaveTemplateForMessage) ScAction testAction = context.ConvertToAction(testActionNode); context.SubscribeAgent(); - context.SubscribeAgent(); + context.SubscribeAgent(); EXPECT_TRUE(testAction.InitiateAndWait(WAIT_TIME)); EXPECT_TRUE(testAction.IsFinishedWithError()); - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); context.UnsubscribeAgent(); } @@ -161,10 +159,10 @@ TEST_F(StandardMessageReplyTest, MessagesLanguageIsNotFound) ScAction testAction = context.ConvertToAction(testActionNode); context.SubscribeAgent(); - context.SubscribeAgent(); + context.SubscribeAgent(); EXPECT_TRUE(testAction.InitiateAndWait(WAIT_TIME)); EXPECT_TRUE(testAction.IsFinishedUnsuccessfully()); - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); context.UnsubscribeAgent(); } @@ -182,11 +180,11 @@ TEST_F(StandardMessageReplyTest, FirstMessageIsNotFound) ScAction testAction = context.ConvertToAction(testActionNode); context.SubscribeAgent(); - context.SubscribeAgent(); + context.SubscribeAgent(); EXPECT_TRUE(testAction.InitiateAndWait(WAIT_TIME)); EXPECT_TRUE(testAction.IsFinishedUnsuccessfully()); context.UnsubscribeAgent(); - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); } TEST_F(StandardMessageReplyTest, FirstPhraseClassIsNotFound) @@ -203,13 +201,13 @@ TEST_F(StandardMessageReplyTest, FirstPhraseClassIsNotFound) ScAction testAction = context.ConvertToAction(testActionNode); context.SubscribeAgent(); - context.SubscribeAgent(); + context.SubscribeAgent(); EXPECT_TRUE(testAction.InitiateAndWait(WAIT_TIME)); EXPECT_TRUE(testAction.IsFinishedUnsuccessfully()); context.UnsubscribeAgent(); - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); } TEST_F(StandardMessageReplyTest, PhraseForMessageIsNotFound) @@ -226,11 +224,11 @@ TEST_F(StandardMessageReplyTest, PhraseForMessageIsNotFound) ScAction testAction = context.ConvertToAction(testActionNode); context.SubscribeAgent(); - context.SubscribeAgent(); + context.SubscribeAgent(); EXPECT_TRUE(testAction.InitiateAndWait(WAIT_TIME)); EXPECT_TRUE(testAction.IsFinishedUnsuccessfully()); context.UnsubscribeAgent(); - context.UnsubscribeAgent(); + context.UnsubscribeAgent(); } TEST_F(StandardMessageReplyTest, LinkByPhraseIsNotGenerated) diff --git a/problem-solver/cxx/dialogControlModule/test/tests.cmake b/problem-solver/cxx/dialogControlModule/test/tests.cmake deleted file mode 100644 index 26ed019f21..0000000000 --- a/problem-solver/cxx/dialogControlModule/test/tests.cmake +++ /dev/null @@ -1,11 +0,0 @@ -make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units - NAME dialog_control_module_test_starter - DEPENDS sc-agents-common dialogControlModule sc-builder-lib - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_MACHINE_ROOT}/sc-tools -) - -add_definitions(-DDIALOG_CONTROL_MODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}") - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(dialog_control_module_test_starter) -endif() diff --git a/problem-solver/cxx/interface-module/CMakeLists.txt b/problem-solver/cxx/interface-module/CMakeLists.txt new file mode 100755 index 0000000000..85892c9141 --- /dev/null +++ b/problem-solver/cxx/interface-module/CMakeLists.txt @@ -0,0 +1,23 @@ +set(SOURCES + "InterfaceModule.cpp" + "agent/ChangeInterfaceColorAgent.cpp" +) + +set(HEADERS + "InterfaceModule.hpp" + "keynodes/InterfaceKeynodes.hpp" + "agent/ChangeInterfaceColorAgent.hpp" +) + +add_library(interface-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(interface-module + LINK_PUBLIC common +) +target_include_directories(interface-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(interface-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(interface-module) +endif() diff --git a/problem-solver/cxx/interfaceModule/InterfaceModule.cpp b/problem-solver/cxx/interface-module/InterfaceModule.cpp similarity index 100% rename from problem-solver/cxx/interfaceModule/InterfaceModule.cpp rename to problem-solver/cxx/interface-module/InterfaceModule.cpp diff --git a/problem-solver/cxx/interfaceModule/InterfaceModule.hpp b/problem-solver/cxx/interface-module/InterfaceModule.hpp similarity index 77% rename from problem-solver/cxx/interfaceModule/InterfaceModule.hpp rename to problem-solver/cxx/interface-module/InterfaceModule.hpp index dce9f48add..785fb44f4e 100644 --- a/problem-solver/cxx/interfaceModule/InterfaceModule.hpp +++ b/problem-solver/cxx/interface-module/InterfaceModule.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_module.hpp" +#include namespace interfaceModule { diff --git a/problem-solver/cxx/interfaceModule/agent/ChangeInterfaceColorAgent.cpp b/problem-solver/cxx/interface-module/agent/ChangeInterfaceColorAgent.cpp similarity index 87% rename from problem-solver/cxx/interfaceModule/agent/ChangeInterfaceColorAgent.cpp rename to problem-solver/cxx/interface-module/agent/ChangeInterfaceColorAgent.cpp index 6342fab8a4..9212f7c5de 100644 --- a/problem-solver/cxx/interfaceModule/agent/ChangeInterfaceColorAgent.cpp +++ b/problem-solver/cxx/interface-module/agent/ChangeInterfaceColorAgent.cpp @@ -1,8 +1,7 @@ #include "ChangeInterfaceColorAgent.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - #include "keynodes/InterfaceKeynodes.hpp" +#include using namespace interfaceModule; @@ -11,7 +10,7 @@ ScResult ChangeInterfaceColorAgent::DoProgram(ScActionInitiatedEvent const & eve ScAddr const & messageAddr = action.GetArgument(ScKeynodes::rrel_1); if (!messageAddr.IsValid()) { - SC_AGENT_LOG_ERROR("Message Addr not found."); + m_logger.Error("Message Addr not found."); return action.FinishUnsuccessfully(); } @@ -19,7 +18,7 @@ ScResult ChangeInterfaceColorAgent::DoProgram(ScActionInitiatedEvent const & eve utils::IteratorUtils::getAnyByOutRelation(&m_context, messageAddr, InterfaceKeynodes::rrel_entity); if (!componentAddr.IsValid()) { - SC_AGENT_LOG_INFO("Component Addr not found."); + m_logger.Info("Component Addr not found."); return action.FinishUnsuccessfully(); } @@ -29,12 +28,12 @@ ScResult ChangeInterfaceColorAgent::DoProgram(ScActionInitiatedEvent const & eve if (!componentColorAddr.IsValid()) { componentColor = createColor(); - SC_AGENT_LOG_DEBUG("Component color is changed to random " << componentColor); + m_logger.Debug("Component color is changed to random ", componentColor); } else { m_context.GetLinkContent(componentColorAddr, componentColor); - SC_AGENT_LOG_DEBUG("Component color is changed to " << componentColor); + m_logger.Debug("Component color is changed to ", componentColor); } bool isSuccess = setComponentColor(componentAddr, componentColor); diff --git a/problem-solver/cxx/interfaceModule/agent/ChangeInterfaceColorAgent.hpp b/problem-solver/cxx/interface-module/agent/ChangeInterfaceColorAgent.hpp similarity index 100% rename from problem-solver/cxx/interfaceModule/agent/ChangeInterfaceColorAgent.hpp rename to problem-solver/cxx/interface-module/agent/ChangeInterfaceColorAgent.hpp diff --git a/problem-solver/cxx/interfaceModule/keynodes/InterfaceKeynodes.hpp b/problem-solver/cxx/interface-module/keynodes/InterfaceKeynodes.hpp similarity index 75% rename from problem-solver/cxx/interfaceModule/keynodes/InterfaceKeynodes.hpp rename to problem-solver/cxx/interface-module/keynodes/InterfaceKeynodes.hpp index 7725b820dc..64e17c687f 100644 --- a/problem-solver/cxx/interfaceModule/keynodes/InterfaceKeynodes.hpp +++ b/problem-solver/cxx/interface-module/keynodes/InterfaceKeynodes.hpp @@ -7,19 +7,19 @@ namespace interfaceModule class InterfaceKeynodes : public ScKeynodes { public: - static inline ScKeynode const action_change_interface{"action_change_interface", ScType::NodeConstClass}; + static inline ScKeynode const action_change_interface{"action_change_interface", ScType::ConstNodeClass}; - static inline ScKeynode const concept_header{"concept_header", ScType::NodeConstClass}; + static inline ScKeynode const concept_header{"concept_header", ScType::ConstNodeClass}; - static inline ScKeynode const concept_main_part{"concept_main_part", ScType::NodeConstClass}; + static inline ScKeynode const concept_main_part{"concept_main_part", ScType::ConstNodeClass}; - static inline ScKeynode const concept_footer{"concept_footer", ScType::NodeConstClass}; + static inline ScKeynode const concept_footer{"concept_footer", ScType::ConstNodeClass}; - static inline ScKeynode const nrel_component_color{"nrel_component_color", ScType::NodeConstNoRole}; + static inline ScKeynode const nrel_component_color{"nrel_component_color", ScType::ConstNodeNonRole}; - static inline ScKeynode const rrel_entity{"rrel_entity", ScType::NodeConstRole}; + static inline ScKeynode const rrel_entity{"rrel_entity", ScType::ConstNodeRole}; - static inline ScKeynode const rrel_color{"rrel_color", ScType::NodeConstRole}; + static inline ScKeynode const rrel_color{"rrel_color", ScType::ConstNodeRole}; }; } // namespace interfaceModule diff --git a/problem-solver/cxx/interfaceModule/CMakeLists.txt b/problem-solver/cxx/interfaceModule/CMakeLists.txt deleted file mode 100755 index 76ff423ab7..0000000000 --- a/problem-solver/cxx/interfaceModule/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -set(SOURCES - "InterfaceModule.cpp" - "agent/ChangeInterfaceColorAgent.cpp" -) - -set(HEADERS - "InterfaceModule.hpp" - "keynodes/InterfaceKeynodes.hpp" - "agent/ChangeInterfaceColorAgent.hpp" -) - -include_directories( - ${CMAKE_CURRENT_LIST_DIR} - ${SC_MEMORY_SRC} - ${SC_KPM_SRC} - ${SC_TOOLS_SRC} - ${SC_COMMON_MODULE_SRC} -) - -add_library(interface SHARED ${SOURCES} ${HEADERS}) -target_link_libraries(interface sc-memory sc-agents-common common) - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(interface) -endif() diff --git a/problem-solver/cxx/messageClassificationModule/CMakeLists.txt b/problem-solver/cxx/message-classification-module/CMakeLists.txt similarity index 53% rename from problem-solver/cxx/messageClassificationModule/CMakeLists.txt rename to problem-solver/cxx/message-classification-module/CMakeLists.txt index 1cf9c05401..96bcc40498 100644 --- a/problem-solver/cxx/messageClassificationModule/CMakeLists.txt +++ b/problem-solver/cxx/message-classification-module/CMakeLists.txt @@ -1,5 +1,3 @@ -set(INFERENCE_MODULE_SRC "${SUBSYSTEMS_PATH}/scl-machine/problem-solver/cxx/inferenceModule") - set(SOURCES "MessageClassificationModule.cpp" "agent/MessageTopicClassificationAgent.cpp" @@ -23,35 +21,25 @@ set(HEADERS "constants/MessageClassificationConstants.hpp" ) -include_directories( - ${CMAKE_CURRENT_LIST_DIR} - ${SC_MEMORY_SRC} - ${SC_KPM_SRC} - ${SC_COMMON_MODULE_SRC} - ${DIALOG_CONTROL_MODULE_SRC} - ${SC_TOOLS_SRC}/sc-config-utils - ${GLIB2_INCLUDE_DIRS} - ${INFERENCE_MODULE_SRC} -) +find_package(nlohmann_json REQUIRED) -add_library(messageClassification SHARED ${SOURCES} ${HEADERS}) -target_link_libraries( - messageClassification - sc-memory - common - sc-agents-common - dialogControlModule - messageReply - sc-config-utils - inferenceModule +add_library(message-classification-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(message-classification-module + LINK_PUBLIC sc-machine::sc-config + LINK_PUBLIC scl-machine::inference + LINK_PUBLIC common + LINK_PUBLIC nlohmann_json::nlohmann_json ) +target_include_directories(message-classification-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(message-classification-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) -add_definitions(-DMESSAGE_CLASSIFICATION_CONFIG_PATH="${NIKA_ROOT}/nika.ini") - -if(${SC_BUILD_TESTS}) - include(${CMAKE_CURRENT_LIST_DIR}/test/tests.cmake) +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-classification-module) endif() -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(messageClassification) +if(${SC_BUILD_TESTS}) + set(MESSAGE_CLASSIFICATION_MODULE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(test) endif() diff --git a/problem-solver/cxx/messageClassificationModule/MessageClassificationModule.cpp b/problem-solver/cxx/message-classification-module/MessageClassificationModule.cpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/MessageClassificationModule.cpp rename to problem-solver/cxx/message-classification-module/MessageClassificationModule.cpp diff --git a/problem-solver/cxx/messageClassificationModule/MessageClassificationModule.hpp b/problem-solver/cxx/message-classification-module/MessageClassificationModule.hpp similarity index 81% rename from problem-solver/cxx/messageClassificationModule/MessageClassificationModule.hpp rename to problem-solver/cxx/message-classification-module/MessageClassificationModule.hpp index 4e51ab1811..f836d8404e 100644 --- a/problem-solver/cxx/messageClassificationModule/MessageClassificationModule.hpp +++ b/problem-solver/cxx/message-classification-module/MessageClassificationModule.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_module.hpp" +#include namespace messageClassificationModule { diff --git a/problem-solver/cxx/messageClassificationModule/agent/AlternativeMessageTopicClassificationAgent.cpp b/problem-solver/cxx/message-classification-module/agent/AlternativeMessageTopicClassificationAgent.cpp similarity index 81% rename from problem-solver/cxx/messageClassificationModule/agent/AlternativeMessageTopicClassificationAgent.cpp rename to problem-solver/cxx/message-classification-module/agent/AlternativeMessageTopicClassificationAgent.cpp index 8066ca3872..fbc1310288 100644 --- a/problem-solver/cxx/messageClassificationModule/agent/AlternativeMessageTopicClassificationAgent.cpp +++ b/problem-solver/cxx/message-classification-module/agent/AlternativeMessageTopicClassificationAgent.cpp @@ -1,10 +1,10 @@ #include "AlternativeMessageTopicClassificationAgent.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "factory/InferenceManagerFactory.hpp" #include "keynodes/MessageClassificationKeynodes.hpp" -#include "utils/ActionUtils.hpp" +#include +#include +#include +#include using namespace messageClassificationModule; @@ -15,11 +15,11 @@ ScResult AlternativeMessageTopicClassificationAgent::DoProgram(ScActionInitiated ScAddr const & messageAddr = action.GetArgument(ScKeynodes::rrel_1); if (!messageAddr.IsValid()) { - SC_AGENT_LOG_ERROR("Action doesn't have a message node."); + m_logger.Error("Action doesn't have a message node."); return action.FinishUnsuccessfully(); } - ScAddr const & outputStructure = m_context.GenerateNode(ScType::NodeConstStruct); + ScAddr const & outputStructure = m_context.GenerateNode(ScType::ConstNodeStructure); inference::InferenceParams const & inferenceParams{ MessageClassificationKeynodes::concept_classify_message_rule, {messageAddr}, {}, outputStructure}; inference::InferenceConfig const & inferenceConfig{ @@ -35,20 +35,20 @@ ScResult AlternativeMessageTopicClassificationAgent::DoProgram(ScActionInitiated } catch (utils::ScException & exception) { - SC_AGENT_LOG_ERROR(exception.Description()); + m_logger.Error(exception.Description()); ActionUtils::wrapActionResultToScStructure(&m_context, action, answerElements); return action.FinishUnsuccessfully(); } if (!utils::IteratorUtils::getAnyFromSet(&m_context, outputStructure).IsValid()) { - SC_AGENT_LOG_DEBUG("Message is not classified."); + m_logger.Debug("Message is not classified."); ActionUtils::wrapActionResultToScStructure(&m_context, action, answerElements); return action.FinishUnsuccessfully(); } else { - SC_AGENT_LOG_DEBUG("Message is classified."); + m_logger.Debug("Message is classified."); } ActionUtils::wrapActionResultToScStructure(&m_context, action, answerElements); diff --git a/problem-solver/cxx/messageClassificationModule/agent/AlternativeMessageTopicClassificationAgent.hpp b/problem-solver/cxx/message-classification-module/agent/AlternativeMessageTopicClassificationAgent.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/agent/AlternativeMessageTopicClassificationAgent.hpp rename to problem-solver/cxx/message-classification-module/agent/AlternativeMessageTopicClassificationAgent.hpp diff --git a/problem-solver/cxx/messageClassificationModule/agent/MessageTopicClassificationAgent.cpp b/problem-solver/cxx/message-classification-module/agent/MessageTopicClassificationAgent.cpp similarity index 93% rename from problem-solver/cxx/messageClassificationModule/agent/MessageTopicClassificationAgent.cpp rename to problem-solver/cxx/message-classification-module/agent/MessageTopicClassificationAgent.cpp index c5b98c30e5..54fb1ddb6d 100644 --- a/problem-solver/cxx/messageClassificationModule/agent/MessageTopicClassificationAgent.cpp +++ b/problem-solver/cxx/message-classification-module/agent/MessageTopicClassificationAgent.cpp @@ -2,7 +2,7 @@ #include "client/WitAiClient.hpp" #include "keynodes/MessageClassificationKeynodes.hpp" -#include "utils/ActionUtils.hpp" +#include using namespace messageClassificationModule; @@ -22,7 +22,7 @@ ScResult MessageTopicClassificationAgent::DoProgram(ScActionInitiatedEvent const } catch (utils::ScException & exception) { - SC_AGENT_LOG_ERROR(exception.Description()); + m_logger.Error(exception.Description()); ActionUtils::wrapActionResultToScStructure(&m_context, action, answerElements); return action.FinishUnsuccessfully(); diff --git a/problem-solver/cxx/messageClassificationModule/agent/MessageTopicClassificationAgent.hpp b/problem-solver/cxx/message-classification-module/agent/MessageTopicClassificationAgent.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/agent/MessageTopicClassificationAgent.hpp rename to problem-solver/cxx/message-classification-module/agent/MessageTopicClassificationAgent.hpp diff --git a/problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.cpp b/problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.cpp similarity index 82% rename from problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.cpp rename to problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.cpp index dde8730e9d..e243e196e9 100644 --- a/problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.cpp +++ b/problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.cpp @@ -1,12 +1,13 @@ #include "MessageTopicClassifier.hpp" -#include "sc-agents-common/utils/CommonUtils.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - #include "constants/MessageClassificationConstants.hpp" -#include "keynodes/Keynodes.hpp" #include "keynodes/MessageClassificationKeynodes.hpp" -#include "searcher/MessageSearcher.hpp" +#include +#include +#include +#include + +using namespace commonModule; namespace messageClassificationModule { @@ -16,7 +17,7 @@ MessageTopicClassifier::MessageTopicClassifier( : context(context) , client(client) { - messageSearcher = std::make_unique(this->context); + messageSearcher = std::make_unique(this->context); } ScAddrVector MessageTopicClassifier::classifyMessage(ScAddr const & messageAddr) @@ -63,18 +64,14 @@ ScAddrVector MessageTopicClassifier::getMessageIntentClass(ScAddr const & messag if (messageIntent.empty()) { ScAddr const & messageIntentCLassEdge = context->GenerateConnector( - ScType::EdgeAccessConstPosPerm, - MessageClassificationKeynodes::concept_not_classified_by_intent_message, - messageAddr); + ScType::ConstPermPosArc, MessageClassificationKeynodes::concept_not_classified_by_intent_message, messageAddr); messageIntentCLassElements.push_back(MessageClassificationKeynodes::concept_not_classified_by_intent_message); messageIntentCLassElements.push_back(messageIntentCLassEdge); return messageIntentCLassElements; } ScIterator3Ptr const possibleIntentIterator = context->CreateIterator3( - MessageClassificationKeynodes::concept_intent_possible_class, - ScType::EdgeAccessConstPosPerm, - ScType::NodeConstClass); + MessageClassificationKeynodes::concept_intent_possible_class, ScType::ConstPermPosArc, ScType::ConstNodeClass); std::vector witAiIdtfs; ScAddr possibleMessageCLass; @@ -89,7 +86,7 @@ ScAddrVector MessageTopicClassifier::getMessageIntentClass(ScAddr const & messag { SC_LOG_DEBUG("Found " << context->GetElementSystemIdentifier(possibleMessageCLass) << " intent class"); ScAddr messageIntentCLassEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, possibleMessageCLass, messageAddr); + context->GenerateConnector(ScType::ConstPermPosArc, possibleMessageCLass, messageAddr); messageIntentCLassElements.push_back(possibleMessageCLass); messageIntentCLassElements.push_back(messageIntentCLassEdge); return messageIntentCLassElements; @@ -138,18 +135,14 @@ ScAddrVector MessageTopicClassifier::getMessageTraitClass(ScAddr const & message if (messageTrait.empty()) { ScAddr const & messageIntentCLassEdge = context->GenerateConnector( - ScType::EdgeAccessConstPosPerm, - MessageClassificationKeynodes::concept_not_classified_by_trait_message, - messageAddr); + ScType::ConstPermPosArc, MessageClassificationKeynodes::concept_not_classified_by_trait_message, messageAddr); messageTraitClassElements.push_back(MessageClassificationKeynodes::concept_not_classified_by_trait_message); messageTraitClassElements.push_back(messageIntentCLassEdge); return messageTraitClassElements; } ScIterator3Ptr possibleTraitIterator = context->CreateIterator3( - MessageClassificationKeynodes::concept_trait_possible_class, - ScType::EdgeAccessConstPosPerm, - ScType::NodeConstClass); + MessageClassificationKeynodes::concept_trait_possible_class, ScType::ConstPermPosArc, ScType::ConstNodeClass); messageTraitClassElements = processTraits(possibleTraitIterator, messageTrait, messageTraitClassElements, messageAddr); @@ -176,21 +169,21 @@ void MessageTopicClassifier::buildTraitTemplate(ScTemplate & traitTemplate, ScAd { traitTemplate.Quintuple( possibleMessageCLass, - ScType::EdgeDCommonVar, - ScType::LinkVar >> MessageClassificationAliasConstants::TRAIT_INCLUDED_CLASS_LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNodeLink >> MessageClassificationAliasConstants::TRAIT_INCLUDED_CLASS_LINK_ALIAS, + ScType::VarPermPosArc, MessageClassificationKeynodes::nrel_wit_ai_idtf); traitTemplate.Quintuple( - ScType::NodeVarClass >> MessageClassificationAliasConstants::SET_OF_TRAITS_CLASS_ALIAS, - ScType::EdgeDCommonVar, + ScType::VarNodeClass >> MessageClassificationAliasConstants::SET_OF_TRAITS_CLASS_ALIAS, + ScType::VarCommonArc, possibleMessageCLass, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::nrel_inclusion); traitTemplate.Quintuple( MessageClassificationAliasConstants::SET_OF_TRAITS_CLASS_ALIAS, - ScType::EdgeDCommonVar, - ScType::LinkVar >> MessageClassificationAliasConstants::SET_OF_TRAITS_CLASS_LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNodeLink >> MessageClassificationAliasConstants::SET_OF_TRAITS_CLASS_LINK_ALIAS, + ScType::VarPermPosArc, MessageClassificationKeynodes::nrel_wit_ai_idtf); } @@ -228,7 +221,7 @@ ScAddrVector MessageTopicClassifier::processTraits( { SC_LOG_DEBUG("Found " << context->GetElementSystemIdentifier(possibleMessageCLass) << " trait class"); ScAddr messageTraitClassEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, possibleMessageCLass, messageAddr); + context->GenerateConnector(ScType::ConstPermPosArc, possibleMessageCLass, messageAddr); messageTraitClassElements.push_back(possibleMessageCLass); messageTraitClassElements.push_back(messageTraitClassEdge); @@ -247,9 +240,7 @@ ScAddrVector MessageTopicClassifier::getMessageEntity(ScAddr const & messageAddr if (!messageEntity.empty()) { ScIterator3Ptr possibleEntityIterator = context->CreateIterator3( - MessageClassificationKeynodes::concept_entity_possible_class, - ScType::EdgeAccessConstPosPerm, - ScType::NodeConstClass); + MessageClassificationKeynodes::concept_entity_possible_class, ScType::ConstPermPosArc, ScType::ConstNodeClass); messageEntitiesElements = processEntities(possibleEntityIterator, messageEntity, messageEntitiesElements, messageAddr); @@ -277,25 +268,25 @@ void MessageTopicClassifier::buildEntityTemplate(ScTemplate & entityTemplate, Sc { entityTemplate.Quintuple( possibleEntityClass, - ScType::EdgeDCommonVar, - ScType::LinkVar >> MessageClassificationAliasConstants::ENTITY_CLASS_LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNodeLink >> MessageClassificationAliasConstants::ENTITY_CLASS_LINK_ALIAS, + ScType::VarPermPosArc, MessageClassificationKeynodes::nrel_wit_ai_idtf); entityTemplate.Quintuple( possibleEntityClass, - ScType::EdgeDCommonVar, - ScType::NodeVar >> MessageClassificationAliasConstants::ENTITY_SET_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNode >> MessageClassificationAliasConstants::ENTITY_SET_ALIAS, + ScType::VarPermPosArc, MessageClassificationKeynodes::nrel_entity_possible_role); entityTemplate.Triple( // TODO: check formalisation. Why there is a set? MessageClassificationAliasConstants::ENTITY_SET_ALIAS, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVarRole >> MessageClassificationAliasConstants::ENTITY_ROLE_ALIAS); + ScType::VarPermPosArc, + ScType::VarNodeRole >> MessageClassificationAliasConstants::ENTITY_ROLE_ALIAS); entityTemplate.Quintuple( MessageClassificationAliasConstants::ENTITY_ROLE_ALIAS, - ScType::EdgeDCommonVar, - ScType::LinkVar >> MessageClassificationAliasConstants::ENTITY_ROLE_LINK_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNodeLink >> MessageClassificationAliasConstants::ENTITY_ROLE_LINK_ALIAS, + ScType::VarPermPosArc, MessageClassificationKeynodes::nrel_wit_ai_idtf); } @@ -345,7 +336,7 @@ ScAddrVector MessageTopicClassifier::processEntities( std::string entitiesKey = entityWitAiIdtf.append(":").append(entityRoleWitAiIdtf); ScIterator3Ptr const entityClassIterator = - context->CreateIterator3(possibleEntityClass, ScType::EdgeAccessConstPosPerm, ScType::NodeConst); + context->CreateIterator3(possibleEntityClass, ScType::ConstPermPosArc, ScType::ConstNode); ScAddr entityAddr; while (entityClassIterator->Next()) { @@ -357,24 +348,30 @@ ScAddrVector MessageTopicClassifier::processEntities( utils::CommonUtils::getIdtf(context, entityAddr, relationToFindEntity, {ScKeynodes::lang_ru})); } + std::set foundEntities; for (auto const & [entitySameIdtf, entitySameRoleIdtf] : entityIdtfToRole) { if (std::find(identifiers.begin(), identifiers.end(), entitySameIdtf) != identifiers.end()) { SC_LOG_DEBUG("Found " << context->GetElementSystemIdentifier(entityAddr) << " entity"); - ScAddr messageEntityEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, messageAddr, entityAddr); + ScAddr messageEntityEdge = context->GenerateConnector(ScType::ConstPermPosArc, messageAddr, entityAddr); ScAddr messageEntityRoleEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, entityRole, messageEntityEdge); + context->GenerateConnector(ScType::ConstPermPosArc, entityRole, messageEntityEdge); messageEntitiesElements.push_back(entityAddr); messageEntitiesElements.push_back(entityRole); messageEntitiesElements.push_back(messageEntityEdge); messageEntitiesElements.push_back(messageEntityRoleEdge); - entityIdtfToRole.erase(entitySameIdtf); + foundEntities.insert(entitySameIdtf); } } + + for (auto const & entityIdtf : foundEntities) + { + if (entityIdtfToRole.find(entityIdtf) != entityIdtfToRole.cend()) + entityIdtfToRole.erase(entityIdtf); + } } } } @@ -384,12 +381,11 @@ ScAddrVector MessageTopicClassifier::processEntities( ScAddr const & createdEntity = context->GenerateLink(); context->SetLinkContent(createdEntity, notFoundEntitiesIdtf); ScAddr const & createdEntityEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, commonModule::Keynodes::lang_en, createdEntity); - ScAddr const & messageEntityEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, messageAddr, createdEntity); - ScAddr const & entityRole = context->ResolveElementSystemIdentifier(notFoundEntitiesRoles, ScType::NodeConstRole); + context->GenerateConnector(ScType::ConstPermPosArc, commonModule::Keynodes::lang_en, createdEntity); + ScAddr const & messageEntityEdge = context->GenerateConnector(ScType::ConstPermPosArc, messageAddr, createdEntity); + ScAddr const & entityRole = context->ResolveElementSystemIdentifier(notFoundEntitiesRoles, ScType::ConstNodeRole); ScAddr const & messageEntityRoleEdge = - context->GenerateConnector(ScType::EdgeAccessConstPosPerm, entityRole, messageEntityEdge); + context->GenerateConnector(ScType::ConstPermPosArc, entityRole, messageEntityEdge); SC_LOG_DEBUG("Generated " << notFoundEntitiesIdtf << " entity"); SC_LOG_DEBUG("Generated " << notFoundEntitiesRoles << " role"); diff --git a/problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.hpp b/problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.hpp similarity index 91% rename from problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.hpp rename to problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.hpp index 2204b4c20c..fc77421535 100644 --- a/problem-solver/cxx/messageClassificationModule/classifier/MessageTopicClassifier.hpp +++ b/problem-solver/cxx/message-classification-module/classifier/MessageTopicClassifier.hpp @@ -1,9 +1,10 @@ #pragma once -#include "sc-memory/sc_agent_context.hpp" +#include #include "client/WitAiClientInterface.hpp" -#include "searcher/MessageSearcher.hpp" +#include + namespace messageClassificationModule { class MessageTopicClassifier @@ -18,7 +19,7 @@ class MessageTopicClassifier ScAddrVector relationsToFindEntity{ScKeynodes::nrel_main_idtf, ScKeynodes::nrel_idtf}; - std::unique_ptr messageSearcher; + std::unique_ptr messageSearcher; std::shared_ptr client; diff --git a/problem-solver/cxx/messageClassificationModule/client/WitAiClient.cpp b/problem-solver/cxx/message-classification-module/client/WitAiClient.cpp similarity index 78% rename from problem-solver/cxx/messageClassificationModule/client/WitAiClient.cpp rename to problem-solver/cxx/message-classification-module/client/WitAiClient.cpp index 4824c64816..8eef59b6cb 100644 --- a/problem-solver/cxx/messageClassificationModule/client/WitAiClient.cpp +++ b/problem-solver/cxx/message-classification-module/client/WitAiClient.cpp @@ -1,13 +1,14 @@ #include "WitAiClient.hpp" -#include "sc-config/sc_config.hpp" -#include "sc-memory/utils/sc_log.hpp" +#include +#include -#include "http/sc_http_request.hpp" +#include +#include messageClassificationModule::WitAiClient::WitAiClient() { - ScConfig config{MESSAGE_CLASSIFICATION_CONFIG_PATH}; + ScConfig config{ScMemory::ms_configPath}; ScConfigGroup group{config["wit-ai"]}; witAiServerToken = group["server_token"]; witAiUrl = group["url"]; diff --git a/problem-solver/cxx/messageClassificationModule/client/WitAiClient.hpp b/problem-solver/cxx/message-classification-module/client/WitAiClient.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/client/WitAiClient.hpp rename to problem-solver/cxx/message-classification-module/client/WitAiClient.hpp diff --git a/problem-solver/cxx/messageClassificationModule/client/WitAiClientInterface.hpp b/problem-solver/cxx/message-classification-module/client/WitAiClientInterface.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/client/WitAiClientInterface.hpp rename to problem-solver/cxx/message-classification-module/client/WitAiClientInterface.hpp diff --git a/problem-solver/cxx/messageClassificationModule/constants/MessageClassificationConstants.cpp b/problem-solver/cxx/message-classification-module/constants/MessageClassificationConstants.cpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/constants/MessageClassificationConstants.cpp rename to problem-solver/cxx/message-classification-module/constants/MessageClassificationConstants.cpp diff --git a/problem-solver/cxx/messageClassificationModule/constants/MessageClassificationConstants.hpp b/problem-solver/cxx/message-classification-module/constants/MessageClassificationConstants.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/constants/MessageClassificationConstants.hpp rename to problem-solver/cxx/message-classification-module/constants/MessageClassificationConstants.hpp diff --git a/problem-solver/cxx/messageClassificationModule/keynodes/MessageClassificationKeynodes.hpp b/problem-solver/cxx/message-classification-module/keynodes/MessageClassificationKeynodes.hpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/keynodes/MessageClassificationKeynodes.hpp rename to problem-solver/cxx/message-classification-module/keynodes/MessageClassificationKeynodes.hpp diff --git a/problem-solver/cxx/messageClassificationModule/manager/MessageTopicClassificationManager.cpp b/problem-solver/cxx/message-classification-module/manager/MessageTopicClassificationManager.cpp similarity index 100% rename from problem-solver/cxx/messageClassificationModule/manager/MessageTopicClassificationManager.cpp rename to problem-solver/cxx/message-classification-module/manager/MessageTopicClassificationManager.cpp diff --git a/problem-solver/cxx/messageClassificationModule/manager/MessageTopicClassificationManager.hpp b/problem-solver/cxx/message-classification-module/manager/MessageTopicClassificationManager.hpp similarity index 92% rename from problem-solver/cxx/messageClassificationModule/manager/MessageTopicClassificationManager.hpp rename to problem-solver/cxx/message-classification-module/manager/MessageTopicClassificationManager.hpp index 9db73226fc..7ded113be3 100644 --- a/problem-solver/cxx/messageClassificationModule/manager/MessageTopicClassificationManager.hpp +++ b/problem-solver/cxx/message-classification-module/manager/MessageTopicClassificationManager.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_addr.hpp" +#include #include "classifier/MessageTopicClassifier.hpp" diff --git a/problem-solver/cxx/message-classification-module/test/CMakeLists.txt b/problem-solver/cxx/message-classification-module/test/CMakeLists.txt new file mode 100644 index 0000000000..df9b97c73b --- /dev/null +++ b/problem-solver/cxx/message-classification-module/test/CMakeLists.txt @@ -0,0 +1,9 @@ +make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units + NAME message-topic-classification-module-tests + DEPENDS sc-machine::sc-builder-lib message-classification-module GTest::gmock_main + INCLUDES ${MESSAGE_CLASSIFICATION_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-topic-classification-module-tests) +endif() diff --git a/problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message.scs b/problem-solver/cxx/message-classification-module/test/test-structures/hello_message.scs similarity index 100% rename from problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message.scs rename to problem-solver/cxx/message-classification-module/test/test-structures/hello_message.scs diff --git a/problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message_with_entity.scs b/problem-solver/cxx/message-classification-module/test/test-structures/hello_message_with_entity.scs similarity index 100% rename from problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message_with_entity.scs rename to problem-solver/cxx/message-classification-module/test/test-structures/hello_message_with_entity.scs diff --git a/problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message_with_two_entities.scs b/problem-solver/cxx/message-classification-module/test/test-structures/hello_message_with_two_entities.scs similarity index 100% rename from problem-solver/cxx/messageClassificationModule/test/testStructures/hello_message_with_two_entities.scs rename to problem-solver/cxx/message-classification-module/test/test-structures/hello_message_with_two_entities.scs diff --git a/problem-solver/cxx/messageClassificationModule/test/testStructures/hobby_message_with_two_same_role_entities.scs b/problem-solver/cxx/message-classification-module/test/test-structures/hobby_message_with_two_same_role_entities.scs similarity index 100% rename from problem-solver/cxx/messageClassificationModule/test/testStructures/hobby_message_with_two_same_role_entities.scs rename to problem-solver/cxx/message-classification-module/test/test-structures/hobby_message_with_two_same_role_entities.scs diff --git a/problem-solver/cxx/messageClassificationModule/test/testStructures/wit_concepts.scs b/problem-solver/cxx/message-classification-module/test/test-structures/wit_concepts.scs similarity index 100% rename from problem-solver/cxx/messageClassificationModule/test/testStructures/wit_concepts.scs rename to problem-solver/cxx/message-classification-module/test/test-structures/wit_concepts.scs diff --git a/problem-solver/cxx/messageClassificationModule/test/units/WitAiCkientMock.hpp b/problem-solver/cxx/message-classification-module/test/units/WitAiCkientMock.hpp similarity index 91% rename from problem-solver/cxx/messageClassificationModule/test/units/WitAiCkientMock.hpp rename to problem-solver/cxx/message-classification-module/test/units/WitAiCkientMock.hpp index 5bc54b2dd1..7f96dd14ab 100644 --- a/problem-solver/cxx/messageClassificationModule/test/units/WitAiCkientMock.hpp +++ b/problem-solver/cxx/message-classification-module/test/units/WitAiCkientMock.hpp @@ -1,7 +1,8 @@ #pragma once +#include + #include "client/WitAiClientInterface.hpp" -#include "gmock/gmock.h" namespace messageClassificationModule { diff --git a/problem-solver/cxx/messageClassificationModule/test/units/testMessageTopicClassification.cpp b/problem-solver/cxx/message-classification-module/test/units/testMessageTopicClassification.cpp similarity index 89% rename from problem-solver/cxx/messageClassificationModule/test/units/testMessageTopicClassification.cpp rename to problem-solver/cxx/message-classification-module/test/units/testMessageTopicClassification.cpp index bdb32dde43..ba6e42c366 100644 --- a/problem-solver/cxx/messageClassificationModule/test/units/testMessageTopicClassification.cpp +++ b/problem-solver/cxx/message-classification-module/test/units/testMessageTopicClassification.cpp @@ -1,15 +1,15 @@ -#include "sc_test.hpp" -#include "scs_loader.hpp" +#include #include "WitAiCkientMock.hpp" #include "classifier/MessageTopicClassifier.hpp" +#include using namespace messageClassificationModule; namespace messageTopicClassificationTest { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = MESSAGE_TOPIC_CLASSIFICATION_MODULE_TEST_SRC_PATH "/testStructures/"; +std::string const TEST_FILES_DIR_PATH = "../test-structures/"; using MessageTopicClassificationTest = ScMemoryTest; @@ -53,7 +53,7 @@ TEST_F(MessageTopicClassificationTest, classifyMessageWithoutEntityTest) ScAddrVector messageClassificationItems = classifier.classifyMessage(messageAddr); EXPECT_FALSE(messageClassificationItems.empty()); - bool isMessageClassified = context.CheckConnector(greetingMessageClass, messageAddr, ScType::EdgeAccessConstPosPerm); + bool isMessageClassified = context.CheckConnector(greetingMessageClass, messageAddr, ScType::ConstPermPosArc); EXPECT_TRUE(isMessageClassified); } @@ -92,9 +92,9 @@ TEST_F(MessageTopicClassificationTest, classifyMessageWithEntityTest) EXPECT_FALSE(messageClassificationItems.empty()); ScTemplate classificationTemplate; - classificationTemplate.Triple(greetingMessageClass, ScType::EdgeAccessVarPosPerm, messageAddr); + classificationTemplate.Triple(greetingMessageClass, ScType::VarPermPosArc, messageAddr); classificationTemplate.Quintuple( - messageAddr, ScType::EdgeAccessVarPosPerm, entityAddr, ScType::EdgeAccessVarPosPerm, entityRoleAddr); + messageAddr, ScType::VarPermPosArc, entityAddr, ScType::VarPermPosArc, entityRoleAddr); ScTemplateSearchResult classificationTemplateResult; context.SearchByTemplate(classificationTemplate, classificationTemplateResult); @@ -145,12 +145,12 @@ TEST_F(MessageTopicClassificationTest, classifyMessageWithTwoEntitiesTest) EXPECT_FALSE(messageClassificationItems.empty()); ScTemplate classificationTemplate; - classificationTemplate.Triple(weatherMessageClass, ScType::EdgeAccessVarPosPerm, messageAddr); - classificationTemplate.Triple(neutralMessageClass, ScType::EdgeAccessVarPosPerm, messageAddr); + classificationTemplate.Triple(weatherMessageClass, ScType::VarPermPosArc, messageAddr); + classificationTemplate.Triple(neutralMessageClass, ScType::VarPermPosArc, messageAddr); classificationTemplate.Quintuple( - messageAddr, ScType::EdgeAccessVarPosPerm, entityContactAddr, ScType::EdgeAccessVarPosPerm, rrelContactAddr); + messageAddr, ScType::VarPermPosArc, entityContactAddr, ScType::VarPermPosArc, rrelContactAddr); classificationTemplate.Quintuple( - messageAddr, ScType::EdgeAccessVarPosPerm, entitySeasonAddr, ScType::EdgeAccessVarPosPerm, rrelSeasonAddr); + messageAddr, ScType::VarPermPosArc, entitySeasonAddr, ScType::VarPermPosArc, rrelSeasonAddr); ScTemplateSearchResult classificationTemplateResult; context.SearchByTemplate(classificationTemplate, classificationTemplateResult); @@ -200,10 +200,8 @@ TEST_F(MessageTopicClassificationTest, classifyMessageWithTwoEntitiesSameRoleTes EXPECT_FALSE(messageClassificationItems.empty()); ScTemplate entitiesTemplate; - entitiesTemplate.Quintuple( - messageAddr, ScType::EdgeAccessVarPosPerm, hobbyAddr, ScType::EdgeAccessVarPosPerm, rrelEntityAddr); - entitiesTemplate.Quintuple( - messageAddr, ScType::EdgeAccessVarPosPerm, theatreAddr, ScType::EdgeAccessVarPosPerm, rrelEntityAddr); + entitiesTemplate.Quintuple(messageAddr, ScType::VarPermPosArc, hobbyAddr, ScType::VarPermPosArc, rrelEntityAddr); + entitiesTemplate.Quintuple(messageAddr, ScType::VarPermPosArc, theatreAddr, ScType::VarPermPosArc, rrelEntityAddr); ScTemplateSearchResult classificationTemplateResult; context.SearchByTemplate(entitiesTemplate, classificationTemplateResult); diff --git a/problem-solver/cxx/message-processing-module/CMakeLists.txt b/problem-solver/cxx/message-processing-module/CMakeLists.txt new file mode 100644 index 0000000000..df3f935a59 --- /dev/null +++ b/problem-solver/cxx/message-processing-module/CMakeLists.txt @@ -0,0 +1,28 @@ +set(SOURCES + "MessageProcessingModule.cpp" + "agent/FindWordInSetByFirstLetterAgent.cpp" +) + +set(HEADERS + "MessageProcessingModule.hpp" + "keynodes/MessageProcessingKeynodes.hpp" + "agent/FindWordInSetByFirstLetterAgent.hpp" +) + +add_library(message-processing-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(message-processing-module + LINK_PUBLIC common +) +target_include_directories(message-processing-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(message-processing-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-processing-module) +endif() + +if(${SC_BUILD_TESTS}) + set(MESSAGE_PROCESSING_MODULE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(test) +endif() diff --git a/problem-solver/cxx/messageProcessingModule/MessageProcessingModule.cpp b/problem-solver/cxx/message-processing-module/MessageProcessingModule.cpp similarity index 100% rename from problem-solver/cxx/messageProcessingModule/MessageProcessingModule.cpp rename to problem-solver/cxx/message-processing-module/MessageProcessingModule.cpp diff --git a/problem-solver/cxx/messageProcessingModule/MessageProcessingModule.hpp b/problem-solver/cxx/message-processing-module/MessageProcessingModule.hpp similarity index 80% rename from problem-solver/cxx/messageProcessingModule/MessageProcessingModule.hpp rename to problem-solver/cxx/message-processing-module/MessageProcessingModule.hpp index 0b216672a6..e0cca79f67 100644 --- a/problem-solver/cxx/messageProcessingModule/MessageProcessingModule.hpp +++ b/problem-solver/cxx/message-processing-module/MessageProcessingModule.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_module.hpp" +#include namespace messageProcessingModule { diff --git a/problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.cpp b/problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.cpp similarity index 69% rename from problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.cpp rename to problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.cpp index 81a19b8a63..2294895abc 100644 --- a/problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.cpp +++ b/problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.cpp @@ -1,11 +1,9 @@ #include "FindWordInSetByFirstLetterAgent.hpp" -#include "sc-agents-common/utils/CommonUtils.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "keynodes/MessageKeynodes.hpp" #include "keynodes/MessageProcessingKeynodes.hpp" -#include "utils/ActionUtils.hpp" +#include +#include +#include using namespace utils; @@ -17,16 +15,16 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const ScAddr const & messageAddr = action.GetArgument(ScKeynodes::rrel_1); if (!messageAddr.IsValid()) { - SC_AGENT_LOG_ERROR("The message isn’t valid"); + m_logger.Error("The message isn’t valid"); return action.FinishUnsuccessfully(); } if (!m_context.CheckConnector( MessageProcessingKeynodes::concept_message_about_find_word_by_first_letter, messageAddr, - ScType::EdgeAccessConstPosPerm)) + ScType::ConstPermPosArc)) { - SC_AGENT_LOG_DEBUG("The message isn’t about letter search"); + m_logger.Debug("The message isn’t about letter search"); return action.FinishUnsuccessfully(); } @@ -35,20 +33,20 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const { ScIterator3Ptr const & agentAnswerLinkIterator = m_context.CreateIterator3( MessageProcessingKeynodes::word_starts_with_required_letter_answer_phrase, - ScType::EdgeAccessConstPosPerm, - ScType::LinkConst); + ScType::ConstPermPosArc, + ScType::ConstNodeLink); if (agentAnswerLinkIterator->Next()) { m_context.EraseElement(agentAnswerLinkIterator->Get(2)); } - messageSearcher = std::make_unique(&m_context); + messageSearcher = std::make_unique(&m_context); std::string messageText = getMessageText(messageAddr); - ScAddr const & entityAddr = utils::IteratorUtils::getAnyByOutRelation( - &m_context, messageAddr, dialogControlModule::MessageKeynodes::rrel_entity); + ScAddr const & entityAddr = + utils::IteratorUtils::getAnyByOutRelation(&m_context, messageAddr, MessageProcessingKeynodes::rrel_entity); ScIterator3Ptr const & entityNodesIterator = - m_context.CreateIterator3(entityAddr, ScType::EdgeAccessConstPosPerm, ScType::NodeConst); + m_context.CreateIterator3(entityAddr, ScType::ConstPermPosArc, ScType::ConstNode); std::string firstLetter; std::string firstWordLetter; @@ -65,7 +63,7 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const if (firstLetter == firstWordLetter) { resultStream << word; - SC_AGENT_LOG_DEBUG("Found word " << word); + m_logger.Debug("Found word ", word); } } while (entityNodesIterator->Next()) @@ -78,7 +76,7 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const resultStream << word; else resultStream << ", " << word; - SC_AGENT_LOG_DEBUG("Found word " << word); + m_logger.Debug("Found word ", word); } } @@ -91,14 +89,14 @@ ScResult FindWordInSetByFirstLetterAgent::DoProgram(ScActionInitiatedEvent const result = resultStream.str(); } answerElements = createAnswer(result); - SC_AGENT_LOG_DEBUG("Reply message is generated"); + m_logger.Debug("Reply message is generated"); } catch (utils::ScException const & exception) { - SC_AGENT_LOG_ERROR(exception.Description()); + m_logger.Error(exception.Description()); ActionUtils::wrapActionResultToScStructure(&m_context, action, answerElements); - SC_AGENT_LOG_DEBUG("Finished with an error"); + m_logger.Debug("Finished with an error"); return action.FinishUnsuccessfully(); } @@ -113,14 +111,11 @@ ScAddr FindWordInSetByFirstLetterAgent::GetActionClass() const ScAddrVector FindWordInSetByFirstLetterAgent::createAnswer(std::string const & linkContent) const { - ScAddr const & answerLink = m_context.GenerateLink(ScType::LinkConst); + ScAddr const & answerLink = m_context.GenerateLink(ScType::ConstNodeLink); m_context.SetLinkContent(answerLink, linkContent); - ScAddr const & edgeAccessConstPosPerm = m_context.GenerateConnector( - ScType::EdgeAccessConstPosPerm, - MessageProcessingKeynodes::word_starts_with_required_letter_answer_phrase, - answerLink); - return { - answerLink, edgeAccessConstPosPerm, MessageProcessingKeynodes::word_starts_with_required_letter_answer_phrase}; + ScAddr const & ConstPermPosArc = m_context.GenerateConnector( + ScType::ConstPermPosArc, MessageProcessingKeynodes::word_starts_with_required_letter_answer_phrase, answerLink); + return {answerLink, ConstPermPosArc, MessageProcessingKeynodes::word_starts_with_required_letter_answer_phrase}; } std::string FindWordInSetByFirstLetterAgent::getMessageText(ScAddr const & messageAddr) const diff --git a/problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.hpp b/problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.hpp similarity index 80% rename from problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.hpp rename to problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.hpp index 7bddb2d17f..19e906275f 100644 --- a/problem-solver/cxx/messageProcessingModule/agent/FindWordInSetByFirstLetterAgent.hpp +++ b/problem-solver/cxx/message-processing-module/agent/FindWordInSetByFirstLetterAgent.hpp @@ -2,7 +2,7 @@ #include -#include "searcher/MessageSearcher.hpp" +#include namespace messageProcessingModule { @@ -18,6 +18,6 @@ class FindWordInSetByFirstLetterAgent : public ScActionInitiatedAgent std::string getMessageText(ScAddr const & messageAddr) const; - std::unique_ptr messageSearcher; + std::unique_ptr messageSearcher; }; } // namespace messageProcessingModule diff --git a/problem-solver/cxx/messageProcessingModule/keynodes/MessageProcessingKeynodes.hpp b/problem-solver/cxx/message-processing-module/keynodes/MessageProcessingKeynodes.hpp similarity index 79% rename from problem-solver/cxx/messageProcessingModule/keynodes/MessageProcessingKeynodes.hpp rename to problem-solver/cxx/message-processing-module/keynodes/MessageProcessingKeynodes.hpp index 355d67723a..bc534b1594 100644 --- a/problem-solver/cxx/messageProcessingModule/keynodes/MessageProcessingKeynodes.hpp +++ b/problem-solver/cxx/message-processing-module/keynodes/MessageProcessingKeynodes.hpp @@ -9,15 +9,17 @@ class MessageProcessingKeynodes : public ScKeynodes public: static inline ScKeynode const action_find_word_in_set_by_first_letter{ "action_find_word_in_set_by_first_letter", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; static inline ScKeynode const concept_message_about_find_word_by_first_letter{ "concept_message_about_find_word_by_first_letter", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; static inline ScKeynode const word_starts_with_required_letter_answer_phrase{ "word_starts_with_required_letter_answer_phrase", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; + + static inline ScKeynode const rrel_entity{"rrel_entity"}; }; } // namespace messageProcessingModule diff --git a/problem-solver/cxx/message-processing-module/test/CMakeLists.txt b/problem-solver/cxx/message-processing-module/test/CMakeLists.txt new file mode 100644 index 0000000000..6cfb558fc9 --- /dev/null +++ b/problem-solver/cxx/message-processing-module/test/CMakeLists.txt @@ -0,0 +1,9 @@ +make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units + NAME message-processing-module-tests + DEPENDS message-processing-module sc-machine::sc-builder-lib + INCLUDES ${MESSAGE_PROCESSING_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-processing-module-tests) +endif() diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSeveralWordsTest.scs b/problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSeveralWordsTest.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSeveralWordsTest.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSeveralWordsTest.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSingleWordTest1.scs b/problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSingleWordTest1.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSingleWordTest1.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSingleWordTest1.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSingleWordTest2.scs b/problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSingleWordTest2.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithSingleWordTest2.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithSingleWordTest2.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithoutWords.scs b/problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithoutWords.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/generateAnswerWithoutWords.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/generateAnswerWithoutWords.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/messageIsNotAboutLetterSearch.scs b/problem-solver/cxx/message-processing-module/test/test-structures/messageIsNotAboutLetterSearch.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/messageIsNotAboutLetterSearch.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/messageIsNotAboutLetterSearch.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/testStructures/notValidMessageTest.scs b/problem-solver/cxx/message-processing-module/test/test-structures/notValidMessageTest.scs similarity index 100% rename from problem-solver/cxx/messageProcessingModule/test/testStructures/notValidMessageTest.scs rename to problem-solver/cxx/message-processing-module/test/test-structures/notValidMessageTest.scs diff --git a/problem-solver/cxx/messageProcessingModule/test/units/testMessageProcessingModule.cpp b/problem-solver/cxx/message-processing-module/test/units/testMessageProcessingModule.cpp similarity index 96% rename from problem-solver/cxx/messageProcessingModule/test/units/testMessageProcessingModule.cpp rename to problem-solver/cxx/message-processing-module/test/units/testMessageProcessingModule.cpp index ccde5c196d..6fa3149e64 100644 --- a/problem-solver/cxx/messageProcessingModule/test/units/testMessageProcessingModule.cpp +++ b/problem-solver/cxx/message-processing-module/test/units/testMessageProcessingModule.cpp @@ -1,15 +1,14 @@ #include - -#include "sc-agents-common/utils/IteratorUtils.hpp" -#include "sc-builder/src/scs_loader.hpp" -#include "sc_test.hpp" +#include #include "agent/FindWordInSetByFirstLetterAgent.hpp" +#include +#include namespace messageProcessingModuleTest { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = MESSAGE_PROCESSING_MODULE_TEST_SRC_PATH "/testStructures/"; +std::string const TEST_FILES_DIR_PATH = "../test-structures/"; int const WAIT_TIME = 5000; using MessageProcessingAgentTest = ScMemoryTest; diff --git a/problem-solver/cxx/message-reply-module/CMakeLists.txt b/problem-solver/cxx/message-reply-module/CMakeLists.txt new file mode 100755 index 0000000000..d7c18b2fc7 --- /dev/null +++ b/problem-solver/cxx/message-reply-module/CMakeLists.txt @@ -0,0 +1,32 @@ +set(SOURCES + "MessageReplyModule.cpp" + "agent/MessageReplyAgent.cpp" + "generator/MessageHistoryGenerator.cpp" + "templates/MessageReplyTemplates.cpp" +) + +set(HEADERS + "MessageReplyModule.hpp" + "keynodes/MessageReplyKeynodes.hpp" + "agent/MessageReplyAgent.hpp" + "generator/MessageHistoryGenerator.hpp" + "templates/MessageReplyTemplates.hpp" +) + +add_library(message-reply-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(message-reply-module + LINK_PUBLIC common +) +target_include_directories(message-reply-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(message-reply-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) + +if(${SC_BUILD_TESTS}) + set(MESSAGE_REPLY_MODULE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(test) +endif() + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-reply-module) +endif() diff --git a/problem-solver/cxx/messageReplyModule/MessageReplyModule.cpp b/problem-solver/cxx/message-reply-module/MessageReplyModule.cpp similarity index 100% rename from problem-solver/cxx/messageReplyModule/MessageReplyModule.cpp rename to problem-solver/cxx/message-reply-module/MessageReplyModule.cpp diff --git a/problem-solver/cxx/messageReplyModule/MessageReplyModule.hpp b/problem-solver/cxx/message-reply-module/MessageReplyModule.hpp similarity index 78% rename from problem-solver/cxx/messageReplyModule/MessageReplyModule.hpp rename to problem-solver/cxx/message-reply-module/MessageReplyModule.hpp index e1295c6e44..165e3c2c9d 100644 --- a/problem-solver/cxx/messageReplyModule/MessageReplyModule.hpp +++ b/problem-solver/cxx/message-reply-module/MessageReplyModule.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_module.hpp" +#include namespace messageReplyModule { diff --git a/problem-solver/cxx/messageReplyModule/agent/MessageReplyAgent.cpp b/problem-solver/cxx/message-reply-module/agent/MessageReplyAgent.cpp similarity index 63% rename from problem-solver/cxx/messageReplyModule/agent/MessageReplyAgent.cpp rename to problem-solver/cxx/message-reply-module/agent/MessageReplyAgent.cpp index ad0abf1a0b..8f375a0b99 100644 --- a/problem-solver/cxx/messageReplyModule/agent/MessageReplyAgent.cpp +++ b/problem-solver/cxx/message-reply-module/agent/MessageReplyAgent.cpp @@ -1,12 +1,10 @@ #include "MessageReplyAgent.hpp" -#include "sc-agents-common/utils/CommonUtils.hpp" -#include "sc-agents-common/utils/GenerationUtils.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - #include "generator/MessageHistoryGenerator.hpp" -#include "keynodes/Keynodes.hpp" #include "keynodes/MessageReplyKeynodes.hpp" +#include +#include +#include using namespace messageReplyModule; @@ -18,22 +16,22 @@ ScResult MessageReplyAgent::DoProgram(ScActionInitiatedEvent const & event, ScAc ScAddr authorAddr = utils::IteratorUtils::getAnyByOutRelation(&m_context, action, MessageReplyKeynodes::nrel_authors); if (!processingProgramAddr.IsValid()) { - SC_AGENT_LOG_ERROR("Message processing program not found."); + m_logger.Error("Message processing program not found."); return action.FinishUnsuccessfully(); } if (!linkIsValid(linkAddr)) { - SC_AGENT_LOG_ERROR("Message link not found."); + m_logger.Error("Message link not found."); return action.FinishUnsuccessfully(); } if (!chatAddr.IsValid()) { - SC_AGENT_LOG_ERROR("Message chat not found."); + m_logger.Error("Message chat not found."); return action.FinishUnsuccessfully(); } if (!authorAddr.IsValid()) { - SC_AGENT_LOG_ERROR("Message author not found."); + m_logger.Error("Message author not found."); return action.FinishUnsuccessfully(); } @@ -47,16 +45,16 @@ ScResult MessageReplyAgent::DoProgram(ScActionInitiatedEvent const & event, ScAc } catch (std::runtime_error & exception) { - SC_AGENT_LOG_ERROR(exception.what()); + m_logger.Error(exception.what()); return action.FinishUnsuccessfully(); } - ScAction actionToInterpret = m_context.GenerateAction(commonModule::Keynodes::action_interpret_non_atomic_action); + ScAction actionToInterpret = m_context.GenerateAction(MessageReplyKeynodes::action_interpret_non_atomic_action); actionToInterpret.SetArguments(processingProgramAddr, generateNonAtomicActionArgsSet(messageAddr)); if (!actionToInterpret.InitiateAndWait(WAIT_TIME) || !actionToInterpret.IsFinishedSuccessfully()) { - SC_AGENT_LOG_ERROR("Action wait time expired or action not finished successfully"); + m_logger.Error("Action wait time expired or action not finished successfully"); return action.FinishUnsuccessfully(); } @@ -64,15 +62,15 @@ ScResult MessageReplyAgent::DoProgram(ScActionInitiatedEvent const & event, ScAc try { answerAddr = generateAnswer(messageAddr); - ScTemplate replySearchTemplate; - replySearchTemplate.Quintuple( + ScTemplate replySearchByTemplate; + replySearchByTemplate.Quintuple( messageAddr, - ScType::EdgeDCommonVar, - ScType::NodeVar >> "_reply_message", - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNode >> "_reply_message", + ScType::VarPermPosArc, MessageReplyKeynodes::nrel_reply); ScTemplateSearchResult searchResult; - m_context.SearchByTemplate(replySearchTemplate, searchResult); + m_context.SearchByTemplate(replySearchByTemplate, searchResult); ScAddr const & replyMessageAddr = searchResult[0]["_reply_message"]; utils::GenerationUtils::generateRelationBetween( @@ -82,7 +80,7 @@ ScResult MessageReplyAgent::DoProgram(ScActionInitiatedEvent const & event, ScAc } catch (std::runtime_error & exception) { - SC_AGENT_LOG_ERROR(exception.what()); + m_logger.Error(exception.what()); return action.FinishUnsuccessfully(); } @@ -107,20 +105,16 @@ ScAddr MessageReplyAgent::generateMessage(ScAddr const & authorAddr, ScAddr cons ScTemplate userMessageTemplate; userMessageTemplate.Triple( - MessageReplyKeynodes::concept_message, ScType::EdgeAccessVarPosPerm, ScType::NodeVar >> USER_MESSAGE_ALIAS); + MessageReplyKeynodes::concept_message, ScType::VarPermPosArc, ScType::VarNode >> USER_MESSAGE_ALIAS); userMessageTemplate.Quintuple( - USER_MESSAGE_ALIAS, - ScType::EdgeDCommonVar, - authorAddr, - ScType::EdgeAccessVarPosPerm, - MessageReplyKeynodes::nrel_authors); + USER_MESSAGE_ALIAS, ScType::VarCommonArc, authorAddr, ScType::VarPermPosArc, MessageReplyKeynodes::nrel_authors); userMessageTemplate.Quintuple( - ScType::NodeVar >> TRANSLATION_NODE_ALIAS, - ScType::EdgeDCommonVar, + ScType::VarNode >> TRANSLATION_NODE_ALIAS, + ScType::VarCommonArc, USER_MESSAGE_ALIAS, - ScType::EdgeAccessVarPosPerm, - commonModule::Keynodes::nrel_sc_text_translation); - userMessageTemplate.Triple(TRANSLATION_NODE_ALIAS, ScType::EdgeAccessVarPosPerm, linkAddr); + ScType::VarPermPosArc, + MessageReplyKeynodes::nrel_sc_text_translation); + userMessageTemplate.Triple(TRANSLATION_NODE_ALIAS, ScType::VarPermPosArc, linkAddr); ScTemplateGenResult templateGenResult; m_context.GenerateByTemplate(userMessageTemplate, templateGenResult); @@ -134,11 +128,7 @@ ScAddr MessageReplyAgent::generateNonAtomicActionArgsSet(ScAddr const & messageA ScTemplate argsSetTemplate; argsSetTemplate.Quintuple( - ScType::NodeVar >> ARGS_SET_ALIAS, - ScType::EdgeAccessVarPosPerm, - messageAddr, - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); + ScType::VarNode >> ARGS_SET_ALIAS, ScType::VarPermPosArc, messageAddr, ScType::VarPermPosArc, ScKeynodes::rrel_1); ScTemplateGenResult templateGenResult; m_context.GenerateByTemplate(argsSetTemplate, templateGenResult); @@ -153,34 +143,33 @@ ScAddr MessageReplyAgent::generateAnswer(ScAddr const & messageAddr) static std::string const REPLY_MESSAGE_ALIAS = "_reply_message"; static std::string const ANSWER_ALIAS = "_answer"; - ScTemplate replySearchTemplate; - replySearchTemplate.Quintuple( + ScTemplate replySearchByTemplate; + replySearchByTemplate.Quintuple( messageAddr, - ScType::EdgeDCommonVar >> REPLY_MESSAGE_RELATION_PAIR_ARC_ALIAS, - ScType::NodeVar >> REPLY_MESSAGE_ALIAS, - ScType::EdgeAccessVarPosPerm >> REPLY_MESSAGE_RELATION_ACCESS_ARC_ALIAS, + ScType::VarCommonArc >> REPLY_MESSAGE_RELATION_PAIR_ARC_ALIAS, + ScType::VarNode >> REPLY_MESSAGE_ALIAS, + ScType::VarPermPosArc >> REPLY_MESSAGE_RELATION_ACCESS_ARC_ALIAS, MessageReplyKeynodes::nrel_reply); ScTemplateSearchResult searchResult; - m_context.SearchByTemplate(replySearchTemplate, searchResult); + m_context.SearchByTemplate(replySearchByTemplate, searchResult); if (searchResult.Size() != 1) { throw std::runtime_error("Reply message not generated."); } - ScAddr answerNodeAddr = m_context.GenerateNode(ScType::NodeConstStruct); + ScAddr answerNodeAddr = m_context.GenerateNode(ScType::ConstNodeStructure); ScTemplate answerGenerationTemplate; - answerGenerationTemplate.Triple(answerNodeAddr, ScType::EdgeAccessVarPosPerm, messageAddr); + answerGenerationTemplate.Triple(answerNodeAddr, ScType::VarPermPosArc, messageAddr); answerGenerationTemplate.Triple( - answerNodeAddr, ScType::EdgeAccessVarPosPerm, searchResult[0][REPLY_MESSAGE_RELATION_PAIR_ARC_ALIAS]); - answerGenerationTemplate.Triple(answerNodeAddr, ScType::EdgeAccessVarPosPerm, searchResult[0][REPLY_MESSAGE_ALIAS]); + answerNodeAddr, ScType::VarPermPosArc, searchResult[0][REPLY_MESSAGE_RELATION_PAIR_ARC_ALIAS]); + answerGenerationTemplate.Triple(answerNodeAddr, ScType::VarPermPosArc, searchResult[0][REPLY_MESSAGE_ALIAS]); answerGenerationTemplate.Triple( - answerNodeAddr, ScType::EdgeAccessVarPosPerm, searchResult[0][REPLY_MESSAGE_RELATION_ACCESS_ARC_ALIAS]); - answerGenerationTemplate.Triple(answerNodeAddr, ScType::EdgeAccessVarPosPerm, MessageReplyKeynodes::nrel_reply); + answerNodeAddr, ScType::VarPermPosArc, searchResult[0][REPLY_MESSAGE_RELATION_ACCESS_ARC_ALIAS]); + answerGenerationTemplate.Triple(answerNodeAddr, ScType::VarPermPosArc, MessageReplyKeynodes::nrel_reply); ScAddrVector classes; ScAddrVector classesArcs; - ScIterator3Ptr classesIt = - m_context.CreateIterator3(ScType::NodeConstClass, ScType::EdgeAccessConstPosPerm, messageAddr); + ScIterator3Ptr classesIt = m_context.CreateIterator3(ScType::ConstNodeClass, ScType::ConstPermPosArc, messageAddr); while (classesIt->Next()) { @@ -190,8 +179,8 @@ ScAddr MessageReplyAgent::generateAnswer(ScAddr const & messageAddr) for (size_t i = 0; i < classes.size(); i++) { - answerGenerationTemplate.Triple(answerNodeAddr, ScType::EdgeAccessVarPosPerm, classes.at(i)); - answerGenerationTemplate.Triple(answerNodeAddr, ScType::EdgeAccessVarPosPerm, classesArcs.at(i)); + answerGenerationTemplate.Triple(answerNodeAddr, ScType::VarPermPosArc, classes.at(i)); + answerGenerationTemplate.Triple(answerNodeAddr, ScType::VarPermPosArc, classesArcs.at(i)); } ScTemplateGenResult templateGenResult; @@ -203,7 +192,7 @@ ScAddr MessageReplyAgent::generateAnswer(ScAddr const & messageAddr) bool MessageReplyAgent::linkIsValid(ScAddr const & linkAddr) { - if (utils::CommonUtils::checkType(&m_context, linkAddr, ScType::LinkConst)) + if (utils::CommonUtils::checkType(&m_context, linkAddr, ScType::ConstNodeLink)) { if (!hasLanguage(linkAddr)) return false; @@ -211,12 +200,12 @@ bool MessageReplyAgent::linkIsValid(ScAddr const & linkAddr) bool isTextValid = textLinkIsValid(linkAddr); if (isSoundValid) { - SC_AGENT_LOG_DEBUG("Sound link is found"); + m_logger.Debug("Sound link is found"); return true; } if (isTextValid) { - SC_AGENT_LOG_DEBUG("Text link is found"); + m_logger.Debug("Text link is found"); return true; } } @@ -229,8 +218,8 @@ bool MessageReplyAgent::hasLanguage(ScAddr const & linkAddr) ScTemplate languageTemplate; languageTemplate.Triple( - MessageReplyKeynodes::languages, ScType::EdgeAccessVarPosPerm, ScType::NodeVarClass >> LINK_LANGUAGE_CLASS_ALIAS); - languageTemplate.Triple(LINK_LANGUAGE_CLASS_ALIAS, ScType::EdgeAccessVarPosPerm, linkAddr); + MessageReplyKeynodes::languages, ScType::VarPermPosArc, ScType::VarNodeClass >> LINK_LANGUAGE_CLASS_ALIAS); + languageTemplate.Triple(LINK_LANGUAGE_CLASS_ALIAS, ScType::VarPermPosArc, linkAddr); ScTemplateSearchResult searchResult; m_context.SearchByTemplate(languageTemplate, searchResult); return searchResult.Size() == 1; @@ -239,8 +228,8 @@ bool MessageReplyAgent::hasLanguage(ScAddr const & linkAddr) bool MessageReplyAgent::soundLinkIsValid(ScAddr const & linkAddr) { ScTemplate soundLinkTemplate; - soundLinkTemplate.Triple(MessageReplyKeynodes::concept_sound_file, ScType::EdgeAccessVarPosPerm, linkAddr); - soundLinkTemplate.Triple(MessageReplyKeynodes::format_wav, ScType::EdgeAccessVarPosPerm, linkAddr); + soundLinkTemplate.Triple(MessageReplyKeynodes::concept_sound_file, ScType::VarPermPosArc, linkAddr); + soundLinkTemplate.Triple(MessageReplyKeynodes::format_wav, ScType::VarPermPosArc, linkAddr); ScTemplateSearchResult searchResult; m_context.SearchByTemplate(soundLinkTemplate, searchResult); return searchResult.Size() == 1; @@ -249,7 +238,7 @@ bool MessageReplyAgent::soundLinkIsValid(ScAddr const & linkAddr) bool MessageReplyAgent::textLinkIsValid(ScAddr const & linkAddr) { ScTemplate textLinkTemplate; - textLinkTemplate.Triple(MessageReplyKeynodes::concept_text_file, ScType::EdgeAccessVarPosPerm, linkAddr); + textLinkTemplate.Triple(MessageReplyKeynodes::concept_text_file, ScType::VarPermPosArc, linkAddr); ScTemplateSearchResult searchResult; m_context.SearchByTemplate(textLinkTemplate, searchResult); return searchResult.Size() == 1; diff --git a/problem-solver/cxx/messageReplyModule/agent/MessageReplyAgent.hpp b/problem-solver/cxx/message-reply-module/agent/MessageReplyAgent.hpp similarity index 100% rename from problem-solver/cxx/messageReplyModule/agent/MessageReplyAgent.hpp rename to problem-solver/cxx/message-reply-module/agent/MessageReplyAgent.hpp diff --git a/problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.cpp b/problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.cpp similarity index 70% rename from problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.cpp rename to problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.cpp index 9c8a581276..5000005543 100644 --- a/problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.cpp +++ b/problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.cpp @@ -17,11 +17,7 @@ void MessageHistoryGenerator::addMessageToDialog(const ScAddr & dialogAddr, cons ScAddr lastMessageAddr; ScIterator5Ptr iterator5Ptr = context->CreateIterator5( - dialogAddr, - ScType::EdgeAccessConstPosPerm, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, - MessageReplyKeynodes::rrel_last); + dialogAddr, ScType::ConstPermPosArc, ScType::ConstNode, ScType::ConstPermPosArc, MessageReplyKeynodes::rrel_last); if (iterator5Ptr->Next()) lastMessageAddr = iterator5Ptr->Get(2); @@ -29,11 +25,7 @@ void MessageHistoryGenerator::addMessageToDialog(const ScAddr & dialogAddr, cons if (lastMessageAddr.IsValid()) { ScIterator5Ptr it5 = context->CreateIterator5( - dialogAddr, - ScType::EdgeAccessConstPosPerm, - lastMessageAddr, - ScType::EdgeAccessConstPosPerm, - MessageReplyKeynodes::rrel_last); + dialogAddr, ScType::ConstPermPosArc, lastMessageAddr, ScType::ConstPermPosArc, MessageReplyKeynodes::rrel_last); if (it5->Next()) context->EraseElement(it5->Get(3)); @@ -56,22 +48,22 @@ std::unique_ptr MessageHistoryGenerator::createNotFirstMessageInDial static std::string const NEXT_MESSAGE_ARC_ALIAS = "_next_message_arc"; ScAddr messageEdge; - ScIterator3Ptr iterator3Ptr = context->CreateIterator3(dialogAddr, ScType::EdgeAccessConstPosPerm, lastMessageAddr); + ScIterator3Ptr iterator3Ptr = context->CreateIterator3(dialogAddr, ScType::ConstPermPosArc, lastMessageAddr); if (iterator3Ptr->Next()) messageEdge = iterator3Ptr->Get(1); auto scTemplate = std::make_unique(); scTemplate->Quintuple( dialogAddr, - ScType::EdgeAccessVarPosPerm >> NEXT_MESSAGE_ARC_ALIAS, + ScType::VarPermPosArc >> NEXT_MESSAGE_ARC_ALIAS, messageAddr, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, MessageReplyKeynodes::rrel_last); scTemplate->Quintuple( messageEdge, - ScType::EdgeDCommonVar, + ScType::VarCommonArc, NEXT_MESSAGE_ARC_ALIAS, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, MessageReplyKeynodes::nrel_message_sequence); return scTemplate; @@ -82,14 +74,9 @@ std::unique_ptr MessageHistoryGenerator::createFirstMessageInDialogT const ScAddr & messageAddr) { auto scTemplate = std::make_unique(); + scTemplate->Quintuple(dialogAddr, ScType::VarPermPosArc, messageAddr, ScType::VarPermPosArc, ScKeynodes::rrel_1); scTemplate->Quintuple( - dialogAddr, ScType::EdgeAccessVarPosPerm, messageAddr, ScType::EdgeAccessVarPosPerm, ScKeynodes::rrel_1); - scTemplate->Quintuple( - dialogAddr, - ScType::EdgeAccessVarPosPerm, - messageAddr, - ScType::EdgeAccessVarPosPerm, - MessageReplyKeynodes::rrel_last); + dialogAddr, ScType::VarPermPosArc, messageAddr, ScType::VarPermPosArc, MessageReplyKeynodes::rrel_last); return scTemplate; } diff --git a/problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.hpp b/problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.hpp similarity index 94% rename from problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.hpp rename to problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.hpp index b30fe0e6d2..da568336ba 100644 --- a/problem-solver/cxx/messageReplyModule/generator/MessageHistoryGenerator.hpp +++ b/problem-solver/cxx/message-reply-module/generator/MessageHistoryGenerator.hpp @@ -1,6 +1,6 @@ #pragma once -#include "sc-memory/sc_memory.hpp" +#include #include diff --git a/problem-solver/cxx/messageReplyModule/keynodes/MessageReplyKeynodes.hpp b/problem-solver/cxx/message-reply-module/keynodes/MessageReplyKeynodes.hpp similarity index 51% rename from problem-solver/cxx/messageReplyModule/keynodes/MessageReplyKeynodes.hpp rename to problem-solver/cxx/message-reply-module/keynodes/MessageReplyKeynodes.hpp index 60ceec6f23..bb092fbf42 100644 --- a/problem-solver/cxx/messageReplyModule/keynodes/MessageReplyKeynodes.hpp +++ b/problem-solver/cxx/message-reply-module/keynodes/MessageReplyKeynodes.hpp @@ -7,31 +7,37 @@ namespace messageReplyModule class MessageReplyKeynodes : public ScKeynodes { public: - static inline ScKeynode const action_reply_to_message{"action_reply_to_message", ScType::NodeConstClass}; + static inline ScKeynode const action_interpret_non_atomic_action{ + "action_interpret_non_atomic_action", + ScType::ConstNodeClass}; - static inline ScKeynode const message_processing_program{"message_processing_program", ScType::NodeConst}; + static inline ScKeynode const action_reply_to_message{"action_reply_to_message", ScType::ConstNodeClass}; - static inline ScKeynode const nrel_authors{"nrel_authors", ScType::NodeConstNoRole}; + static inline ScKeynode const message_processing_program{"message_processing_program", ScType::ConstNode}; - static inline ScKeynode const concept_message{"concept_message", ScType::NodeConstClass}; + static inline ScKeynode const nrel_authors{"nrel_authors", ScType::ConstNodeNonRole}; - static inline ScKeynode const nrel_reply{"nrel_reply", ScType::NodeConstNoRole}; + static inline ScKeynode const concept_message{"concept_message", ScType::ConstNodeClass}; - static inline ScKeynode const format_wav{"format_wav", ScType::NodeConstClass}; + static inline ScKeynode const nrel_reply{"nrel_reply", ScType::ConstNodeNonRole}; - static inline ScKeynode const languages{"languages", ScType::NodeConst}; + static inline ScKeynode const format_wav{"format_wav", ScType::ConstNodeClass}; - static inline ScKeynode const concept_sound_file{"concept_sound_file", ScType::NodeConstClass}; + static inline ScKeynode const languages{"languages", ScType::ConstNode}; - static inline ScKeynode const concept_text_file{"concept_text_file", ScType::NodeConstClass}; + static inline ScKeynode const nrel_sc_text_translation{"nrel_sc_text_translation", ScType::ConstNodeNonRole}; - static inline ScKeynode const concept_dialogue{"concept_dialogue", ScType::NodeConstClass}; + static inline ScKeynode const concept_sound_file{"concept_sound_file", ScType::ConstNodeClass}; - static inline ScKeynode const rrel_last{"rrel_last", ScType::NodeConstRole}; + static inline ScKeynode const concept_text_file{"concept_text_file", ScType::ConstNodeClass}; - static inline ScKeynode const nrel_message_sequence{"nrel_message_sequence", ScType::NodeConstNoRole}; + static inline ScKeynode const concept_dialogue{"concept_dialogue", ScType::ConstNodeClass}; - static inline ScKeynode const myself{"myself", ScType::NodeConst}; + static inline ScKeynode const rrel_last{"rrel_last", ScType::ConstNodeRole}; + + static inline ScKeynode const nrel_message_sequence{"nrel_message_sequence", ScType::ConstNodeNonRole}; + + static inline ScKeynode const myself{"myself", ScType::ConstNode}; }; } // namespace messageReplyModule diff --git a/problem-solver/cxx/messageReplyModule/templates/MessageReplyTemplates.cpp b/problem-solver/cxx/message-reply-module/templates/MessageReplyTemplates.cpp similarity index 100% rename from problem-solver/cxx/messageReplyModule/templates/MessageReplyTemplates.cpp rename to problem-solver/cxx/message-reply-module/templates/MessageReplyTemplates.cpp diff --git a/problem-solver/cxx/messageReplyModule/templates/MessageReplyTemplates.hpp b/problem-solver/cxx/message-reply-module/templates/MessageReplyTemplates.hpp similarity index 90% rename from problem-solver/cxx/messageReplyModule/templates/MessageReplyTemplates.hpp rename to problem-solver/cxx/message-reply-module/templates/MessageReplyTemplates.hpp index 642e61e841..00a8c26b0e 100644 --- a/problem-solver/cxx/messageReplyModule/templates/MessageReplyTemplates.hpp +++ b/problem-solver/cxx/message-reply-module/templates/MessageReplyTemplates.hpp @@ -1,7 +1,7 @@ #pragma once -#include "sc-memory/sc_addr.hpp" -#include "sc-memory/sc_template.hpp" +#include +#include #include diff --git a/problem-solver/cxx/message-reply-module/test/CMakeLists.txt b/problem-solver/cxx/message-reply-module/test/CMakeLists.txt new file mode 100644 index 0000000000..367db45227 --- /dev/null +++ b/problem-solver/cxx/message-reply-module/test/CMakeLists.txt @@ -0,0 +1,28 @@ +file(GLOB REPLY_MODULE_TEST_AGENTS + "agent/*.cpp" "agent/*.hpp" +) + +add_library(message-reply-module-test-agents SHARED ${REPLY_MODULE_TEST_AGENTS}) +target_link_libraries(message-reply-module-test-agents + LINK_PUBLIC sc-machine::sc-builder-lib + LINK_PUBLIC common + LINK_PUBLIC message-reply-module +) +target_include_directories(message-reply-module-test-agents + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${MESSAGE_REPLY_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-reply-module-test-agents) +endif() + +make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units + NAME message-reply-module-tests + DEPENDS message-reply-module-test-agents + INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${MESSAGE_REPLY_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(message-reply-module-tests) +endif() diff --git a/problem-solver/cxx/messageReplyModule/test/agent/GenerateReplyMessageAgent.cpp b/problem-solver/cxx/message-reply-module/test/agent/GenerateReplyMessageAgent.cpp old mode 100755 new mode 100644 similarity index 63% rename from problem-solver/cxx/messageReplyModule/test/agent/GenerateReplyMessageAgent.cpp rename to problem-solver/cxx/message-reply-module/test/agent/GenerateReplyMessageAgent.cpp index ac57002cc9..1111ec746b --- a/problem-solver/cxx/messageReplyModule/test/agent/GenerateReplyMessageAgent.cpp +++ b/problem-solver/cxx/message-reply-module/test/agent/GenerateReplyMessageAgent.cpp @@ -1,9 +1,7 @@ #include "GenerateReplyMessageAgent.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" - -#include "keynodes/Keynodes.hpp" #include "keynodes/MessageReplyKeynodes.hpp" +#include using namespace messageReplyModuleTest; @@ -20,9 +18,9 @@ ScResult GenerateReplyMessageAgent::DoProgram(ScActionInitiatedEvent const & eve ScTemplate scTemplate; scTemplate.Quintuple( messageAddr, - ScType::EdgeDCommonVar, - ScType::NodeVar, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNode, + ScType::VarPermPosArc, messageReplyModule::MessageReplyKeynodes::nrel_reply); ScTemplateParams templateParams; ScTemplateGenResult templateGenResult; @@ -34,7 +32,7 @@ ScResult GenerateReplyMessageAgent::DoProgram(ScActionInitiatedEvent const & eve ScAddr GenerateReplyMessageAgent::GetActionClass() const { - return commonModule::Keynodes::action_interpret_non_atomic_action; + return messageReplyModule::MessageReplyKeynodes::action_interpret_non_atomic_action; } bool GenerateReplyMessageAgent::actionIsValid(const ScAddr & actionAddr) @@ -42,24 +40,15 @@ bool GenerateReplyMessageAgent::actionIsValid(const ScAddr & actionAddr) ScTemplate scTemplate; scTemplate.Quintuple( actionAddr, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, messageReplyModule::MessageReplyKeynodes::message_processing_program, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::rrel_1); scTemplate.Quintuple( - actionAddr, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_args_set", - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_2); + actionAddr, ScType::VarPermPosArc, ScType::VarNode >> "_args_set", ScType::VarPermPosArc, ScKeynodes::rrel_2); scTemplate.Quintuple( - "_args_set", - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_message", - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); - scTemplate.Triple( - messageReplyModule::MessageReplyKeynodes::concept_message, ScType::EdgeAccessVarPosPerm, "_message"); + "_args_set", ScType::VarPermPosArc, ScType::VarNode >> "_message", ScType::VarPermPosArc, ScKeynodes::rrel_1); + scTemplate.Triple(messageReplyModule::MessageReplyKeynodes::concept_message, ScType::VarPermPosArc, "_message"); ScTemplateSearchResult searchResult; m_context.SearchByTemplate(scTemplate, searchResult); return searchResult.Size() == 1; diff --git a/problem-solver/cxx/messageReplyModule/test/agent/GenerateReplyMessageAgent.hpp b/problem-solver/cxx/message-reply-module/test/agent/GenerateReplyMessageAgent.hpp similarity index 100% rename from problem-solver/cxx/messageReplyModule/test/agent/GenerateReplyMessageAgent.hpp rename to problem-solver/cxx/message-reply-module/test/agent/GenerateReplyMessageAgent.hpp diff --git a/problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.cpp b/problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.cpp similarity index 74% rename from problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.cpp rename to problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.cpp index 769bd56739..307acfb4fa 100644 --- a/problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.cpp +++ b/problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.cpp @@ -1,7 +1,5 @@ #include "NotGenerateReplyMessageAgent.hpp" -#include "keynodes/Keynodes.hpp" - using namespace messageReplyModuleTest; ScResult NotGenerateReplyMessageAgent::DoProgram(ScActionInitiatedEvent const & event, ScAction & action) @@ -11,5 +9,5 @@ ScResult NotGenerateReplyMessageAgent::DoProgram(ScActionInitiatedEvent const & ScAddr NotGenerateReplyMessageAgent::GetActionClass() const { - return commonModule::Keynodes::action_interpret_non_atomic_action; + return messageReplyModule::MessageReplyKeynodes::action_interpret_non_atomic_action; } diff --git a/problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.hpp b/problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.hpp similarity index 86% rename from problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.hpp rename to problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.hpp index 4ebfc855a9..ad6124a4b0 100644 --- a/problem-solver/cxx/messageReplyModule/test/agent/NotGenerateReplyMessageAgent.hpp +++ b/problem-solver/cxx/message-reply-module/test/agent/NotGenerateReplyMessageAgent.hpp @@ -1,17 +1,17 @@ #pragma once #include + #include "keynodes/MessageReplyKeynodes.hpp" namespace messageReplyModuleTest { class NotGenerateReplyMessageAgent : public ScActionInitiatedAgent { - public: +public: ScAddr GetActionClass() const override; ScResult DoProgram(ScActionInitiatedEvent const & event, ScAction & action) override; +}; - }; - -} // namespace commonTest +} // namespace messageReplyModuleTest diff --git a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentSoundLinkTestStructure.scs b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentSoundLinkTestStructure.scs similarity index 56% rename from problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentSoundLinkTestStructure.scs rename to problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentSoundLinkTestStructure.scs index 1b63ea73c0..829c99e18a 100644 --- a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentSoundLinkTestStructure.scs +++ b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentSoundLinkTestStructure.scs @@ -10,9 +10,9 @@ test_action_node *); -> rrel_2: chat_node;; -message_processing_program <- sc_node_struct;; +message_processing_program <- sc_node_structure;; languages - <- sc_node_not_relation; - -> lang_ru (* <- sc_node_not_relation;; *); - -> lang_en (* <- sc_node_not_relation;; *);; + <- sc_node_class; + -> lang_ru (* <- sc_node_class;; *); + -> lang_en (* <- sc_node_class;; *);; diff --git a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs similarity index 52% rename from problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs rename to problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs index 79c022cf4b..bdec2d95a8 100644 --- a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs +++ b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureFirstArgumentIsNotALink.scs @@ -9,9 +9,9 @@ test_action_node <- lang_en;; *);; -message_processing_program <- sc_node_struct;; +message_processing_program <- sc_node_structure;; languages - <- sc_node_not_relation; - -> lang_ru (* <- sc_node_not_relation;; *); - -> lang_en (* <- sc_node_not_relation;; *);; + <- sc_node_class; + -> lang_ru (* <- sc_node_class;; *); + -> lang_en (* <- sc_node_class;; *);; diff --git a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs similarity index 51% rename from problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs rename to problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs index ed02b24eb7..ecb1a163a1 100644 --- a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs +++ b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithIncorrectlySpecifiedLink.scs @@ -8,9 +8,9 @@ test_action_node <- lang_en;; *);; -message_processing_program <- sc_node_struct;; +message_processing_program <- sc_node_structure;; languages - <- sc_node_not_relation; - -> lang_ru (* <- sc_node_not_relation;; *); - -> lang_en (* <- sc_node_not_relation;; *);; + <- sc_node_class; + -> lang_ru (* <- sc_node_class;; *); + -> lang_en (* <- sc_node_class;; *);; diff --git a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithoutProcessingProgram.scs b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithoutProcessingProgram.scs similarity index 61% rename from problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithoutProcessingProgram.scs rename to problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithoutProcessingProgram.scs index 7fa39224ab..f606298e6b 100644 --- a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTestStructureWithoutProcessingProgram.scs +++ b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTestStructureWithoutProcessingProgram.scs @@ -10,6 +10,6 @@ test_action_node *);; languages - <- sc_node_not_relation; - -> lang_ru (* <- sc_node_not_relation;; *); - -> lang_en (* <- sc_node_not_relation;; *);; + <- sc_node_class; + -> lang_ru (* <- sc_node_class;; *); + -> lang_en (* <- sc_node_class;; *);; diff --git a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTextLinkTestStructure.scs b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTextLinkTestStructure.scs similarity index 54% rename from problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTextLinkTestStructure.scs rename to problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTextLinkTestStructure.scs index 36b5e43eba..2b9c6f1f46 100644 --- a/problem-solver/cxx/messageReplyModule/test/testStructures/replyMessageAgentTextLinkTestStructure.scs +++ b/problem-solver/cxx/message-reply-module/test/test-structures/replyMessageAgentTextLinkTestStructure.scs @@ -9,9 +9,9 @@ test_action_node *); -> rrel_2: chat_node;; -message_processing_program <- sc_node_struct;; +message_processing_program <- sc_node_structure;; languages - <- sc_node_not_relation; - -> lang_ru (* <- sc_node_not_relation;; *); - -> lang_en (* <- sc_node_not_relation;; *);; + <- sc_node_class; + -> lang_ru (* <- sc_node_class;; *); + -> lang_en (* <- sc_node_class;; *);; diff --git a/problem-solver/cxx/messageReplyModule/test/units/testMessageReplyAgent.cpp b/problem-solver/cxx/message-reply-module/test/units/testMessageReplyAgent.cpp similarity index 84% rename from problem-solver/cxx/messageReplyModule/test/units/testMessageReplyAgent.cpp rename to problem-solver/cxx/message-reply-module/test/units/testMessageReplyAgent.cpp index fee1723921..f4e56f8e9d 100644 --- a/problem-solver/cxx/messageReplyModule/test/units/testMessageReplyAgent.cpp +++ b/problem-solver/cxx/message-reply-module/test/units/testMessageReplyAgent.cpp @@ -1,17 +1,15 @@ #include +#include -#include "sc-builder/src/scs_loader.hpp" -#include "sc_test.hpp" - +#include "agent/GenerateReplyMessageAgent.hpp" #include "agent/MessageReplyAgent.hpp" -#include "keynodes/Keynodes.hpp" #include "keynodes/MessageReplyKeynodes.hpp" -#include "test/agent/GenerateReplyMessageAgent.hpp" +#include namespace messageReplyModuleTest { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = MESSAGE_REPLY_MODULE_TEST_SRC_PATH "/testStructures/"; +std::string const TEST_FILES_DIR_PATH = "../test-structures/"; int const WAIT_TIME = 5000; using MessageReplyAgentTest = ScMemoryTest; @@ -33,21 +31,21 @@ bool generatedMessageIsValid(ScMemoryContext * context, ScAddr const & soundLink ScTemplate scTemplate; scTemplate.Triple( messageReplyModule::MessageReplyKeynodes::concept_message, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_user_message"); + ScType::VarPermPosArc, + ScType::VarNode >> "_user_message"); scTemplate.Quintuple( "_user_message", - ScType::EdgeDCommonVar, - ScType::NodeVar, - ScType::EdgeAccessVarPosPerm, + ScType::VarCommonArc, + ScType::VarNode, + ScType::VarPermPosArc, messageReplyModule::MessageReplyKeynodes::nrel_authors); scTemplate.Quintuple( - ScType::NodeVar >> "_translation_node", - ScType::EdgeDCommonVar, + ScType::VarNode >> "_translation_node", + ScType::VarCommonArc, "_user_message", - ScType::EdgeAccessVarPosPerm, - commonModule::Keynodes::nrel_sc_text_translation); - scTemplate.Triple("_translation_node", ScType::EdgeAccessVarPosPerm, soundLinkAddr); + ScType::VarPermPosArc, + messageReplyModule::MessageReplyKeynodes::nrel_sc_text_translation); + scTemplate.Triple("_translation_node", ScType::VarPermPosArc, soundLinkAddr); ScTemplateSearchResult searchResult; context->SearchByTemplate(scTemplate, searchResult); return searchResult.Size() == 1; diff --git a/problem-solver/cxx/messageClassificationModule/test/tests.cmake b/problem-solver/cxx/messageClassificationModule/test/tests.cmake deleted file mode 100644 index 2fa5f7c1c7..0000000000 --- a/problem-solver/cxx/messageClassificationModule/test/tests.cmake +++ /dev/null @@ -1,11 +0,0 @@ -make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units - NAME message_topic_classification_tests_starter - DEPENDS messageClassification sc-builder-lib - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_MACHINE_ROOT}/sc-tools/sc-builder/src -) - -add_definitions(-DMESSAGE_TOPIC_CLASSIFICATION_MODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}") - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(message_topic_classification_tests_starter) -endif() diff --git a/problem-solver/cxx/messageProcessingModule/CMakeLists.txt b/problem-solver/cxx/messageProcessingModule/CMakeLists.txt deleted file mode 100644 index 958f53de9d..0000000000 --- a/problem-solver/cxx/messageProcessingModule/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -set(SOURCES - "MessageProcessingModule.cpp" - "agent/FindWordInSetByFirstLetterAgent.cpp" -) - -set(HEADERS - "MessageProcessingModule.hpp" - "keynodes/MessageProcessingKeynodes.hpp" - "agent/FindWordInSetByFirstLetterAgent.hpp" -) - -include_directories( - ${CMAKE_CURRENT_LIST_DIR} - ${SC_MEMORY_SRC} - ${SC_KPM_SRC} - ${DIALOG_CONTROL_MODULE_SRC} - ${SC_COMMON_MODULE_SRC} -) - -add_library(messageProcessingModule SHARED ${SOURCES} ${HEADERS}) - -target_link_libraries(messageProcessingModule sc-memory sc-agents-common common dialogControlModule) - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(messageProcessingModule) -endif() - -if(${SC_BUILD_TESTS}) - include(${CMAKE_CURRENT_LIST_DIR}/test/tests.cmake) -endif() diff --git a/problem-solver/cxx/messageProcessingModule/test/tests.cmake b/problem-solver/cxx/messageProcessingModule/test/tests.cmake deleted file mode 100644 index 74edaa92e3..0000000000 --- a/problem-solver/cxx/messageProcessingModule/test/tests.cmake +++ /dev/null @@ -1,11 +0,0 @@ -make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units - NAME message_processing_module_test_starter - DEPENDS sc-agents-common messageProcessingModule sc-builder-lib - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_MACHINE_ROOT}/sc-tools -) - -add_definitions(-DMESSAGE_PROCESSING_MODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}") - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(message_processing_module_test_starter) -endif() diff --git a/problem-solver/cxx/messageReplyModule/CMakeLists.txt b/problem-solver/cxx/messageReplyModule/CMakeLists.txt deleted file mode 100755 index 0664a2ba3e..0000000000 --- a/problem-solver/cxx/messageReplyModule/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -set(SOURCES - "MessageReplyModule.cpp" - "agent/MessageReplyAgent.cpp" - "generator/MessageHistoryGenerator.cpp" - "templates/MessageReplyTemplates.cpp" -) - -set(HEADERS - "MessageReplyModule.hpp" - "keynodes/MessageReplyKeynodes.hpp" - "agent/MessageReplyAgent.hpp" - "generator/MessageHistoryGenerator.hpp" - "templates/MessageReplyTemplates.hpp" -) - -include_directories( - ${CMAKE_CURRENT_LIST_DIR} - ${SC_MEMORY_SRC} - ${SC_KPM_SRC} - ${SC_TOOLS_SRC} - ${SC_COMMON_MODULE_SRC} -) - -add_library(messageReply SHARED ${SOURCES} ${HEADERS}) -target_link_libraries(messageReply sc-memory sc-agents-common common) - -if(${SC_BUILD_TESTS}) - include(${CMAKE_CURRENT_LIST_DIR}/test/tests.cmake) -endif() - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(messageReply) -endif() diff --git a/problem-solver/cxx/messageReplyModule/test/tests.cmake b/problem-solver/cxx/messageReplyModule/test/tests.cmake deleted file mode 100644 index e6d40572b0..0000000000 --- a/problem-solver/cxx/messageReplyModule/test/tests.cmake +++ /dev/null @@ -1,22 +0,0 @@ -file(GLOB REPLY_MODULE_TEST_AGENTS - "${CMAKE_CURRENT_LIST_DIR}/agent/*.cpp" "${CMAKE_CURRENT_LIST_DIR}/agent/*.hpp" -) -add_library(replyModuleTestAgents ${REPLY_MODULE_TEST_AGENTS}) -target_link_libraries( - replyModuleTestAgents - messageReply - sc-agents-common - common -) - -make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units - NAME message_reply_module_test_starter - DEPENDS sc-agents-common messageReply sc-builder-lib replyModuleTestAgents common - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_MACHINE_ROOT}/sc-tools -) - -add_definitions(-DMESSAGE_REPLY_MODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}") - -if(${SC_CLANG_FORMAT_CODE}) - target_clangformat_setup(message_reply_module_test_starter) -endif() diff --git a/problem-solver/cxx/non-atomic-action-interpreter-module/CMakeLists.txt b/problem-solver/cxx/non-atomic-action-interpreter-module/CMakeLists.txt new file mode 100755 index 0000000000..7b391a25c9 --- /dev/null +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/CMakeLists.txt @@ -0,0 +1,32 @@ +set(SOURCES + "NonAtomicActionInterpreterModule.cpp" + "agent/NonAtomicActionInterpreterAgent.cpp" + "interpreter/NonAtomicActionInterpreter.cpp" +) + +set(HEADERS + "NonAtomicActionInterpreterModule.hpp" + "agent/NonAtomicActionInterpreterAgent.hpp" + "interpreter/NonAtomicActionInterpreter.hpp" +) + +find_package(nlohmann_json REQUIRED) +find_package(CURL REQUIRED) + +add_library(non-atomic-action-interpreter-module SHARED ${SOURCES} ${HEADERS}) +target_link_libraries(non-atomic-action-interpreter-module + LINK_PUBLIC common +) +target_include_directories(non-atomic-action-interpreter-module + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) +set_target_properties(non-atomic-action-interpreter-module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${SC_EXTENSIONS_DIRECTORY}) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(non-atomic-action-interpreter-module) +endif() + +if(${SC_BUILD_TESTS}) + set(NON_ATOMIC_ACTION_INTERPRETER_MODULE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(test) +endif() diff --git a/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.cpp new file mode 100644 index 0000000000..2da7e0a1a8 --- /dev/null +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.cpp @@ -0,0 +1,7 @@ +#include "NonAtomicActionInterpreterModule.hpp" + +#include "agent/NonAtomicActionInterpreterAgent.hpp" + +using namespace nonAtomicActionInterpreterModule; + +SC_MODULE_REGISTER(NonAtomicActionInterpreterModule)->Agent(); diff --git a/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.hpp new file mode 100644 index 0000000000..76b967ffe7 --- /dev/null +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/NonAtomicActionInterpreterModule.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include + +namespace nonAtomicActionInterpreterModule +{ + +class NonAtomicActionInterpreterModule : public ScModule +{ +}; + +} // namespace nonAtomicActionInterpreterModule diff --git a/problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.cpp similarity index 88% rename from problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.cpp index 8181d6bccd..9b47dc4b87 100644 --- a/problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.cpp @@ -1,11 +1,10 @@ #include "NonAtomicActionInterpreterAgent.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" +#include +#include +#include -#include "keynodes/Keynodes.hpp" -#include "utils/RelationUtils.hpp" - -using namespace commonModule; +using namespace nonAtomicActionInterpreterModule; ScResult NonAtomicActionInterpreterAgent::DoProgram(ScActionInitiatedEvent const & event, ScAction & action) { @@ -25,7 +24,7 @@ ScResult NonAtomicActionInterpreterAgent::DoProgram(ScActionInitiatedEvent const } catch (std::exception & ex) { - SC_AGENT_LOG_ERROR(ex.what()); + m_logger.Error(ex.what()); return action.FinishUnsuccessfully(); } @@ -36,7 +35,7 @@ ScResult NonAtomicActionInterpreterAgent::DoProgram(ScActionInitiatedEvent const } catch (std::runtime_error & ex) { - SC_AGENT_LOG_ERROR(ex.what()); + m_logger.Error(ex.what()); return action.FinishUnsuccessfully(); } @@ -45,7 +44,7 @@ ScResult NonAtomicActionInterpreterAgent::DoProgram(ScActionInitiatedEvent const ScAddr NonAtomicActionInterpreterAgent::GetActionClass() const { - return Keynodes::action_interpret_non_atomic_action; + return commonModule::Keynodes::action_interpret_non_atomic_action; } void NonAtomicActionInterpreterAgent::generateNonAtomicActionTemplate( @@ -91,7 +90,7 @@ ScTemplateParams NonAtomicActionInterpreterAgent::createTemplateParams( if (!argument.IsValid()) break; ScIterator5Ptr variablesIterator5 = m_context.CreateIterator5( - templateKeyElement, ScType::EdgeAccessVarPosPerm, ScType::NodeVar, ScType::EdgeAccessVarPosPerm, role); + templateKeyElement, ScType::VarPermPosArc, ScType::VarNode, ScType::VarPermPosArc, role); if (variablesIterator5->Next()) templateParams.Add(m_context.GetElementSystemIdentifier(variablesIterator5->Get(2)), argument); } @@ -104,7 +103,7 @@ ScAddr NonAtomicActionInterpreterAgent::replaceNonAtomicAction( ScAddr const & templateAddr, ScTemplateParams & templateParams) { - ScAddr keyElementReplacement = m_context.GenerateNode(ScType::NodeConst); + ScAddr keyElementReplacement = m_context.GenerateNode(ScType::ConstNode); ScAddr templateKeyElement; templateKeyElement = getTemplateKeyElement(templateAddr); templateParams.Add(m_context.GetElementSystemIdentifier(templateKeyElement), keyElementReplacement); diff --git a/problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.hpp similarity index 90% rename from problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.hpp index 9cc6a9bdd8..f83dc41e9d 100644 --- a/problem-solver/cxx/commonModule/agent/NonAtomicActionInterpreterAgent.hpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/agent/NonAtomicActionInterpreterAgent.hpp @@ -4,7 +4,7 @@ #include "interpreter/NonAtomicActionInterpreter.hpp" -namespace commonModule +namespace nonAtomicActionInterpreterModule { class NonAtomicActionInterpreterAgent : public ScActionInitiatedAgent { @@ -29,4 +29,4 @@ class NonAtomicActionInterpreterAgent : public ScActionInitiatedAgent void initFields(); }; -} // namespace commonModule +} // namespace nonAtomicActionInterpreterModule diff --git a/problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.cpp similarity index 82% rename from problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.cpp index e37985bf13..4679fd6858 100644 --- a/problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.cpp @@ -1,10 +1,9 @@ #include "NonAtomicActionInterpreter.hpp" -#include "sc-agents-common/utils/IteratorUtils.hpp" +#include +#include -#include "keynodes/Keynodes.hpp" - -using namespace commonModule; +using namespace nonAtomicActionInterpreterModule; NonAtomicActionInterpreter::NonAtomicActionInterpreter(ScAgentContext * context) : context(context) { @@ -12,12 +11,12 @@ NonAtomicActionInterpreter::NonAtomicActionInterpreter(ScAgentContext * context) void NonAtomicActionInterpreter::interpret(ScAddr const & nonAtomicActionAddr) { - ScAddr decompositionTuple = - utils::IteratorUtils::getAnyByInRelation(context, nonAtomicActionAddr, Keynodes::nrel_decomposition_of_action); + ScAddr decompositionTuple = utils::IteratorUtils::getAnyByInRelation( + context, nonAtomicActionAddr, commonModule::Keynodes::nrel_decomposition_of_action); ScAddr action = getFirstSubAction(decompositionTuple); while (action.IsValid()) { - if (!context->CheckConnector(decompositionTuple, action, ScType::EdgeAccessConstPosPerm)) + if (!context->CheckConnector(decompositionTuple, action, ScType::ConstPermPosArc)) { SC_THROW_EXCEPTION(utils::ExceptionItemNotFound, "Action is not belongs to nonatomic action decomposition."); } @@ -50,13 +49,12 @@ void NonAtomicActionInterpreter::applyAction(ScAddr const & actionAddr) ScAddr NonAtomicActionInterpreter::getNextAction(ScAddr const & actionAddr) { ScAddr nextAction; - if (context->CheckConnector(ScKeynodes::action_finished_successfully, actionAddr, ScType::EdgeAccessConstPosPerm)) + if (context->CheckConnector(ScKeynodes::action_finished_successfully, actionAddr, ScType::ConstPermPosArc)) { SC_LOG_DEBUG(getClassNameForLog() + ": Atomic action finished successfully."); nextAction = getThenAction(actionAddr); } - else if (context->CheckConnector( - ScKeynodes::action_finished_unsuccessfully, actionAddr, ScType::EdgeAccessConstPosPerm)) + else if (context->CheckConnector(ScKeynodes::action_finished_unsuccessfully, actionAddr, ScType::ConstPermPosArc)) { SC_LOG_DEBUG(getClassNameForLog() + ": Atomic action finished unsuccessfully."); nextAction = getElseAction(actionAddr); @@ -72,7 +70,7 @@ ScAddr NonAtomicActionInterpreter::getNextAction(ScAddr const & actionAddr) ScAddr NonAtomicActionInterpreter::getThenAction(ScAddr const & actionAddr) { - ScAddr nextAction = utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, Keynodes::nrel_then); + ScAddr nextAction = utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, commonModule::Keynodes::nrel_then); if (!nextAction.IsValid()) { SC_LOG_DEBUG(getClassNameForLog() + ": Action with nrel_then relation not found, searching for nrel_goto instead"); @@ -83,7 +81,7 @@ ScAddr NonAtomicActionInterpreter::getThenAction(ScAddr const & actionAddr) ScAddr NonAtomicActionInterpreter::getElseAction(ScAddr const & actionAddr) { - ScAddr nextAction = utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, Keynodes::nrel_else); + ScAddr nextAction = utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, commonModule::Keynodes::nrel_else); if (!nextAction.IsValid()) { SC_LOG_DEBUG(getClassNameForLog() + ": Action with nrel_else relation not found, searching for nrel_goto instead"); @@ -94,7 +92,7 @@ ScAddr NonAtomicActionInterpreter::getElseAction(ScAddr const & actionAddr) ScAddr NonAtomicActionInterpreter::getGoToAction(ScAddr const & actionAddr) { - return utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, Keynodes::nrel_goto); + return utils::IteratorUtils::getAnyByOutRelation(context, actionAddr, commonModule::Keynodes::nrel_goto); } std::string NonAtomicActionInterpreter::getClassNameForLog() diff --git a/problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.hpp similarity index 87% rename from problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.hpp index d390348796..caeadf1478 100644 --- a/problem-solver/cxx/commonModule/interpreter/NonAtomicActionInterpreter.hpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/interpreter/NonAtomicActionInterpreter.hpp @@ -2,8 +2,9 @@ #include -namespace commonModule +namespace nonAtomicActionInterpreterModule { + class NonAtomicActionInterpreter { public: @@ -31,4 +32,4 @@ class NonAtomicActionInterpreter static std::string getClassNameForLog(); }; -} // namespace commonModule +} // namespace nonAtomicActionInterpreterModule diff --git a/problem-solver/cxx/non-atomic-action-interpreter-module/test/CMakeLists.txt b/problem-solver/cxx/non-atomic-action-interpreter-module/test/CMakeLists.txt new file mode 100644 index 0000000000..ed952c9d32 --- /dev/null +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/CMakeLists.txt @@ -0,0 +1,26 @@ +file(GLOB non-atomic-action-interpreter-module_TEST_AGENTS + "agent/*.cpp" "agent/*.hpp" + "keynodes/*.cpp" "keynodes/*.hpp" +) + +add_library(non-atomic-action-interpreter-module-test-agents SHARED ${non-atomic-action-interpreter-module_TEST_AGENTS}) +target_link_libraries(non-atomic-action-interpreter-module-test-agents + LINK_PUBLIC non-atomic-action-interpreter-module +) +target_include_directories(non-atomic-action-interpreter-module-test-agents + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(non-atomic-action-interpreter-module-test-agents) +endif() + +make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units + NAME non-atomic-action-interpreter-module-tests + DEPENDS sc-machine::sc-builder-lib non-atomic-action-interpreter-module-test-agents + INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${NON_ATOMIC_ACTION_INTERPRETER_MODULE_SRC} +) + +if(${SC_CLANG_FORMAT_CODE}) + target_clangformat_setup(non-atomic-action-interpreter-module-tests) +endif() diff --git a/problem-solver/cxx/commonModule/test/agent/AssignDynamicArgumentTestAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/AssignDynamicArgumentTestAgent.cpp similarity index 74% rename from problem-solver/cxx/commonModule/test/agent/AssignDynamicArgumentTestAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/AssignDynamicArgumentTestAgent.cpp index 96c46c2797..317f35ae64 100755 --- a/problem-solver/cxx/commonModule/test/agent/AssignDynamicArgumentTestAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/AssignDynamicArgumentTestAgent.cpp @@ -1,13 +1,13 @@ #include "AssignDynamicArgumentTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "keynodes/TestKeynodes.hpp" using namespace commonTest; ScResult AssignDynamicArgumentTestAgent::DoProgram(ScActionInitiatedEvent const & event, ScAction & action) { ScAddr dynamicArgument = action.GetArgument(ScKeynodes::rrel_1); - m_context.GenerateConnector(ScType::EdgeAccessConstPosTemp, dynamicArgument, TestKeynodes::test_node); + m_context.GenerateConnector(ScType::ConstTempPosArc, dynamicArgument, TestKeynodes::test_node); return action.FinishSuccessfully(); } diff --git a/problem-solver/cxx/commonModule/test/agent/AssignDynamicArgumentTestAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/AssignDynamicArgumentTestAgent.hpp similarity index 100% rename from problem-solver/cxx/commonModule/test/agent/AssignDynamicArgumentTestAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/AssignDynamicArgumentTestAgent.hpp diff --git a/problem-solver/cxx/commonModule/test/agent/CheckDynamicArgumentTestAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/CheckDynamicArgumentTestAgent.cpp old mode 100755 new mode 100644 similarity index 64% rename from problem-solver/cxx/commonModule/test/agent/CheckDynamicArgumentTestAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/CheckDynamicArgumentTestAgent.cpp index bb8c1646eb..85abcfe762 --- a/problem-solver/cxx/commonModule/test/agent/CheckDynamicArgumentTestAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/CheckDynamicArgumentTestAgent.cpp @@ -1,6 +1,6 @@ #include "CheckDynamicArgumentTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "keynodes/TestKeynodes.hpp" using namespace commonTest; @@ -8,12 +8,8 @@ ScResult CheckDynamicArgumentTestAgent::DoProgram(ScActionInitiatedEvent const & { ScTemplate scTemplate; scTemplate.Quintuple( - action, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_dynamic_argument", - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); - scTemplate.Triple("_dynamic_argument", ScType::EdgeAccessVarPosTemp, TestKeynodes::test_node); + action, ScType::VarPermPosArc, ScType::VarNode >> "_dynamic_argument", ScType::VarPermPosArc, ScKeynodes::rrel_1); + scTemplate.Triple("_dynamic_argument", ScType::VarTempPosArc, TestKeynodes::test_node); ScTemplateSearchResult results; m_context.SearchByTemplate(scTemplate, results); diff --git a/problem-solver/cxx/commonModule/test/agent/CheckDynamicArgumentTestAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/CheckDynamicArgumentTestAgent.hpp similarity index 100% rename from problem-solver/cxx/commonModule/test/agent/CheckDynamicArgumentTestAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/CheckDynamicArgumentTestAgent.hpp diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp similarity index 89% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp index e13171d851..405f1c3585 100755 --- a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedSuccessfullyTestAgent.cpp @@ -1,6 +1,6 @@ #include "QuestionFinishedSuccessfullyTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "keynodes/TestKeynodes.hpp" using namespace commonTest; diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedSuccessfullyTestAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedSuccessfullyTestAgent.hpp similarity index 100% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedSuccessfullyTestAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedSuccessfullyTestAgent.hpp diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedTestAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedTestAgent.cpp similarity index 88% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedTestAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedTestAgent.cpp index cfc4b5238d..ea69a48865 100755 --- a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedTestAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedTestAgent.cpp @@ -1,6 +1,6 @@ #include "QuestionFinishedTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "keynodes/TestKeynodes.hpp" using namespace commonTest; diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedTestAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedTestAgent.hpp similarity index 100% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedTestAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedTestAgent.hpp diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp similarity index 90% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp index 1f54a510d9..078a2c5aa2 100755 --- a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedUnsuccessfullyTestAgent.cpp @@ -1,6 +1,6 @@ #include "QuestionFinishedUnsuccessfullyTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "keynodes/TestKeynodes.hpp" using namespace commonTest; diff --git a/problem-solver/cxx/commonModule/test/agent/QuestionFinishedUnsuccessfullyTestAgent.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedUnsuccessfullyTestAgent.hpp similarity index 100% rename from problem-solver/cxx/commonModule/test/agent/QuestionFinishedUnsuccessfullyTestAgent.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/agent/QuestionFinishedUnsuccessfullyTestAgent.hpp diff --git a/problem-solver/cxx/commonModule/test/keynodes/TestKeynodes.hpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/keynodes/TestKeynodes.hpp similarity index 74% rename from problem-solver/cxx/commonModule/test/keynodes/TestKeynodes.hpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/keynodes/TestKeynodes.hpp index 7f472d84ab..eb999a081f 100755 --- a/problem-solver/cxx/commonModule/test/keynodes/TestKeynodes.hpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/keynodes/TestKeynodes.hpp @@ -8,25 +8,25 @@ namespace commonTest class TestKeynodes : public ScKeynodes { public: - static inline ScKeynode const test_node{"test_node", ScType::NodeConst}; + static inline ScKeynode const test_node{"test_node", ScType::ConstNode}; static inline ScKeynode const assign_dynamic_argument_test_action{ "assign_dynamic_argument_test_action", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; static inline ScKeynode const check_dynamic_argument_test_action{ "check_dynamic_argument_test_action", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; static inline ScKeynode const successfully_finished_test_action{ "successfully_finished_test_action", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; static inline ScKeynode const unsuccessfully_finished_test_action{ "unsuccessfully_finished_test_action", - ScType::NodeConstClass}; + ScType::ConstNodeClass}; - static inline ScKeynode const finished_test_action{"finished_test_action", ScType::NodeConstClass}; + static inline ScKeynode const finished_test_action{"finished_test_action", ScType::ConstNodeClass}; }; } // namespace commonTest diff --git a/problem-solver/cxx/commonModule/test/testStructures/argumentsMatching.scs b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/argumentsMatching.scs similarity index 76% rename from problem-solver/cxx/commonModule/test/testStructures/argumentsMatching.scs rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/argumentsMatching.scs index 6e65796d31..a90ad6fee1 100644 --- a/problem-solver/cxx/commonModule/test/testStructures/argumentsMatching.scs +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/argumentsMatching.scs @@ -11,12 +11,12 @@ test_action_node offset = [* _compound_action - _<- test_nonatomic_action; - _<- action; + <-_ test_nonatomic_action; + <-_ action; _-> rrel_1:: _arg1_var; _-> rrel_2:: _arg2_var; _-> rrel_3:: _arg3_var; - _<= nrel_decomposition_of_action:: .._decomposition_tuple;; + <=_ nrel_decomposition_of_action:: .._decomposition_tuple;; .._decomposition_tuple _-> rrel_1:: _first_action; @@ -24,14 +24,14 @@ _compound_action _first_action _=> nrel_goto:: _second_action; - _<- finished_test_action; - _<- action; + <-_ finished_test_action; + <-_ action; _-> rrel_1:: _arg1_var; _-> rrel_2:: _arg3_var;; _second_action - _<- finished_test_action; - _<- action; + <-_ finished_test_action; + <-_ action; _-> rrel_1:: _arg2_var;; *];; diff --git a/problem-solver/cxx/commonModule/test/testStructures/dynamicArguments.scs b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/dynamicArguments.scs similarity index 66% rename from problem-solver/cxx/commonModule/test/testStructures/dynamicArguments.scs rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/dynamicArguments.scs index 974ca64601..df454ede08 100644 --- a/problem-solver/cxx/commonModule/test/testStructures/dynamicArguments.scs +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/dynamicArguments.scs @@ -6,9 +6,9 @@ test_action_node offset = [* _compound_action - _<- test_nonatomic_action; - _<- action; - _<= nrel_decomposition_of_action:: .._decomposition_tuple;; + <-_ test_nonatomic_action; + <-_ action; + <=_ nrel_decomposition_of_action:: .._decomposition_tuple;; .._decomposition_tuple _-> rrel_1:: _first_action; @@ -16,14 +16,14 @@ _compound_action _first_action _=> nrel_goto:: _second_action; - _<- assign_dynamic_argument_test_action; - _<- action; + <-_ assign_dynamic_argument_test_action; + <-_ action; _-> rrel_1:: .._dynamic_argument;; _second_action - _<- check_dynamic_argument_test_action; - _<- action; + <-_ check_dynamic_argument_test_action; + <-_ action; _-> rrel_1:: .._dynamic_argument;; *];; diff --git a/problem-solver/cxx/commonModule/test/testStructures/finishedSubaction.scs b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/finishedSubaction.scs similarity index 69% rename from problem-solver/cxx/commonModule/test/testStructures/finishedSubaction.scs rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/finishedSubaction.scs index 7de7cc8b7a..9b040fe9fe 100644 --- a/problem-solver/cxx/commonModule/test/testStructures/finishedSubaction.scs +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/finishedSubaction.scs @@ -6,9 +6,9 @@ test_action_node offset = [* _compound_action - _<- test_nonatomic_action; - _<- action; - _<= nrel_decomposition_of_action:: .._decomposition_tuple;; + <-_ test_nonatomic_action; + <-_ action; + <=_ nrel_decomposition_of_action:: .._decomposition_tuple;; .._decomposition_tuple _-> rrel_1:: _first_action; @@ -18,12 +18,12 @@ _compound_action _first_action _=> nrel_goto:: _second_goto_action; - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; _second_goto_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; *];; offset -> rrel_key_sc_element: _compound_action;; diff --git a/problem-solver/cxx/commonModule/test/testStructures/sucsesfullyFinishedSubaction.scs b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/sucsesfullyFinishedSubaction.scs similarity index 65% rename from problem-solver/cxx/commonModule/test/testStructures/sucsesfullyFinishedSubaction.scs rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/sucsesfullyFinishedSubaction.scs index 887ea07bb8..faf5ca6f27 100644 --- a/problem-solver/cxx/commonModule/test/testStructures/sucsesfullyFinishedSubaction.scs +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/sucsesfullyFinishedSubaction.scs @@ -6,9 +6,9 @@ test_action_node offset = [* _compound_action - _<- test_nonatomic_action; - _<- action; - _<= nrel_decomposition_of_action:: .._decomposition_tuple;; + <-_ test_nonatomic_action; + <-_ action; + <=_ nrel_decomposition_of_action:: .._decomposition_tuple;; .._decomposition_tuple _-> rrel_1:: _first_action; @@ -20,20 +20,20 @@ _first_action _=> nrel_then:: _second_true_action; _=> nrel_else:: _second_false_action; _=> nrel_goto:: _second_goto_action; - _<- successfully_finished_test_action; - _<- action;; + <-_ successfully_finished_test_action; + <-_ action;; _second_true_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; _second_false_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; _second_goto_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; *];; offset -> rrel_key_sc_element: _compound_action;; diff --git a/problem-solver/cxx/commonModule/test/testStructures/unsucsesfullyFinishedSubaction.scs b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/unsucsesfullyFinishedSubaction.scs similarity index 65% rename from problem-solver/cxx/commonModule/test/testStructures/unsucsesfullyFinishedSubaction.scs rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/unsucsesfullyFinishedSubaction.scs index fbceeb4c10..9913993169 100644 --- a/problem-solver/cxx/commonModule/test/testStructures/unsucsesfullyFinishedSubaction.scs +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/test-structures/unsucsesfullyFinishedSubaction.scs @@ -6,9 +6,9 @@ test_action_node offset = [* _compound_action - _<- test_nonatomic_action; - _<- action; - _<= nrel_decomposition_of_action:: .._decomposition_tuple;; + <-_ test_nonatomic_action; + <-_ action; + <=_ nrel_decomposition_of_action:: .._decomposition_tuple;; .._decomposition_tuple _-> rrel_1:: _first_action; @@ -20,20 +20,20 @@ _first_action _=> nrel_then:: _second_true_action; _=> nrel_else:: _second_false_action; _=> nrel_goto:: _second_goto_action; - _<- unsuccessfully_finished_test_action; - _<- action;; + <-_ unsuccessfully_finished_test_action; + <-_ action;; _second_true_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; _second_false_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; _second_goto_action - _<- finished_test_action; - _<- action;; + <-_ finished_test_action; + <-_ action;; *];; offset -> rrel_key_sc_element: _compound_action;; diff --git a/problem-solver/cxx/commonModule/test/units/testNonAtomicActionInterpreterAgent.cpp b/problem-solver/cxx/non-atomic-action-interpreter-module/test/units/testNonAtomicActionInterpreterAgent.cpp similarity index 78% rename from problem-solver/cxx/commonModule/test/units/testNonAtomicActionInterpreterAgent.cpp rename to problem-solver/cxx/non-atomic-action-interpreter-module/test/units/testNonAtomicActionInterpreterAgent.cpp index 7557985757..eb61a283dc 100644 --- a/problem-solver/cxx/commonModule/test/units/testNonAtomicActionInterpreterAgent.cpp +++ b/problem-solver/cxx/non-atomic-action-interpreter-module/test/units/testNonAtomicActionInterpreterAgent.cpp @@ -1,23 +1,22 @@ #include +#include -#include "sc-builder/src/scs_loader.hpp" -#include "sc_test.hpp" - +#include "agent/AssignDynamicArgumentTestAgent.hpp" +#include "agent/CheckDynamicArgumentTestAgent.hpp" #include "agent/NonAtomicActionInterpreterAgent.hpp" -#include "keynodes/Keynodes.hpp" -#include "test/agent/AssignDynamicArgumentTestAgent.hpp" -#include "test/agent/CheckDynamicArgumentTestAgent.hpp" -#include "test/agent/QuestionFinishedSuccessfullyTestAgent.hpp" -#include "test/agent/QuestionFinishedTestAgent.hpp" -#include "test/agent/QuestionFinishedUnsuccessfullyTestAgent.hpp" -#include "test/keynodes/TestKeynodes.hpp" +#include "agent/QuestionFinishedSuccessfullyTestAgent.hpp" +#include "agent/QuestionFinishedTestAgent.hpp" +#include "agent/QuestionFinishedUnsuccessfullyTestAgent.hpp" +#include "keynodes/TestKeynodes.hpp" +#include +#include -using namespace commonModule; +using namespace nonAtomicActionInterpreterModule; namespace commonTest { ScsLoader loader; -std::string const TEST_FILES_DIR_PATH = COMMON_MODULE_TEST_SRC_PATH "/testStructures/"; +std::string const TEST_FILES_DIR_PATH = "../test-structures/"; int const WAIT_TIME = 5000; using NonAtomicActionInterpreterTest = ScMemoryTest; @@ -48,20 +47,16 @@ ScAction getFirstAction(ScAgentContext & context) ScTemplate scTemplate; scTemplate.Triple( context.SearchElementBySystemIdentifier("test_nonatomic_action"), - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_nonAtomicAction"); + ScType::VarPermPosArc, + ScType::VarNode >> "_nonAtomicAction"); scTemplate.Quintuple( - ScType::NodeVar >> "_tuple", - ScType::EdgeDCommonVar, + ScType::VarNode >> "_tuple", + ScType::VarCommonArc, "_nonAtomicAction", - ScType::EdgeAccessVarPosPerm, - Keynodes::nrel_decomposition_of_action); + ScType::VarPermPosArc, + commonModule::Keynodes::nrel_decomposition_of_action); scTemplate.Quintuple( - "_tuple", - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_firstAction", - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); + "_tuple", ScType::VarPermPosArc, ScType::VarNode >> "_firstAction", ScType::VarPermPosArc, ScKeynodes::rrel_1); ScTemplateSearchResult results; context.SearchByTemplate(scTemplate, results); @@ -93,9 +88,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkDynamicArguments) ScIterator5Ptr iterator5 = context.CreateIterator5( action, - ScType::EdgeDCommonConst, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, + ScType::ConstCommonArc, + ScType::ConstNode, + ScType::ConstPermPosArc, context.SearchElementBySystemIdentifier("nrel_goto")); EXPECT_TRUE(iterator5->Next()); action = context.ConvertToAction(iterator5->Get(2)); @@ -104,13 +99,8 @@ TEST_F(NonAtomicActionInterpreterTest, checkDynamicArguments) ScTemplate scTemplate; scTemplate.Quintuple( - action, - ScType::EdgeAccessVarPosPerm, - ScType::NodeVar >> "_dynamic_argument", - ScType::EdgeAccessVarPosPerm, - ScKeynodes::rrel_1); - scTemplate.Triple( - "_dynamic_argument", ScType::EdgeAccessVarPosTemp, TestKeynodes::test_node >> "_dynamic_argument_value"); + action, ScType::VarPermPosArc, ScType::VarNode >> "_dynamic_argument", ScType::VarPermPosArc, ScKeynodes::rrel_1); + scTemplate.Triple("_dynamic_argument", ScType::VarTempPosArc, TestKeynodes::test_node >> "_dynamic_argument_value"); ScTemplateSearchResult results; context.SearchByTemplate(scTemplate, results); EXPECT_TRUE(results.Size() == 1); @@ -140,9 +130,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkThenSequence) ScIterator5Ptr iterator5 = context.CreateIterator5( action, - ScType::EdgeDCommonConst, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, + ScType::ConstCommonArc, + ScType::ConstNode, + ScType::ConstPermPosArc, context.SearchElementBySystemIdentifier("nrel_then")); EXPECT_TRUE(iterator5->Next()); action = context.ConvertToAction(iterator5->Get(2)); @@ -172,9 +162,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkElseSequence) ScIterator5Ptr iterator5 = context.CreateIterator5( action, - ScType::EdgeDCommonConst, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, + ScType::ConstCommonArc, + ScType::ConstNode, + ScType::ConstPermPosArc, context.SearchElementBySystemIdentifier("nrel_else")); EXPECT_TRUE(iterator5->Next()); action = context.ConvertToAction(iterator5->Get(2)); @@ -207,9 +197,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkGotoSequence) ScIterator5Ptr iterator5 = context.CreateIterator5( action, - ScType::EdgeDCommonConst, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, + ScType::ConstCommonArc, + ScType::ConstNode, + ScType::ConstPermPosArc, context.SearchElementBySystemIdentifier("nrel_goto")); EXPECT_TRUE(iterator5->Next()); action = context.ConvertToAction(iterator5->Get(2)); @@ -240,15 +230,15 @@ TEST_F(NonAtomicActionInterpreterTest, checkArgumentsMatching) ScTemplate scTemplate; scTemplate.Quintuple( action, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, context.SearchElementBySystemIdentifier("arg1"), - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::rrel_1); scTemplate.Quintuple( action, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, context.SearchElementBySystemIdentifier("arg3"), - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::rrel_2); ScTemplateSearchResult results; context.SearchByTemplate(scTemplate, results); @@ -256,9 +246,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkArgumentsMatching) ScIterator5Ptr iterator5 = context.CreateIterator5( action, - ScType::EdgeDCommonConst, - ScType::NodeConst, - ScType::EdgeAccessConstPosPerm, + ScType::ConstCommonArc, + ScType::ConstNode, + ScType::ConstPermPosArc, context.SearchElementBySystemIdentifier("nrel_goto")); EXPECT_TRUE(iterator5->Next()); action = context.ConvertToAction(iterator5->Get(2)); @@ -266,9 +256,9 @@ TEST_F(NonAtomicActionInterpreterTest, checkArgumentsMatching) scTemplate.Quintuple( action, - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, context.SearchElementBySystemIdentifier("arg2"), - ScType::EdgeAccessVarPosPerm, + ScType::VarPermPosArc, ScKeynodes::rrel_1); context.SearchByTemplate(scTemplate, results); EXPECT_TRUE(results.Size() == 1); diff --git a/problem-solver/py/Dockerfile b/problem-solver/py/Dockerfile index 9fde10b651..92ea0b1449 100644 --- a/problem-solver/py/Dockerfile +++ b/problem-solver/py/Dockerfile @@ -1,15 +1,11 @@ -FROM python:3.11-slim as base +FROM python:3.11-slim AS base USER root WORKDIR /nika/problem-solver -RUN apt-get update && apt-get install -y --no-install-recommends tini - COPY ./problem-solver/py/requirements.txt . -COPY scripts/install_py_sc_server_deps.sh scripts/set_vars.sh ./scripts/ RUN --mount=type=cache,target=/root/.cache/pip pip3 install -r requirements.txt COPY problem-solver/py/ ./problem-solver/py/ -COPY scripts/run_py_sc_server.sh ./scripts/ -ENTRYPOINT [ "/usr/bin/tini", "--", "./scripts/run_py_sc_server.sh" ] +ENTRYPOINT [ "python3", "problem-solver/py/server.py" ] diff --git a/problem-solver/py/modules/messageProcessingModule/WeatherAgent.py b/problem-solver/py/modules/messageProcessingModule/WeatherAgent.py index 4e30fd9ef5..a59fb90d74 100644 --- a/problem-solver/py/modules/messageProcessingModule/WeatherAgent.py +++ b/problem-solver/py/modules/messageProcessingModule/WeatherAgent.py @@ -4,26 +4,24 @@ """ import logging from sc_client.models import ScAddr, ScLinkContentType, ScTemplate -from sc_client.constants import sc_types -from sc_client.client import template_search +from sc_client.constants import sc_type +from sc_client.client import search_by_template -from sc_kpm import ScAgentClassic, ScModule, ScResult, ScServer +from sc_kpm import ScAgentClassic, ScResult from sc_kpm.sc_sets import ScSet from sc_kpm.utils import ( - create_link, + generate_link, get_link_content_data, - check_edge, create_edge, - delete_edges, - get_element_by_role_relation, - get_element_by_norole_relation, - get_system_idtf, - get_edge + check_connector, generate_connector, + erase_connectors, + search_element_by_non_role_relation, + get_element_system_identifier, + search_connector ) from sc_kpm.utils.action_utils import ( - create_action_answer, + generate_action_result, finish_action_with_status, get_action_arguments, - get_element_by_role_relation ) from sc_kpm import ScKeynodes @@ -53,19 +51,19 @@ def run(self, action_node: ScAddr) -> ScResult: try: message_addr = get_action_arguments(action_node, 1)[0] message_type = ScKeynodes.resolve( - "concept_message_about_weather", sc_types.NODE_CONST_CLASS) + "concept_message_about_weather", sc_type.CONST_NODE_CLASS) - if not check_edge(sc_types.EDGE_ACCESS_VAR_POS_PERM, message_type, message_addr): + if not check_connector(sc_type.VAR_PERM_POS_ARC, message_type, message_addr): self.logger.info( f"WeatherAgent: the message isn’t about weather") return ScResult.OK - idtf = ScKeynodes.resolve("nrel_idtf", sc_types.NODE_CONST_NOROLE) + idtf = ScKeynodes.resolve("nrel_idtf", sc_type.CONST_NODE_NON_ROLE) answer_phrase = ScKeynodes.resolve( - "show_weather_answer_phrase", sc_types.NODE_CONST_CLASS) - rrel_entity = ScKeynodes.resolve("rrel_entity", sc_types.NODE_ROLE) + "show_weather_answer_phrase", sc_type.CONST_NODE_CLASS) + rrel_entity = ScKeynodes.resolve("rrel_entity", sc_type.CONST_NODE_ROLE) nrel_temperature = ScKeynodes.resolve( - "nrel_temperature", sc_types.NODE_NOROLE) + "nrel_temperature", sc_type.CONST_NODE_NON_ROLE) city_addr, country_addr = self.get_entity_addr( message_addr, rrel_entity) @@ -75,7 +73,7 @@ def run(self, action_node: ScAddr) -> ScResult: # if there is no such сity in country if not country_addr is None: - if not get_edge(country_addr, city_addr, sc_types.EDGE_D_COMMON_VAR): + if not search_connector(country_addr, city_addr, sc_type.VAR_COMMON_ARC): self.set_unknown_city_link(action_node, answer_phrase) return ScResult.OK @@ -83,14 +81,14 @@ def run(self, action_node: ScAddr) -> ScResult: if not city_addr.is_valid(): self.set_unknown_city_link(action_node, answer_phrase) return ScResult.OK - city_idtf_link = self.get_ru_idtf(city_addr) - answer_city_idtf_link = get_element_by_norole_relation( + city_idtf_link = self.get_ru_main_identifier(city_addr) + answer_city_idtf_link = search_element_by_non_role_relation( src=city_addr, nrel_node=idtf) if not city_idtf_link.is_valid(): self.set_unknown_city_link(action_node, answer_phrase) return ScResult.OK - except: - self.logger.info(f"WeatherAgent: finished with an error") + except Exception as e: + self.logger.info(f"WeatherAgent: finished with an error {e}") return ScResult.ERROR entity_idtf = get_link_content_data(city_idtf_link) @@ -100,20 +98,20 @@ def run(self, action_node: ScAddr) -> ScResult: except requests.exceptions.ConnectionError: self.logger.info(f"WeatherAgent: finished with connection error") return ScResult.ERROR - link = create_link( - str(temperature), ScLinkContentType.STRING, link_type=sc_types.LINK_CONST) - temperature_edge = create_edge( - sc_types.EDGE_D_COMMON_CONST, city_addr, link) - create_edge( - sc_types.EDGE_ACCESS_CONST_POS_PERM, nrel_temperature, temperature_edge) - create_action_answer(action_node, link) + link = generate_link( + str(temperature), ScLinkContentType.STRING, link_type=sc_type.CONST_NODE_LINK) + temperature_edge = generate_connector( + sc_type.CONST_COMMON_ARC, city_addr, link) + generate_connector( + sc_type.CONST_PERM_POS_ARC, nrel_temperature, temperature_edge) + generate_action_result(action_node, link) return ScResult.OK def get_weather(self, entity_idtf: ScAddr, city_addr: ScAddr, country_addr: ScAddr) -> float: # get entity longitude and latitude if country_addr is not None: - country = get_link_content_data(self.get_ru_idtf(country_addr)) + country = get_link_content_data(self.get_ru_main_identifier(country_addr)) coordinates = requests.get( f'https://geocode.maps.co/search?city={entity_idtf}&country={country}').json()[0] else: @@ -129,7 +127,7 @@ def get_weather(self, entity_idtf: ScAddr, city_addr: ScAddr, country_addr: ScAd main_data = weather_data["current_weather"] temperature = main_data["temperature"] self.logger.info( - f"WeatherAgent: The temperature in {get_system_idtf(city_addr)} is {temperature}°C") + f"WeatherAgent: The temperature in {get_element_system_identifier(city_addr)} is {temperature}°C") return temperature def set_unknown_city_link(self, action_node: ScAddr, answer_phrase: ScAddr) -> None: @@ -137,55 +135,55 @@ def set_unknown_city_link(self, action_node: ScAddr, answer_phrase: ScAddr) -> N "unknown_city_for_weather_agent_message_text", None) if not unknown_city_link.is_valid(): raise - create_edge( - sc_types.EDGE_ACCESS_CONST_POS_PERM, answer_phrase, unknown_city_link) - create_action_answer(action_node, unknown_city_link) + generate_connector( + sc_type.CONST_PERM_POS_ARC, answer_phrase, unknown_city_link) + generate_action_result(action_node, unknown_city_link) - def get_ru_idtf(self, entity_addr: ScAddr) -> ScAddr: + def get_ru_main_identifier(self, entity_addr: ScAddr) -> ScAddr: main_idtf = ScKeynodes.resolve( - "nrel_main_idtf", sc_types.NODE_CONST_NOROLE) - lang_ru = ScKeynodes.resolve("lang_ru", sc_types.NODE_CONST_CLASS) + "nrel_main_idtf", sc_type.CONST_NODE_NON_ROLE) + lang_ru = ScKeynodes.resolve("lang_ru", sc_type.CONST_NODE_CLASS) template = ScTemplate() - template.triple_with_relation( + template.quintuple( entity_addr, - sc_types.EDGE_D_COMMON_VAR, - sc_types.LINK, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_COMMON_ARC, + sc_type.VAR_NODE_LINK, + sc_type.VAR_PERM_POS_ARC, main_idtf, ) - search_results = template_search(template) + search_results = search_by_template(template) for result in search_results: idtf = result[2] - lang_edge = get_edge( - lang_ru, idtf, sc_types.EDGE_ACCESS_VAR_POS_PERM) + lang_edge = search_connector( + lang_ru, idtf, sc_type.VAR_PERM_POS_ARC) if lang_edge: return idtf - return get_element_by_norole_relation( + return search_element_by_non_role_relation( src=entity_addr, nrel_node=main_idtf) def get_entity_addr(self, message_addr: ScAddr, rrel_entity: ScAddr): - rrel_entity = ScKeynodes.resolve("rrel_entity", sc_types.NODE_ROLE) + rrel_entity = ScKeynodes.resolve("rrel_entity", sc_type.CONST_NODE_ROLE) concept_country = ScKeynodes.resolve( - "concept_country", sc_types.NODE_CONST_CLASS) + "concept_country", sc_type.CONST_NODE_CLASS) template = ScTemplate() # entity node or link - template.triple_with_relation( + template.quintuple( message_addr, - sc_types.EDGE_ACCESS_VAR_POS_PERM, - sc_types.VAR, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_PERM_POS_ARC, + sc_type.VAR, + sc_type.VAR_PERM_POS_ARC, rrel_entity, ) - search_results = template_search(template) + search_results = search_by_template(template) if len(search_results) == 0: return ScAddr(0), None entity = search_results[0][2] if len(search_results) == 1: return entity, None # check country position in search_results - country_edge = get_edge( - concept_country, entity, sc_types.EDGE_ACCESS_VAR_POS_PERM) + country_edge = search_connector( + concept_country, entity, sc_type.VAR_PERM_POS_ARC) if country_edge: return search_results[1][2], entity else: @@ -198,13 +196,13 @@ def clear_previous_answer(self, entity, nrel_temperature, answer_phrase): return template = ScTemplate() - template.triple_with_relation( + template.quintuple( entity, - sc_types.EDGE_D_COMMON_VAR, - sc_types.LINK, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_COMMON_ARC, + sc_type.VAR_NODE_LINK, + sc_type.VAR_PERM_POS_ARC, nrel_temperature ) - search_results = template_search(template) + search_results = search_by_template(template) for result in search_results: - delete_edges(result[0], result[2], sc_types.EDGE_D_COMMON_VAR) + erase_connectors(result[0], result[2], sc_type.VAR_COMMON_ARC) diff --git a/problem-solver/py/requirements.txt b/problem-solver/py/requirements.txt index 817e380ef2..f72a280c7a 100644 --- a/problem-solver/py/requirements.txt +++ b/problem-solver/py/requirements.txt @@ -1,3 +1,3 @@ -py-sc-kpm==0.3.0 -py-sc-client==0.3.1 +py-sc-kpm==0.4.0 +py-sc-client==0.4.0 requests==2.31.0 diff --git a/problem-solver/py/server.py b/problem-solver/py/server.py index c206aa99fd..5ce4a6da94 100644 --- a/problem-solver/py/server.py +++ b/problem-solver/py/server.py @@ -29,11 +29,11 @@ def main(args: dict): if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( - '--protocol', type=str, dest=SC_SERVER_PROTOCOL, default=SC_SERVER_PROTOCOL_DEFAULT, help="Sc-server protocol") + '--protocol', type=str, dest=SC_SERVER_PROTOCOL, default=SC_SERVER_PROTOCOL_DEFAULT, help="sc-server protocol") parser.add_argument( - '--host', type=str, dest=SC_SERVER_HOST, default=SC_SERVER_HOST_DEFAULT, help="Sc-server host") + '--host', type=str, dest=SC_SERVER_HOST, default=SC_SERVER_HOST_DEFAULT, help="sc-server host") parser.add_argument( - '--port', type=int, dest=SC_SERVER_PORT, default=SC_SERVER_PORT_DEFAULT, help="Sc-server port") + '--port', type=int, dest=SC_SERVER_PORT, default=SC_SERVER_PORT_DEFAULT, help="sc-server port") args = parser.parse_args() main(vars(args)) diff --git a/problem-solver/py/tests/base_testcase.py b/problem-solver/py/tests/base_testcase.py index d5375c49ba..0f50cffd30 100644 --- a/problem-solver/py/tests/base_testcase.py +++ b/problem-solver/py/tests/base_testcase.py @@ -1,7 +1,7 @@ import logging from unittest import TestCase -from sc_client.client import create_elements_by_scs +from sc_client.client import generate_elements_by_scs from sc_kpm import ScServer from pathlib import Path from tests import TESTS_DIR @@ -9,7 +9,7 @@ logging.basicConfig( level=logging.INFO, format="%(asctime)s | %(name)s | %(message)s", datefmt="[%d-%b-%y %H:%M:%S]" ) -SC_SERVER_URL = "ws://localhost:8091/ws_json" +SC_SERVER_URL = "ws://localhost:8090/ws_json" class BaseTestCase(TestCase): def setUp(self) -> None: @@ -26,7 +26,7 @@ def load_scs(scs_file_path): for item in scs_file.split(separator) if item and item != "\n" ] - return create_elements_by_scs(scs_lines) + return generate_elements_by_scs(scs_lines) def tearDown(self) -> None: self.server.disconnect() diff --git a/problem-solver/py/tests/processing_module/test_message_processing_module.py b/problem-solver/py/tests/processing_module/test_message_processing_module.py index 99ccf0c0b6..b76754149f 100644 --- a/problem-solver/py/tests/processing_module/test_message_processing_module.py +++ b/problem-solver/py/tests/processing_module/test_message_processing_module.py @@ -1,8 +1,8 @@ from pathlib import Path from modules.messageProcessingModule.MessageProcessingModule import MessageProcessingModule -from sc_client.client import template_search -from sc_client.constants import sc_types +from sc_client.client import search_by_template +from sc_client.constants import sc_type from sc_client.models import ScTemplate, ScAddr from sc_kpm import ScKeynodes from sc_kpm.identifiers import CommonIdentifiers @@ -50,7 +50,7 @@ def test_message_is_not_about_weather(self): self.server.add_modules(module) with self.server.register_modules(): message_node = ScKeynodes.resolve( - "test_message", sc_types.NODE) + "test_message", sc_type.NODE) self.assertTrue(message_node.is_valid()) self.run_weather_agent(message_node) @@ -68,20 +68,20 @@ def test_generate_message_by_unknown_city(self): self.server.add_modules(module) with self.server.register_modules(): message_node = ScKeynodes.resolve( - "test_message", sc_types.NODE) + "test_message", sc_type.NODE) self.assertTrue(message_node.is_valid()) self.run_weather_agent(message_node) answer_node = ScKeynodes.resolve( - "show_weather_answer_phrase", sc_types.NODE) + "show_weather_answer_phrase", sc_type.NODE) template = ScTemplate() template.triple( answer_node, - sc_types.EDGE_ACCESS_VAR_POS_PERM, - sc_types.LINK, + sc_type.VAR_PERM_POS_ARC, + sc_type.VAR_NODE_LINK, ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 1) link = search_results[0][2] @@ -101,20 +101,20 @@ def test_generate_message_by_unknown_country(self): self.server.add_modules(module) with self.server.register_modules(): message_node = ScKeynodes.resolve( - "test_message", sc_types.NODE) + "test_message", sc_type.NODE) self.assertTrue(message_node.is_valid()) self.run_weather_agent(message_node) answer_node = ScKeynodes.resolve( - "show_weather_answer_phrase", sc_types.NODE) + "show_weather_answer_phrase", sc_type.NODE) template = ScTemplate() template.triple( answer_node, - sc_types.EDGE_ACCESS_VAR_POS_PERM, - sc_types.LINK, + sc_type.VAR_PERM_POS_ARC, + sc_type.VAR_NODE_LINK, ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 1) link = search_results[0][2] @@ -134,36 +134,36 @@ def test_generate_message_by_known_city(self): self.server.add_modules(module) with self.server.register_modules(): message_node = ScKeynodes.resolve( - "test_message", sc_types.NODE) + "test_message", sc_type.CONST_NODE) self.assertTrue(message_node.is_valid()) self.run_weather_agent(message_node) - rrel_entity = ScKeynodes.resolve("rrel_entity", sc_types.NODE_ROLE) + rrel_entity = ScKeynodes.resolve("rrel_entity", sc_type.CONST_NODE_ROLE) template = ScTemplate() - template.triple_with_relation( + template.quintuple( message_node, - sc_types.EDGE_ACCESS_VAR_POS_PERM, - sc_types.NODE, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_PERM_POS_ARC, + sc_type.VAR_NODE, + sc_type.VAR_PERM_POS_ARC, rrel_entity ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 1) entity = search_results[0][2] nrel_temperature = ScKeynodes.resolve( - "nrel_temperature", sc_types.NODE_NOROLE) + "nrel_temperature", sc_type.CONST_NODE_NON_ROLE) template = ScTemplate() - template.triple_with_relation( + template.quintuple( entity, - sc_types.EDGE_D_COMMON_VAR, - sc_types.LINK, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_COMMON_ARC, + sc_type.VAR_NODE_LINK, + sc_type.VAR_PERM_POS_ARC, nrel_temperature ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 1) self.server.remove_modules(module) @@ -178,44 +178,44 @@ def test_generate_message_by_known_city_and_country(self): self.server.add_modules(module) with self.server.register_modules(): message_node = ScKeynodes.resolve( - "test_message_city_and_country", sc_types.NODE) + "test_message_city_and_country", sc_type.CONST_NODE) self.assertTrue(message_node.is_valid()) self.run_weather_agent(message_node) - rrel_entity = ScKeynodes.resolve("rrel_entity", sc_types.NODE_ROLE) + rrel_entity = ScKeynodes.resolve("rrel_entity", sc_type.CONST_NODE_ROLE) template = ScTemplate() - template.triple_with_relation( + template.quintuple( message_node, - sc_types.EDGE_ACCESS_VAR_POS_PERM, - sc_types.NODE, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_PERM_POS_ARC, + sc_type.VAR_NODE, + sc_type.VAR_PERM_POS_ARC, rrel_entity ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 2) concept_country = ScKeynodes.resolve( - "concept_country", sc_types.NODE) + "concept_country", sc_type.NODE) country_edge = get_edge( - concept_country, search_results[0][2], sc_types.EDGE_ACCESS_VAR_POS_PERM) + concept_country, search_results[0][2], sc_type.VAR_PERM_POS_ARC) if country_edge: entity = search_results[1][2] else: entity = search_results[0][2] nrel_temperature = ScKeynodes.resolve( - "nrel_temperature", sc_types.NODE_NOROLE) + "nrel_temperature", sc_type.CONST_NODE_NON_ROLE) template = ScTemplate() - template.triple_with_relation( + template.quintuple( entity, - sc_types.EDGE_D_COMMON_VAR, - sc_types.LINK, - sc_types.EDGE_ACCESS_VAR_POS_PERM, + sc_type.VAR_COMMON_ARC, + sc_type.VAR_NODE_LINK, + sc_type.VAR_PERM_POS_ARC, nrel_temperature ) - search_results = template_search(template) + search_results = search_by_template(template) self.assertEqual(len(search_results), 1) self.server.remove_modules(module) diff --git a/problem-solver/sc-machine b/problem-solver/sc-machine deleted file mode 160000 index 635c317717..0000000000 --- a/problem-solver/sc-machine +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 635c3177176d23c6bc00d12f98ee9c4f3ef7fcb7 diff --git a/repo.path b/repo.path index aa8558967c..9b8a3fd28e 100644 --- a/repo.path +++ b/repo.path @@ -1,9 +1,9 @@ # Change start page -!kb/ims.ostis.kb/ui/ui_start_sc_element.scs -!kb/ims.ostis.kb/ims/knowledge_base_IMS.scs +!knowledge-base/ims.ostis.kb/ui/ui_start_sc_element.scs +!knowledge-base/ims.ostis.kb/ims/knowledge_base_IMS.scs # Do not build examples -!kb/pattern +!knowledge-base/pattern #components -kb +knowledge-base diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..9dd0a5df1e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +argparse +websocket-client diff --git a/sc-web b/sc-web index c180329326..d4429622e3 160000 --- a/sc-web +++ b/sc-web @@ -1 +1 @@ -Subproject commit c180329326cfee18af5f6487b2d3932fd0a0128e +Subproject commit d4429622e303c00bc5a52c342f01579e93add2e0 diff --git a/scripts/build_kb.sh b/scripts/build_kb.sh deleted file mode 100755 index e56f274774..0000000000 --- a/scripts/build_kb.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_MACHINE_PATH}/scripts/build_kb.sh" -i "${APP_ROOT_PATH}/repo.path" diff --git a/scripts/build_problem_solver.sh b/scripts/build_problem_solver.sh deleted file mode 100755 index 9e9123c783..0000000000 --- a/scripts/build_problem_solver.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_MACHINE_PATH}/scripts/build_sc_machine.sh" "$@" diff --git a/scripts/build_sc_web.sh b/scripts/build_sc_web.sh deleted file mode 100755 index 17567fc19c..0000000000 --- a/scripts/build_sc_web.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_WEB_PATH}/scripts/build_sc_web.sh" "$@" diff --git a/scripts/clang/check_formatting.sh b/scripts/clang/check_formatting.sh index 69dd5ad6cf..a90aabdebb 100755 --- a/scripts/clang/check_formatting.sh +++ b/scripts/clang/check_formatting.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash set -eo pipefail -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/../set_vars.sh" - -cmake -B "${BUILD_PATH}" -DSC_CLANG_FORMAT_CODE=ON "${APP_ROOT_PATH}" -cmake --build "${BUILD_PATH}" --target clangformat_check "${APP_ROOT_PATH}" +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat_check diff --git a/scripts/clang/format_code.sh b/scripts/clang/format_code.sh index faf769a98f..682b283c24 100755 --- a/scripts/clang/format_code.sh +++ b/scripts/clang/format_code.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash set -eo pipefail -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/../set_vars.sh" - -cmake -B "${BUILD_PATH}" -DSC_CLANG_FORMAT_CODE=ON "${APP_ROOT_PATH}" -cmake --build "${BUILD_PATH}" --target clangformat "${APP_ROOT_PATH}" +cmake --preset release-with-tests-conan -DSC_CLANG_FORMAT_CODE=ON +cmake --build --preset release --target clangformat diff --git a/scripts/docker_entrypoint.sh b/scripts/docker_entrypoint.sh new file mode 100755 index 0000000000..374e984629 --- /dev/null +++ b/scripts/docker_entrypoint.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash +set -eo pipefail # stop script execution if any errors are encountered + +# script help info +function usage() { + cat < -c [knowledge base sources path] + $0 run -b -c [sc-machine args] + + Options: + build : Rebuilds KB from sources (provide absolute path to the source folder or repo.path file). + run : Starts sc-machine. Arguments passed to this command will be redirected to sc-machine binary. You can set sc-server options from common config. + + Setting REBUILD_KB environment variable inside the container will trigger a KB rebuild. Setting custom starting point for sc-builder can be done using KB_PATH environment variable, "/knowledge-base" is used as a default KB_PATH. + CONFIG_PATH and BINARY_PATH environment variables can provide the respective settings if the use of flags is undesirable. + EXTENSIONS_PATH can be set to specify the path for extensions used by sc-machine. + +USAGE + exit 1 +} + +function build_kb() { + if [ -e "$1" ]; + then + "$BINARY_PATH"/sc-builder --clear -c "$CONFIG_PATH" -i "$@" + elif [ -e "$KB_PATH" ]; + then + echo "$KB_PATH is set as a KB path by the environment variable" + "$BINARY_PATH"/sc-builder --clear -c "$CONFIG_PATH" -i "$KB_PATH" + else + echo "Invalid KB source path provided." + exit 1 + fi +} + +function start_machine { + if [ -n "$REBUILD_KB" ] && [ "$REBUILD_KB" -eq 1 ]; + then + # this expands to $KB_PATH if it's non-null and expands to "/knowledge-base" otherwise. + build_kb "${KB_PATH:-"/knowledge-base"}" + fi + + # if arguments were provided, use them instead of the default ones. + if [ $# -eq 0 ]; + then + # you should provide the config file path and host settings yourself in case you want to use custom options! + echo "Using default arguments." + "$BINARY_PATH"/sc-machine -c "$CONFIG_PATH" -e "$EXTENSIONS_PATH" + else + "$BINARY_PATH"/sc-machine "$@" + fi +} + +parse_options() { + while getopts "b:c:h" opt; do + case $opt in + b) BINARY_PATH=$OPTARG ;; + c) CONFIG_PATH=$OPTARG ;; + h) usage ;; + \?) echoerr "Invalid option -$OPTARG"; usage ;; + esac + done + shift $((OPTIND - 1)) +} + +# parse script commands +case $1 in + +# rebuild KB in case the build command was passed +build) + shift 1; + parse_options "$@" + build_kb "$@" + ;; + +# launch sc-machine +run) + shift 1; + parse_options "$@" + start_machine "$@" + ;; + +# show help +--help|help|-h) + usage + ;; + +# All invalid commands will invoke usage page +*) + usage + ;; +esac diff --git a/scripts/healthcheck.py b/scripts/healthcheck.py new file mode 100644 index 0000000000..487369d638 --- /dev/null +++ b/scripts/healthcheck.py @@ -0,0 +1,52 @@ +import argparse + +import json +from websocket import create_connection, _exceptions + +SC_SERVER_HOST = "host" +SC_SERVER_PORT = "port" +SC_SERVER_TIMEOUT = "timeout" + +SC_SERVER_HOST_DEFAULT = "localhost" +SC_SERVER_PORT_DEFAULT = "8090" +SC_SERVER_TIMEOUT_VALUE = 5 # seconds + + +def main(args: dict): + try: + ws = create_connection(f"ws://{args[SC_SERVER_HOST]}:{args[SC_SERVER_PORT]}", timeout=args[SC_SERVER_TIMEOUT]) + except _exceptions.WebSocketTimeoutException as e: + print("Connection sc-server timed out") + exit(1) + except Exception as e: + print(e) + exit(1) + + ws.send(json.dumps({"type": "healthcheck"})) + + try: + result = ws.recv() + except _exceptions.WebSocketTimeoutException as e: + print("Sc-server response timed out") + exit(1) + + ws.close() + + if json.loads(result) == "OK": + exit(0) + else: + exit(1) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + + parser.add_argument( + '--host', type=str, dest=SC_SERVER_HOST, default=SC_SERVER_HOST_DEFAULT, help="Sc-server host") + parser.add_argument( + '--port', type=int, dest=SC_SERVER_PORT, default=SC_SERVER_PORT_DEFAULT, help="Sc-server port") + parser.add_argument( + '--timeout', '-t', type=int, dest=SC_SERVER_TIMEOUT, default=SC_SERVER_TIMEOUT_VALUE, help="Sc-server timeout") + args = parser.parse_args() + + main(vars(args)) diff --git a/scripts/install_cxx_problem_solver.sh b/scripts/install_cxx_problem_solver.sh new file mode 100755 index 0000000000..5b6b28a037 --- /dev/null +++ b/scripts/install_cxx_problem_solver.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +set -eo pipefail + +# Constants +SC_MACHINE_VERSION="0.10.0" +SC_MACHINE_DESTINATION_DIR="install/sc-machine" + +SCL_MACHINE_VERSION="0.3.0" +SCL_MACHINE_DESTINATION_DIR="install/scl-machine" + +NIKA_VERSION="0.1.0" +NIKA_DESTINATION_DIR="install/problem-solver" + +get_archive_name() { + local os_name=$(uname -s) + case "$os_name" in + Linux) + echo "$1-$2-Linux.tar.gz" + ;; + Darwin) + echo "$1-$2-Darwin.tar.gz" + ;; + *) + echo "Unsupported operating system: $os_name" + exit 1 + ;; + esac +} + +download_archive() { + local url="$1" + echo "Downloading ${url}..." + if ! curl -LO "${url}"; then + echo "Error downloading ${url}" + exit 1 + fi +} + +extract_archive() { + local archive="$1" + local destination_dir="$2" + echo "Creating directory ${destination_dir} and extracting files..." + mkdir -p "${destination_dir}" && tar -xvzf "${archive}" -C "${destination_dir}" --strip-components 1 +} + +cleanup() { + local archive="$1" + local destination_dir="$2" + echo "Cleaning up..." + rm -f "${archive}" + rm -rf "${destination_dir}/include" +} + +SC_MACHINE_ARCHIVE=$(get_archive_name "sc-machine" "${SC_MACHINE_VERSION}") +SC_MACHINE_URL="https://github.com/ostis-ai/sc-machine/releases/download/${SC_MACHINE_VERSION}/${SC_MACHINE_ARCHIVE}" + +download_archive "${SC_MACHINE_URL}" +extract_archive "${SC_MACHINE_ARCHIVE}" "${SC_MACHINE_DESTINATION_DIR}" +cleanup "${SC_MACHINE_ARCHIVE}" "${SC_MACHINE_DESTINATION_DIR}" + +SCL_MACHINE_ARCHIVE=$(get_archive_name "scl-machine" "${SCL_MACHINE_VERSION}") +SCL_MACHINE_URL="https://github.com/NikitaZotov/scl-machine/releases/download/${SCL_MACHINE_VERSION}/${SCL_MACHINE_ARCHIVE}" + +download_archive "${SCL_MACHINE_URL}" +extract_archive "${SCL_MACHINE_ARCHIVE}" "${SCL_MACHINE_DESTINATION_DIR}" +cleanup "${SCL_MACHINE_ARCHIVE}" "${SCL_MACHINE_DESTINATION_DIR}" + +NIKA_ARCHIVE=$(get_archive_name "nika" "${NIKA_VERSION}") +NIKA_URL="https://github.com/ostis-apps/nika/releases/download/${NIKA_VERSION}/${NIKA_ARCHIVE}" + +download_archive "${NIKA_URL}" +extract_archive "${NIKA_ARCHIVE}" "${NIKA_DESTINATION_DIR}" +cleanup "${NIKA_ARCHIVE}" "${NIKA_DESTINATION_DIR}" + +echo "Installation of NIKA complete!" diff --git a/scripts/install_interface_deps.sh b/scripts/install_interface_deps.sh deleted file mode 100755 index b873b8c0d9..0000000000 --- a/scripts/install_interface_deps.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_WEB_PATH}/scripts/install_deps_ubuntu.sh" diff --git a/scripts/install_problem_solver_deps.sh b/scripts/install_problem_solver_deps.sh deleted file mode 100755 index 72cf86fcf0..0000000000 --- a/scripts/install_problem_solver_deps.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" - -packagelist=( - python3-pip - python3-setuptools - build-essential - cmake - nlohmann-json3-dev - libssl-dev - file - libcurl4-openssl-dev -) -sudo apt-get install -y --no-install-recommends "${packagelist[@]}" - -"${SC_MACHINE_PATH}/scripts/install_deps_ubuntu.sh" --dev diff --git a/scripts/install_py_sc_server_deps.sh b/scripts/install_py_sc_server_deps.sh deleted file mode 100755 index de77a110c5..0000000000 --- a/scripts/install_py_sc_server_deps.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" - -pip3 install -r "$APP_ROOT_PATH/problem-solver/py/requirements.txt" diff --git a/scripts/install_submodules.sh b/scripts/install_submodules.sh deleted file mode 100755 index 74ac6326e3..0000000000 --- a/scripts/install_submodules.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -cd "${APP_ROOT_PATH}" && git submodule update --init --recursive diff --git a/scripts/run_cpp_tests.sh b/scripts/run_cpp_tests.sh deleted file mode 100755 index 976d7f2118..0000000000 --- a/scripts/run_cpp_tests.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" - -"${BINARY_PATH}/sc-builder" -i "${SC_MACHINE_PATH}/sc-tools/sc-builder/tests/kb" -o "${BINARY_PATH}/sc-builder-test-repo" --clear -f - -"${BINARY_PATH}/sc-builder" -i "${SC_MACHINE_PATH}/sc-tools/sc-server/tests/kb" -o "${BINARY_PATH}/sc-server-test-repo" --clear -f -(cd "${BUILD_PATH}" && ctest -C Debug -V -R 'starter' --timeout 30) diff --git a/scripts/run_interface.sh b/scripts/run_interface.sh deleted file mode 100755 index ecac20966d..0000000000 --- a/scripts/run_interface.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -cd "${APP_ROOT_PATH}/interface" || exit 1 -yarn && yarn start diff --git a/scripts/run_py_sc_server.sh b/scripts/run_py_sc_server.sh deleted file mode 100755 index 6098289ff4..0000000000 --- a/scripts/run_py_sc_server.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" - -python3 "$APP_ROOT_PATH"/problem-solver/py/server.py "$@" diff --git a/scripts/run_py_tests.sh b/scripts/run_py_tests.sh deleted file mode 100755 index a42fd7c5e7..0000000000 --- a/scripts/run_py_tests.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -kill_bg_process() { - echo "Killing background processes with root PID $bg_process_pid." - kill_tree $bg_process_pid -} - -kill_tree() { - local _pid=$1 - local _sig=${2:--TERM} - # kill child processes - for _child in $(pgrep -P $_pid); do - kill_tree $_child $_sig - done - # kill the parent - kill $_sig $_pid -} - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" - -"$APP_ROOT_PATH"/scripts/run_sc_server.sh --repo_path "${APP_ROOT_PATH}"/kb.bin-tests --clear -p 8091 & -# gather launch script PID -bg_process_pid=$(jobs -p) -# kill sc-server on exit -trap kill_bg_process EXIT INT TERM - -until python3 "${SC_MACHINE_PATH}/scripts/healthcheck.py" --port 8091 -do - echo ... - sleep 1 -done -python3 -m unittest discover "$APP_ROOT_PATH"/problem-solver/py/ diff --git a/scripts/run_sc_machine.sh b/scripts/run_sc_machine.sh deleted file mode 100755 index b667490d30..0000000000 --- a/scripts/run_sc_machine.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_MACHINE_PATH}/scripts/run_sc_machine.sh" "$@" diff --git a/scripts/run_sc_server.sh b/scripts/run_sc_server.sh deleted file mode 100755 index 10f8a0b1af..0000000000 --- a/scripts/run_sc_server.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_MACHINE_PATH}/scripts/run_sc_server.sh" "$@" diff --git a/scripts/run_sc_web.sh b/scripts/run_sc_web.sh deleted file mode 100755 index 11dfaca3b0..0000000000 --- a/scripts/run_sc_web.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/set_vars.sh" -"${SC_WEB_PATH}/scripts/run_sc_web.sh" "$@" diff --git a/scripts/set_vars.sh b/scripts/set_vars.sh deleted file mode 100755 index a6e2efed6f..0000000000 --- a/scripts/set_vars.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -APP_ROOT_PATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd) - -export APP_ROOT_PATH="${APP_ROOT_PATH}" -export ROOT_CMAKE_PATH="${APP_ROOT_PATH}" -export PROBLEM_SOLVER_PATH="${APP_ROOT_PATH}/problem-solver" -export REPO_PATH_FILE="${APP_ROOT_PATH}/repo.path" -export CONFIG_PATH="${APP_ROOT_PATH}/nika.ini" -export SCRIPTS_PATH="${APP_ROOT_PATH}/scripts" -export KB_PATH="${APP_ROOT_PATH}/kb" - -export SC_MACHINE_PATH="${PROBLEM_SOLVER_PATH}/sc-machine" -export SC_WEB_PATH="${APP_ROOT_PATH}/sc-web" - -if [ -d "${SC_MACHINE_PATH}" ]; -then - source "${SC_MACHINE_PATH}/scripts/set_vars.sh" -fi - -if [ -d "${SC_WEB_PATH}" ]; -then - source "${SC_WEB_PATH}/scripts/set_vars.sh" -fi diff --git a/subsystems/scl-machine b/subsystems/scl-machine deleted file mode 160000 index cfc5828813..0000000000 --- a/subsystems/scl-machine +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cfc5828813b28f3b3e49f2b39bcad5e52ef04a51