diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 0cad35c84..38cd529ee 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -3,7 +3,7 @@ language: en early_access: false enable_free_tier: true -reviews: +reviews: profile: chill instructions: >- # Code Review Instructions @@ -118,10 +118,10 @@ reviews: - E117 - D208 line_length: 100 - dummy_variable_rgx: '^(_.*|junk|extra)$' # Variables starting with '_' or named 'junk' or 'extras', are considered dummy variables + dummy_variable_rgx: '^(_.*|junk|extra)$' # Variables starting with '_' or named 'junk' or 'extras', are considered dummy variables markdownlint: enabled: true yamllint: enabled: true chat: - auto_reply: true \ No newline at end of file + auto_reply: true diff --git a/cognee/api/.env.example b/.env.example similarity index 61% rename from cognee/api/.env.example rename to .env.example index 1e06871df..8a1f9830d 100644 --- a/cognee/api/.env.example +++ b/.env.example @@ -2,4 +2,8 @@ # Example: # CORS_ALLOWED_ORIGINS="https://yourdomain.com,https://another.com" # For local development, you might use: -# CORS_ALLOWED_ORIGINS="http://localhost:3000" \ No newline at end of file +# CORS_ALLOWED_ORIGINS="http://localhost:3000" + +LLM_API_KEY="your-openai-api-key" +LLM_MODEL="openai/gpt-4o-mini" +LLM_PROVIDER="openai" diff --git a/.gitguardian.yml b/.gitguardian.yml index 5a5808340..f84e8ce15 100644 --- a/.gitguardian.yml +++ b/.gitguardian.yml @@ -28,4 +28,4 @@ secret-scan: - path: 'docker-compose.yml' comment: 'Development docker compose with test credentials (neo4j/pleaseletmein, postgres cognee/cognee)' - path: 'deployment/helm/docker-compose-helm.yml' - comment: 'Helm deployment docker compose with test postgres credentials (cognee/cognee)' \ No newline at end of file + comment: 'Helm deployment docker compose with test postgres credentials (cognee/cognee)' diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5a6d7b124..115553f69 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for taking the time to fill out this bug report! Please provide a clear and detailed description. - + - type: textarea id: description attributes: @@ -17,7 +17,7 @@ body: placeholder: Describe the bug in detail... validations: required: true - + - type: textarea id: reproduction attributes: @@ -29,7 +29,7 @@ body: 3. See error... validations: required: true - + - type: textarea id: expected attributes: @@ -38,7 +38,7 @@ body: placeholder: Describe what you expected... validations: required: true - + - type: textarea id: actual attributes: @@ -47,7 +47,7 @@ body: placeholder: Describe what actually happened... validations: required: true - + - type: textarea id: environment attributes: @@ -61,7 +61,7 @@ body: - Database: [e.g. Neo4j] validations: required: true - + - type: textarea id: logs attributes: @@ -71,7 +71,7 @@ body: render: shell validations: required: false - + - type: textarea id: additional attributes: @@ -80,7 +80,7 @@ body: placeholder: Any additional information... validations: required: false - + - type: checkboxes id: checklist attributes: diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index b01459ac6..546634aac 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for helping improve our documentation! Please provide details about the documentation issue or improvement. - + - type: dropdown id: doc-type attributes: @@ -22,7 +22,7 @@ body: - New documentation request validations: required: true - + - type: textarea id: location attributes: @@ -31,7 +31,7 @@ body: placeholder: https://cognee.ai/docs/... or specific file/section validations: required: true - + - type: textarea id: issue attributes: @@ -40,7 +40,7 @@ body: placeholder: The documentation is unclear about... validations: required: true - + - type: textarea id: suggestion attributes: @@ -49,7 +49,7 @@ body: placeholder: I suggest changing this to... validations: required: false - + - type: textarea id: additional attributes: @@ -58,7 +58,7 @@ body: placeholder: Additional context... validations: required: false - + - type: checkboxes id: checklist attributes: @@ -71,4 +71,3 @@ body: required: true - label: I have specified the location of the documentation issue required: true - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index cf743e6e4..d7bfdf902 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for suggesting a new feature! Please provide a clear and detailed description of your idea. - + - type: textarea id: problem attributes: @@ -17,7 +17,7 @@ body: placeholder: I'm always frustrated when... validations: required: true - + - type: textarea id: solution attributes: @@ -26,7 +26,7 @@ body: placeholder: I would like to see... validations: required: true - + - type: textarea id: alternatives attributes: @@ -35,7 +35,7 @@ body: placeholder: I have also considered... validations: required: false - + - type: textarea id: use-case attributes: @@ -44,7 +44,7 @@ body: placeholder: This feature would help me... validations: required: true - + - type: textarea id: implementation attributes: @@ -53,7 +53,7 @@ body: placeholder: This could be implemented by... validations: required: false - + - type: textarea id: additional attributes: @@ -62,7 +62,7 @@ body: placeholder: Additional context... validations: required: false - + - type: checkboxes id: checklist attributes: @@ -75,4 +75,3 @@ body: required: true - label: I have described my specific use case required: true - diff --git a/.github/actions/setup_neo4j/action.yml b/.github/actions/setup_neo4j/action.yml index 20b7726b1..8685efc61 100644 --- a/.github/actions/setup_neo4j/action.yml +++ b/.github/actions/setup_neo4j/action.yml @@ -34,14 +34,14 @@ runs: -e NEO4J_apoc_export_file_enabled=true \ -e NEO4J_apoc_import_file_enabled=true \ neo4j:${{ inputs.neo4j-version }} - + - name: Wait for Neo4j to be ready shell: bash run: | echo "Waiting for Neo4j to start..." timeout=60 counter=0 - + while [ $counter -lt $timeout ]; do if docker exec neo4j-test cypher-shell -u neo4j -p "${{ inputs.neo4j-password }}" "RETURN 1" > /dev/null 2>&1; then echo "Neo4j is ready!" @@ -51,13 +51,13 @@ runs: sleep 2 counter=$((counter + 2)) done - + if [ $counter -ge $timeout ]; then echo "Neo4j failed to start within $timeout seconds" docker logs neo4j-test exit 1 fi - + - name: Verify GDS is available shell: bash run: | diff --git a/.github/core-team.txt b/.github/core-team.txt index 2e69a268c..ce8d83e87 100644 --- a/.github/core-team.txt +++ b/.github/core-team.txt @@ -8,5 +8,3 @@ lxobr pazone siillee vasilije1990 - - diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index be9d219c1..9d605c46d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,26 +10,21 @@ DO NOT use AI-generated descriptions. We want to understand your thought process ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) -- [ ] Documentation update - [ ] Code refactoring -- [ ] Performance improvement - [ ] Other (please specify): -## Screenshots/Videos (if applicable) - +## Screenshots + ## Pre-submission Checklist -- [ ] **I have tested my changes thoroughly before submitting this PR** +- [ ] **I have tested my changes thoroughly before submitting this PR** (See `CONTRIBUTING.md`) - [ ] **This PR contains minimal changes necessary to address the issue/feature** - [ ] My code follows the project's coding standards and style guidelines - [ ] I have added tests that prove my fix is effective or that my feature works diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 8acf0a601..1df30ce66 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -3,7 +3,7 @@ tag-template: 'v$NEXT_PATCH_VERSION' categories: - title: 'Features' - labels: ['feature', 'enhancement'] + labels: ['feature', 'enhancement'] - title: 'Bug Fixes' labels: ['bug', 'fix'] - title: 'Maintenance' diff --git a/.github/workflows/basic_tests.yml b/.github/workflows/basic_tests.yml index 1fc20a148..6d9ddce3a 100644 --- a/.github/workflows/basic_tests.yml +++ b/.github/workflows/basic_tests.yml @@ -34,43 +34,6 @@ env: ENV: 'dev' jobs: - - lint: - name: Run Linting - runs-on: ubuntu-22.04 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cognee Setup - uses: ./.github/actions/cognee_setup - with: - python-version: ${{ inputs.python-version }} - - - name: Run Linting - uses: astral-sh/ruff-action@v2 - - format-check: - name: Run Formatting Check - runs-on: ubuntu-22.04 - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cognee Setup - uses: ./.github/actions/cognee_setup - with: - python-version: ${{ inputs.python-version }} - - - name: Run Formatting Check - uses: astral-sh/ruff-action@v2 - with: - args: "format --check" - unit-tests: name: Run Unit Tests runs-on: ubuntu-22.04 diff --git a/.github/workflows/disable_independent_workflows.sh b/.github/workflows/disable_independent_workflows.sh index ff57da80d..042ce2b82 100755 --- a/.github/workflows/disable_independent_workflows.sh +++ b/.github/workflows/disable_independent_workflows.sh @@ -31,54 +31,54 @@ WORKFLOWS=( for workflow in "${WORKFLOWS[@]}"; do if [ -f "$workflow" ]; then echo "Processing $workflow..." - + # Create a backup cp "$workflow" "${workflow}.bak" - + # Check if the file begins with a workflow_call trigger if grep -q "workflow_call:" "$workflow"; then echo "$workflow already has workflow_call trigger, skipping..." continue fi - + # Get the content after the 'on:' section on_line=$(grep -n "^on:" "$workflow" | cut -d ':' -f1) - + if [ -z "$on_line" ]; then echo "Warning: No 'on:' section found in $workflow, skipping..." continue fi - + # Create a new file with the modified content { # Copy the part before 'on:' head -n $((on_line-1)) "$workflow" - + # Add the new on: section that only includes workflow_call echo "on:" echo " workflow_call:" echo " secrets:" echo " inherit: true" - + # Find where to continue after the original 'on:' section next_section=$(awk "NR > $on_line && /^[a-z]/ {print NR; exit}" "$workflow") - + if [ -z "$next_section" ]; then next_section=$(wc -l < "$workflow") next_section=$((next_section+1)) fi - + # Copy the rest of the file starting from the next section tail -n +$next_section "$workflow" } > "${workflow}.new" - + # Replace the original with the new version mv "${workflow}.new" "$workflow" - + echo "Modified $workflow to only run when called from test-suites.yml" else echo "Warning: $workflow not found, skipping..." fi done -echo "Finished modifying workflows!" \ No newline at end of file +echo "Finished modifying workflows!" diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 8ed7e802a..107272852 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -45,4 +45,4 @@ jobs: cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max - name: Image digest - run: echo ${{ steps.build.outputs.digest }} \ No newline at end of file + run: echo ${{ steps.build.outputs.digest }} diff --git a/.github/workflows/label-core-team.yml b/.github/workflows/label-core-team.yml index 8e32923d1..869f48247 100644 --- a/.github/workflows/label-core-team.yml +++ b/.github/workflows/label-core-team.yml @@ -72,5 +72,3 @@ jobs: } catch (error) { core.warning(`Failed to add label: ${error.message}`); } - - diff --git a/.github/workflows/load_tests.yml b/.github/workflows/load_tests.yml index f5b64d8ce..7e81179a6 100644 --- a/.github/workflows/load_tests.yml +++ b/.github/workflows/load_tests.yml @@ -66,5 +66,3 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_DEV_USER_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_DEV_USER_SECRET_KEY }} run: uv run python ./cognee/tests/test_load.py - - diff --git a/.github/workflows/pre_test.yml b/.github/workflows/pre_test.yml index e15173cb4..912dc7bc7 100644 --- a/.github/workflows/pre_test.yml +++ b/.github/workflows/pre_test.yml @@ -5,7 +5,7 @@ permissions: contents: read jobs: check-uv-lock: - name: Validate uv lockfile and project metadata + name: Lockfile and Pre-commit Hooks runs-on: ubuntu-22.04 steps: - name: Check out repository @@ -17,6 +17,9 @@ jobs: uses: astral-sh/setup-uv@v4 with: enable-cache: true - + - name: Validate uv lockfile and project metadata run: uv lock --check || { echo "'uv lock --check' failed."; echo "Run 'uv lock' and push your changes."; exit 1; } + + - name: Run pre-commit hooks + uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26ccce1f0..f594b4c5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,10 +42,10 @@ jobs: echo "tag=${TAG}" >> "$GITHUB_OUTPUT" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" - + git tag "${TAG}" git push origin "${TAG}" - + - name: Create GitHub Release uses: softprops/action-gh-release@v2 @@ -54,8 +54,8 @@ jobs: generate_release_notes: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release-pypi-package: + + release-pypi-package: needs: release-github name: Release PyPI Package from ${{ inputs.flavour }} permissions: @@ -67,25 +67,25 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ inputs.flavour }} - + - name: Install uv uses: astral-sh/setup-uv@v7 - + - name: Install Python run: uv python install - + - name: Install dependencies run: uv sync --locked --all-extras - + - name: Build distributions run: uv build - + - name: Publish ${{ inputs.flavour }} release to PyPI env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} run: uv publish - - release-docker-image: + + release-docker-image: needs: release-github name: Release Docker Image from ${{ inputs.flavour }} permissions: @@ -128,7 +128,7 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: | + tags: | cognee/cognee:${{ needs.release-github.outputs.version }} cognee/cognee:latest labels: | @@ -163,4 +163,4 @@ jobs: -H "Authorization: Bearer ${{ secrets.REPO_DISPATCH_PAT_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/topoteretes/cognee-community/dispatches \ - -d '{"event_type":"new-main-release","client_payload":{"caller_repo":"'"${GITHUB_REPOSITORY}"'"}}' \ No newline at end of file + -d '{"event_type":"new-main-release","client_payload":{"caller_repo":"'"${GITHUB_REPOSITORY}"'"}}' diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index b31b431a4..9797c1e2d 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -15,4 +15,3 @@ jobs: name: Load Tests uses: ./.github/workflows/load_tests.yml secrets: inherit - diff --git a/.github/workflows/test_different_operating_systems.yml b/.github/workflows/test_different_operating_systems.yml index 02651b474..5a08ba6a0 100644 --- a/.github/workflows/test_different_operating_systems.yml +++ b/.github/workflows/test_different_operating_systems.yml @@ -10,7 +10,7 @@ on: required: false type: string default: '["3.10.x", "3.12.x", "3.13.x"]' - os: + os: required: false type: string default: '["ubuntu-22.04", "macos-15", "windows-latest"]' diff --git a/.github/workflows/test_llms.yml b/.github/workflows/test_llms.yml index 8f9d30d10..245406172 100644 --- a/.github/workflows/test_llms.yml +++ b/.github/workflows/test_llms.yml @@ -173,4 +173,4 @@ jobs: EMBEDDING_MODEL: "amazon.titan-embed-text-v2:0" EMBEDDING_DIMENSIONS: "1024" EMBEDDING_MAX_TOKENS: "8191" - run: uv run python ./examples/python/simple_example.py \ No newline at end of file + run: uv run python ./examples/python/simple_example.py diff --git a/.github/workflows/test_suites.yml b/.github/workflows/test_suites.yml index 27f4508e0..a1e3ff9e6 100644 --- a/.github/workflows/test_suites.yml +++ b/.github/workflows/test_suites.yml @@ -18,11 +18,11 @@ env: RUNTIME__LOG_LEVEL: ERROR ENV: 'dev' -jobs: +jobs: pre-test: name: basic checks uses: ./.github/workflows/pre_test.yml - + basic-tests: name: Basic Tests uses: ./.github/workflows/basic_tests.yml diff --git a/.gitignore b/.gitignore index ff42efc97..7c3095d08 100644 --- a/.gitignore +++ b/.gitignore @@ -147,6 +147,8 @@ venv/ ENV/ env.bak/ venv.bak/ +mise.toml +deployment/helm/values-local.yml # Spyder project settings .spyderproject diff --git a/.mergify.yml b/.mergify.yml index 55a2c4345..c8aef74bf 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,4 +6,4 @@ pull_request_rules: actions: backport: branches: - - main \ No newline at end of file + - main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54d0a7d94..40a577496 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + exclude: ^deployment/helm/templates/ - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. diff --git a/AGENTS.md b/AGENTS.md index 4cadfbdc1..2a8b7af76 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -128,5 +128,3 @@ MCP server and Frontend: ## CI Mirrors Local Commands Our GitHub Actions run the same ruff checks and pytest suites shown above (`.github/workflows/basic_tests.yml` and related workflows). Use the commands in this document locally to minimize CI surprises. - - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ca815825..3a810733b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,16 @@ > [!IMPORTANT] > **Note for contributors:** When branching out, create a new branch from the `dev` branch. -# 🎉 Welcome to **cognee**! +# 🎉 Welcome to **cognee**! -We're excited that you're interested in contributing to our project! -We want to ensure that every user and contributor feels welcome, included and supported to participate in cognee community. +We're excited that you're interested in contributing to our project! +We want to ensure that every user and contributor feels welcome, included and supported to participate in cognee community. This guide will help you get started and ensure your contributions can be efficiently integrated into the project. ## 🌟 Quick Links - [Code of Conduct](CODE_OF_CONDUCT.md) -- [Discord Community](https://discord.gg/bcy8xFAtfd) +- [Discord Community](https://discord.gg/bcy8xFAtfd) - [Issue Tracker](https://github.com/topoteretes/cognee/issues) - [Cognee Docs](https://docs.cognee.ai) @@ -62,6 +62,11 @@ Looking for a place to start? Try filtering for [good first issues](https://gith ## 2. 🛠️ Development Setup +### Required tools +* [Python](https://www.python.org/downloads/) +* [uv](https://docs.astral.sh/uv/getting-started/installation/) +* pre-commit: `uv run pip install pre-commit && pre-commit install` + ### Fork and Clone 1. Fork the [**cognee**](https://github.com/topoteretes/cognee) repository @@ -93,14 +98,31 @@ git checkout -b feature/your-feature-name 4. **Commits**: Write clear commit messages ### Running Tests + +Rename `.env.example` into `.env` and provide your OPENAI_API_KEY as LLM_API_KEY + ```shell -python cognee/cognee/tests/test_library.py +uv run python cognee/tests/test_library.py +``` + +### Running Simple Example + +Rename `.env.example` into `.env` and provide your OPENAI_API_KEY as LLM_API_KEY + +Make sure to run ```shell uv sync ``` in the root cloned folder or set up a virtual environment to run cognee + +```shell +python examples/python/simple_example.py +``` +or + +```shell +uv run python examples/python/simple_example.py ``` ## 4. 📤 Submitting Changes -1. Install ruff on your system -2. Run ```ruff format .``` and ``` ruff check ``` and fix the issues +1. Make sure that `pre-commit` and hooks are installed. See `Required tools` section for more information. Try executing `pre-commit run` if you are not sure. 3. Push your changes: ```shell git add . diff --git a/Dockerfile b/Dockerfile index 9b9a34d41..49bb29445 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ COPY README.md pyproject.toml uv.lock entrypoint.sh ./ # Install the project's dependencies using the lockfile and settings RUN --mount=type=cache,target=/root/.cache/uv \ - uv sync --extra debug --extra api --extra postgres --extra neo4j --extra llama-index --extra ollama --extra mistral --extra groq --extra anthropic --frozen --no-install-project --no-dev --no-editable + uv sync --extra debug --extra api --extra postgres --extra neo4j --extra llama-index --extra ollama --extra mistral --extra groq --extra anthropic --extra chromadb --frozen --no-install-project --no-dev --no-editable # Copy Alembic configuration COPY alembic.ini /app/alembic.ini @@ -43,7 +43,7 @@ COPY alembic/ /app/alembic COPY ./cognee /app/cognee COPY ./distributed /app/distributed RUN --mount=type=cache,target=/root/.cache/uv \ -uv sync --extra debug --extra api --extra postgres --extra neo4j --extra llama-index --extra ollama --extra mistral --extra groq --extra anthropic --frozen --no-dev --no-editable +uv sync --extra debug --extra api --extra postgres --extra neo4j --extra llama-index --extra ollama --extra mistral --extra groq --extra anthropic --extra chromadb --frozen --no-dev --no-editable FROM python:3.12-slim-bookworm diff --git a/README.md b/README.md index 9fd5635ae..ebcaa414f 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ Use your data to build personalized and dynamic memory for AI Agents. Cognee let ## About Cognee -Cognee is an open-source tool and platform that transforms your raw data into persistent and dynamic AI memory for Agents. It combines vector search with graph databases to make your documents both searchable by meaning and connected by relationships. +Cognee is an open-source tool and platform that transforms your raw data into persistent and dynamic AI memory for Agents. It combines vector search with graph databases to make your documents both searchable by meaning and connected by relationships. You can use Cognee in two ways: 1. [Self-host Cognee Open Source](https://docs.cognee.ai/getting-started/installation), which stores all data locally by default. -2. [Connect to Cognee Cloud](https://platform.cognee.ai/), and get the same OSS stack on managed infrastructure for easier development and productionization. +2. [Connect to Cognee Cloud](https://platform.cognee.ai/), and get the same OSS stack on managed infrastructure for easier development and productionization. ### Cognee Open Source (self-hosted): @@ -81,8 +81,8 @@ You can use Cognee in two ways: - Offers high customizability through user-defined tasks, modular pipelines, and built-in search endpoints ### Cognee Cloud (managed): -- Hosted web UI dashboard -- Automatic version updates +- Hosted web UI dashboard +- Automatic version updates - Resource usage analytics - GDPR compliant, enterprise-grade security @@ -119,7 +119,7 @@ To integrate other LLM providers, see our [LLM Provider Documentation](https://d ### Step 3: Run the Pipeline -Cognee will take your documents, generate a knowledge graph from them and then query the graph based on combined relationships. +Cognee will take your documents, generate a knowledge graph from them and then query the graph based on combined relationships. Now, run a minimal pipeline: @@ -157,7 +157,7 @@ As you can see, the output is generated from the document we previously stored i Cognee turns documents into AI memory. ``` -### Use the Cognee CLI +### Use the Cognee CLI As an alternative, you can get started with these essential commands: diff --git a/alembic/README b/alembic/README index e0d0858f2..a23d4fb51 100644 --- a/alembic/README +++ b/alembic/README @@ -1 +1 @@ -Generic single-database configuration with an async dbapi. \ No newline at end of file +Generic single-database configuration with an async dbapi. diff --git a/alembic/versions/1a58b986e6e1_enable_delete_for_old_tutorial_notebooks.py b/alembic/versions/1a58b986e6e1_enable_delete_for_old_tutorial_notebooks.py new file mode 100644 index 000000000..2d5d099a1 --- /dev/null +++ b/alembic/versions/1a58b986e6e1_enable_delete_for_old_tutorial_notebooks.py @@ -0,0 +1,52 @@ +"""Enable delete for old tutorial notebooks + +Revision ID: 1a58b986e6e1 +Revises: 46a6ce2bd2b2 +Create Date: 2025-12-17 11:04:44.414259 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision: str = "1a58b986e6e1" +down_revision: Union[str, None] = "e1ec1dcb50b6" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def change_tutorial_deletable_flag(deletable: bool) -> None: + bind = op.get_bind() + inspector = sa.inspect(bind) + + if "notebooks" not in inspector.get_table_names(): + return + + columns = {col["name"] for col in inspector.get_columns("notebooks")} + required_columns = {"name", "deletable"} + if not required_columns.issubset(columns): + return + + notebooks = sa.table( + "notebooks", + sa.Column("name", sa.String()), + sa.Column("deletable", sa.Boolean()), + ) + + tutorial_name = "Python Development with Cognee Tutorial 🧠" + + bind.execute( + notebooks.update().where(notebooks.c.name == tutorial_name).values(deletable=deletable) + ) + + +def upgrade() -> None: + change_tutorial_deletable_flag(True) + + +def downgrade() -> None: + change_tutorial_deletable_flag(False) diff --git a/assets/community/README.pt.md b/assets/community/README.pt.md index f42f8c0b0..3a089e3e1 100644 --- a/assets/community/README.pt.md +++ b/assets/community/README.pt.md @@ -43,10 +43,10 @@ Saiba mais sobre os [casos de uso](https://docs.cognee.ai/use-cases) e [avaliaç ## Funcionalidades -- Conecte e recupere suas conversas passadas, documentos, imagens e transcrições de áudio -- Reduza alucinações, esforço de desenvolvimento e custos -- Carregue dados em bancos de dados de grafos e vetores usando apenas Pydantic -- Transforme e organize seus dados enquanto os coleta de mais de 30 fontes diferentes +- Conecte e recupere suas conversas passadas, documentos, imagens e transcrições de áudio +- Reduza alucinações, esforço de desenvolvimento e custos +- Carregue dados em bancos de dados de grafos e vetores usando apenas Pydantic +- Transforme e organize seus dados enquanto os coleta de mais de 30 fontes diferentes ## Primeiros Passos @@ -108,7 +108,7 @@ if __name__ == '__main__': Exemplo do output: ``` O Processamento de Linguagem Natural (NLP) é um campo interdisciplinar e transdisciplinar que envolve ciência da computação e recuperação de informações. Ele se concentra na interação entre computadores e a linguagem humana, permitindo que as máquinas compreendam e processem a linguagem natural. - + ``` Visualização do grafo: diff --git a/assets/community/README.ru.md b/assets/community/README.ru.md index c5a7b4a48..8e7a98479 100644 --- a/assets/community/README.ru.md +++ b/assets/community/README.ru.md @@ -141,7 +141,7 @@ if __name__ == '__main__': 2. Простая демонстрация GraphRAG [Видео](https://github.com/user-attachments/assets/d80b0776-4eb9-4b8e-aa22-3691e2d44b8f) -3. Cognee с Ollama +3. Cognee с Ollama [Видео](https://github.com/user-attachments/assets/8621d3e8-ecb8-4860-afb2-5594f2ee17db) ## Правила поведения diff --git a/assets/community/README.zh.md b/assets/community/README.zh.md index 573a77b31..e002b1f22 100644 --- a/assets/community/README.zh.md +++ b/assets/community/README.zh.md @@ -114,7 +114,7 @@ if __name__ == '__main__': 示例输出: ``` 自然语言处理(NLP)是计算机科学和信息检索的跨学科领域。它关注计算机和人类语言之间的交互,使机器能够理解和处理自然语言。 - + ``` 图形可视化: 图形可视化 diff --git a/cognee-frontend/package-lock.json b/cognee-frontend/package-lock.json index 29826027a..18f3b0e25 100644 --- a/cognee-frontend/package-lock.json +++ b/cognee-frontend/package-lock.json @@ -8,14 +8,15 @@ "name": "cognee-frontend", "version": "1.0.0", "dependencies": { - "@auth0/nextjs-auth0": "^4.13.1", + "@auth0/nextjs-auth0": "^4.14.0", "classnames": "^2.5.1", "culori": "^4.0.1", "d3-force-3d": "^3.0.6", - "next": "16.0.4", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "next": "^16.1.0", + "react": "^19.2.3", + "react-dom": "^19.2.3", "react-force-graph-2d": "^1.27.1", + "react-markdown": "^10.1.0", "uuid": "^9.0.1" }, "devDependencies": { @@ -47,9 +48,9 @@ } }, "node_modules/@auth0/nextjs-auth0": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/@auth0/nextjs-auth0/-/nextjs-auth0-4.13.1.tgz", - "integrity": "sha512-RGZKddUa/kNdudhxYsJ0xSPtx10qr3qQ6i1aq2PY5x+JJ7f1Ifkb6QwuwREzxJlWh80YQ0S5Ef26JWHCPN2PkQ==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@auth0/nextjs-auth0/-/nextjs-auth0-4.14.0.tgz", + "integrity": "sha512-1SGieoD/nM52G+bNE8Xg1SpuCYSVC0c2q74B6mlMTXimtpVk6uZOmYH75L1jdAUKxesum470BtxOiwo4MwUS6g==", "license": "MIT", "dependencies": { "@edge-runtime/cookies": "^5.0.1", @@ -60,9 +61,9 @@ "swr": "^2.2.5" }, "peerDependencies": { - "next": "^14.2.25 || ^15.2.3 || ^16.0.0", - "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", - "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" + "next": "^14.2.35 || ~15.0.7 || ~15.1.11 || ~15.2.8 || ~15.3.8 || ~15.4.10 || ~15.5.9 || ^16.0.10", + "react": "^18.0.0 || ~19.0.1 || ~19.1.2 || ^19.2.1", + "react-dom": "^18.0.0 || ~19.0.1 || ~19.1.2 || ^19.2.1" } }, "node_modules/@babel/code-frame": { @@ -1074,9 +1075,9 @@ } }, "node_modules/@next/env": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.4.tgz", - "integrity": "sha512-FDPaVoB1kYhtOz6Le0Jn2QV7RZJ3Ngxzqri7YX4yu3Ini+l5lciR7nA9eNDpKTmDm7LWZtxSju+/CQnwRBn2pA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/env/-/env-16.1.0.tgz", + "integrity": "sha512-Dd23XQeFHmhf3KBW76leYVkejHlCdB7erakC2At2apL1N08Bm+dLYNP+nNHh0tzUXfPQcNcXiQyacw0PG4Fcpw==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -1090,9 +1091,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.4.tgz", - "integrity": "sha512-TN0cfB4HT2YyEio9fLwZY33J+s+vMIgC84gQCOLZOYusW7ptgjIn8RwxQt0BUpoo9XRRVVWEHLld0uhyux1ZcA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.1.0.tgz", + "integrity": "sha512-onHq8dl8KjDb8taANQdzs3XmIqQWV3fYdslkGENuvVInFQzZnuBYYOG2HGHqqtvgmEU7xWzhgndXXxnhk4Z3fQ==", "cpu": [ "arm64" ], @@ -1106,9 +1107,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.4.tgz", - "integrity": "sha512-XsfI23jvimCaA7e+9f3yMCoVjrny2D11G6H8NCcgv+Ina/TQhKPXB9P4q0WjTuEoyZmcNvPdrZ+XtTh3uPfH7Q==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.1.0.tgz", + "integrity": "sha512-Am6VJTp8KhLuAH13tPrAoVIXzuComlZlMwGr++o2KDjWiKPe3VwpxYhgV6I4gKls2EnsIMggL4y7GdXyDdJcFA==", "cpu": [ "x64" ], @@ -1122,9 +1123,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.4.tgz", - "integrity": "sha512-uo8X7qHDy4YdJUhaoJDMAbL8VT5Ed3lijip2DdBHIB4tfKAvB1XBih6INH2L4qIi4jA0Qq1J0ErxcOocBmUSwg==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.1.0.tgz", + "integrity": "sha512-fVicfaJT6QfghNyg8JErZ+EMNQ812IS0lmKfbmC01LF1nFBcKfcs4Q75Yy8IqnsCqH/hZwGhqzj3IGVfWV6vpA==", "cpu": [ "arm64" ], @@ -1138,9 +1139,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.4.tgz", - "integrity": "sha512-pvR/AjNIAxsIz0PCNcZYpH+WmNIKNLcL4XYEfo+ArDi7GsxKWFO5BvVBLXbhti8Coyv3DE983NsitzUsGH5yTw==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.1.0.tgz", + "integrity": "sha512-TojQnDRoX7wJWXEEwdfuJtakMDW64Q7NrxQPviUnfYJvAx5/5wcGE+1vZzQ9F17m+SdpFeeXuOr6v3jbyusYMQ==", "cpu": [ "arm64" ], @@ -1154,9 +1155,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.4.tgz", - "integrity": "sha512-2hebpsd5MRRtgqmT7Jj/Wze+wG+ZEXUK2KFFL4IlZ0amEEFADo4ywsifJNeFTQGsamH3/aXkKWymDvgEi+pc2Q==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.1.0.tgz", + "integrity": "sha512-quhNFVySW4QwXiZkZ34SbfzNBm27vLrxZ2HwTfFFO1BBP0OY1+pI0nbyewKeq1FriqU+LZrob/cm26lwsiAi8Q==", "cpu": [ "x64" ], @@ -1170,9 +1171,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.4.tgz", - "integrity": "sha512-pzRXf0LZZ8zMljH78j8SeLncg9ifIOp3ugAFka+Bq8qMzw6hPXOc7wydY7ardIELlczzzreahyTpwsim/WL3Sg==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.1.0.tgz", + "integrity": "sha512-6JW0z2FZUK5iOVhUIWqE4RblAhUj1EwhZ/MwteGb//SpFTOHydnhbp3868gxalwea+mbOLWO6xgxj9wA9wNvNw==", "cpu": [ "x64" ], @@ -1186,9 +1187,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.4.tgz", - "integrity": "sha512-7G/yJVzum52B5HOqqbQYX9bJHkN+c4YyZ2AIvEssMHQlbAWOn3iIJjD4sM6ihWsBxuljiTKJovEYlD1K8lCUHw==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.1.0.tgz", + "integrity": "sha512-+DK/akkAvvXn5RdYN84IOmLkSy87SCmpofJPdB8vbLmf01BzntPBSYXnMvnEEv/Vcf3HYJwt24QZ/s6sWAwOMQ==", "cpu": [ "arm64" ], @@ -1202,9 +1203,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.4.tgz", - "integrity": "sha512-0Vy4g8SSeVkuU89g2OFHqGKM4rxsQtihGfenjx2tRckPrge5+gtFnRWGAAwvGXr0ty3twQvcnYjEyOrLHJ4JWA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.1.0.tgz", + "integrity": "sha512-Tr0j94MphimCCks+1rtYPzQFK+faJuhHWCegU9S9gDlgyOk8Y3kPmO64UcjyzZAlligeBtYZ/2bEyrKq0d2wqQ==", "cpu": [ "x64" ], @@ -1585,13 +1586,39 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, "license": "MIT" }, + "node_modules/@types/estree-jsx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", + "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1606,6 +1633,21 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.19.25", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", @@ -1620,7 +1662,6 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -1637,6 +1678,12 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, "node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", @@ -1915,6 +1962,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "license": "ISC" + }, "node_modules/@unrs/resolver-binding-android-arm-eabi": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", @@ -2480,6 +2533,16 @@ "node": ">= 0.4" } }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2491,7 +2554,6 @@ "version": "2.8.31", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.31.tgz", "integrity": "sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==", - "dev": true, "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -2658,6 +2720,16 @@ "node": ">=12" } }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2675,6 +2747,46 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -2707,6 +2819,16 @@ "dev": true, "license": "MIT" }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2740,7 +2862,6 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, "license": "MIT" }, "node_modules/culori": { @@ -3034,7 +3155,6 @@ "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3048,6 +3168,19 @@ } } }, + "node_modules/decode-named-character-reference": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.2.0.tgz", + "integrity": "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3110,6 +3243,19 @@ "node": ">=8" } }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -3574,6 +3720,7 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -3797,6 +3944,16 @@ "node": ">=4.0" } }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -3807,6 +3964,12 @@ "node": ">=0.10.0" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4283,6 +4446,46 @@ "node": ">= 0.4" } }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", + "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-js": "^1.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hermes-estree": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", @@ -4300,6 +4503,16 @@ "hermes-estree": "0.25.1" } }, + "node_modules/html-url-attributes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", + "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4346,6 +4559,12 @@ "node": ">=12" } }, + "node_modules/inline-style-parser": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", + "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", + "license": "MIT" + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -4370,6 +4589,30 @@ "node": ">=12" } }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -4528,6 +4771,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4587,6 +4840,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -4640,6 +4903,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -5273,6 +5548,16 @@ "dev": true, "license": "MIT" }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -5315,6 +5600,159 @@ "node": ">= 0.4" } }, + "node_modules/mdast-util-from-markdown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", + "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", + "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", + "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -5325,6 +5763,448 @@ "node": ">= 8" } }, + "node_modules/micromark": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -5366,7 +6246,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/nanoid": { @@ -5411,14 +6290,15 @@ "license": "MIT" }, "node_modules/next": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/next/-/next-16.0.4.tgz", - "integrity": "sha512-vICcxKusY8qW7QFOzTvnRL1ejz2ClTqDKtm1AcUjm2mPv/lVAdgpGNsftsPRIDJOXOjRQO68i1dM8Lp8GZnqoA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/next/-/next-16.1.0.tgz", + "integrity": "sha512-Y+KbmDbefYtHDDQKLNrmzE/YYzG2msqo2VXhzh5yrJ54tx/6TmGdkR5+kP9ma7i7LwZpZMfoY3m/AoPPPKxtVw==", "license": "MIT", "peer": true, "dependencies": { - "@next/env": "16.0.4", + "@next/env": "16.1.0", "@swc/helpers": "0.5.15", + "baseline-browser-mapping": "^2.8.3", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" @@ -5430,14 +6310,14 @@ "node": ">=20.9.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "16.0.4", - "@next/swc-darwin-x64": "16.0.4", - "@next/swc-linux-arm64-gnu": "16.0.4", - "@next/swc-linux-arm64-musl": "16.0.4", - "@next/swc-linux-x64-gnu": "16.0.4", - "@next/swc-linux-x64-musl": "16.0.4", - "@next/swc-win32-arm64-msvc": "16.0.4", - "@next/swc-win32-x64-msvc": "16.0.4", + "@next/swc-darwin-arm64": "16.1.0", + "@next/swc-darwin-x64": "16.1.0", + "@next/swc-linux-arm64-gnu": "16.1.0", + "@next/swc-linux-arm64-musl": "16.1.0", + "@next/swc-linux-x64-gnu": "16.1.0", + "@next/swc-linux-x64-musl": "16.1.0", + "@next/swc-win32-arm64-msvc": "16.1.0", + "@next/swc-win32-x64-msvc": "16.1.0", "sharp": "^0.34.4" }, "peerDependencies": { @@ -5723,6 +6603,31 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5839,6 +6744,16 @@ "react-is": "^16.13.1" } }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5871,9 +6786,9 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", - "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", + "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", "peer": true, "engines": { @@ -5881,16 +6796,16 @@ } }, "node_modules/react-dom": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", - "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", "license": "MIT", "peer": true, "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^19.2.0" + "react": "^19.2.3" } }, "node_modules/react-force-graph-2d": { @@ -5931,6 +6846,33 @@ "react": ">=16.13.1" } }, + "node_modules/react-markdown": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", + "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "html-url-attributes": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=18", + "react": ">=18" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -5975,6 +6917,39 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/resolve": { "version": "1.22.11", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", @@ -6337,6 +7312,16 @@ "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/stable-hash": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", @@ -6471,6 +7456,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -6494,6 +7493,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/style-to-js": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", + "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==", + "license": "MIT", + "dependencies": { + "style-to-object": "1.0.14" + } + }, + "node_modules/style-to-object": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz", + "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.7" + } + }, "node_modules/styled-jsx": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", @@ -6645,6 +7662,26 @@ "node": ">=8.0" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -6846,6 +7883,93 @@ "dev": true, "license": "MIT" }, + "node_modules/unified": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", + "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", + "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unrs-resolver": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", @@ -6944,6 +8068,34 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7102,6 +8254,16 @@ "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/cognee-frontend/package.json b/cognee-frontend/package.json index 4195945fd..d1ac82f6f 100644 --- a/cognee-frontend/package.json +++ b/cognee-frontend/package.json @@ -9,14 +9,15 @@ "lint": "next lint" }, "dependencies": { - "@auth0/nextjs-auth0": "^4.13.1", + "@auth0/nextjs-auth0": "^4.14.0", "classnames": "^2.5.1", "culori": "^4.0.1", "d3-force-3d": "^3.0.6", - "next": "16.0.4", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "next": "^16.1.7", + "react": "^19.2.3", + "react-dom": "^19.2.3", "react-force-graph-2d": "^1.27.1", + "react-markdown": "^10.1.0", "uuid": "^9.0.1" }, "devDependencies": { diff --git a/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx b/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx index 3efdb47af..597978953 100644 --- a/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx +++ b/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx @@ -55,7 +55,7 @@ export default function CogneeAddWidget({ onData, useCloud = false }: CogneeAddW setTrue: setProcessingFilesInProgress, setFalse: setProcessingFilesDone, } = useBoolean(false); - + const handleAddFiles = (dataset: Dataset, event: ChangeEvent) => { event.stopPropagation(); diff --git a/cognee-frontend/src/app/(graph)/GraphControls.tsx b/cognee-frontend/src/app/(graph)/GraphControls.tsx index e83fb1107..edb8fb5fc 100644 --- a/cognee-frontend/src/app/(graph)/GraphControls.tsx +++ b/cognee-frontend/src/app/(graph)/GraphControls.tsx @@ -111,7 +111,7 @@ export default function GraphControls({ data, isAddNodeFormOpen, onGraphShapeCha const [isAuthShapeChangeEnabled, setIsAuthShapeChangeEnabled] = useState(true); const shapeChangeTimeout = useRef(null); - + useEffect(() => { onGraphShapeChange(DEFAULT_GRAPH_SHAPE); diff --git a/cognee-frontend/src/app/(graph)/GraphVisualization.tsx b/cognee-frontend/src/app/(graph)/GraphVisualization.tsx index db4494d73..23cfab918 100644 --- a/cognee-frontend/src/app/(graph)/GraphVisualization.tsx +++ b/cognee-frontend/src/app/(graph)/GraphVisualization.tsx @@ -57,7 +57,7 @@ export default function GraphVisualization({ ref, data, graphControls, className // Initial size calculation handleResize(); - // ResizeObserver + // ResizeObserver const resizeObserver = new ResizeObserver(() => { handleResize(); }); @@ -216,7 +216,7 @@ export default function GraphVisualization({ ref, data, graphControls, className }, [data, graphRef]); const [graphShape, setGraphShape] = useState(); - + const zoomToFit: ForceGraphMethods["zoomToFit"] = ( durationMs?: number, padding?: number, @@ -227,15 +227,15 @@ export default function GraphVisualization({ ref, data, graphControls, className // eslint-disable-next-line @typescript-eslint/no-explicit-any return undefined as any; } - + return graphRef.current.zoomToFit?.(durationMs, padding, nodeFilter); }; - + useImperativeHandle(ref, () => ({ zoomToFit, setGraphShape, })); - + return (
diff --git a/cognee-frontend/src/app/(graph)/example_data.json b/cognee-frontend/src/app/(graph)/example_data.json index 74095afd6..98f4c5ca4 100644 --- a/cognee-frontend/src/app/(graph)/example_data.json +++ b/cognee-frontend/src/app/(graph)/example_data.json @@ -1373,4 +1373,4 @@ "padding": 20 } } -} \ No newline at end of file +} diff --git a/cognee-frontend/src/app/dashboard/Dashboard.tsx b/cognee-frontend/src/app/dashboard/Dashboard.tsx index 75e3d7518..d333c0bf1 100644 --- a/cognee-frontend/src/app/dashboard/Dashboard.tsx +++ b/cognee-frontend/src/app/dashboard/Dashboard.tsx @@ -15,6 +15,8 @@ import AddDataToCognee from "./AddDataToCognee"; import NotebooksAccordion from "./NotebooksAccordion"; import CogneeInstancesAccordion from "./CogneeInstancesAccordion"; import InstanceDatasetsAccordion from "./InstanceDatasetsAccordion"; +import cloudFetch from "@/modules/instances/cloudFetch"; +import localFetch from "@/modules/instances/localFetch"; interface DashboardProps { user?: { @@ -26,6 +28,17 @@ interface DashboardProps { accessToken: string; } +const cogneeInstances = { + cloudCognee: { + name: "CloudCognee", + fetch: cloudFetch, + }, + localCognee: { + name: "LocalCognee", + fetch: localFetch, + } +}; + export default function Dashboard({ accessToken }: DashboardProps) { fetch.setAccessToken(accessToken); const { user } = useAuthenticatedUser(); @@ -38,7 +51,7 @@ export default function Dashboard({ accessToken }: DashboardProps) { updateNotebook, saveNotebook, removeNotebook, - } = useNotebooks(); + } = useNotebooks(cogneeInstances.localCognee); useEffect(() => { if (!notebooks.length) { diff --git a/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx b/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx index 0c764ef92..69cdbc277 100644 --- a/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx +++ b/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx @@ -134,7 +134,7 @@ export default function DatasetsAccordion({ } = useBoolean(false); const [datasetToRemove, setDatasetToRemove] = useState(null); - + const handleDatasetRemove = (dataset: Dataset) => { setDatasetToRemove(dataset); openRemoveDatasetModal(); diff --git a/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx b/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx index f094f7caf..3bfa3c057 100644 --- a/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx +++ b/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx @@ -3,6 +3,7 @@ import { useCallback, useEffect } from "react"; import { fetch, isCloudEnvironment, useBoolean } from "@/utils"; import { checkCloudConnection } from "@/modules/cloud"; +import { setApiKey } from "@/modules/instances/cloudFetch"; import { CaretIcon, CloseIcon, CloudIcon, LocalCogneeIcon } from "@/ui/Icons"; import { CTAButton, GhostButton, IconButton, Input, Modal } from "@/ui/elements"; @@ -24,6 +25,7 @@ export default function InstanceDatasetsAccordion({ onDatasetsChange }: Instance const checkConnectionToCloudCognee = useCallback((apiKey?: string) => { if (apiKey) { fetch.setApiKey(apiKey); + setApiKey(apiKey); } return checkCloudConnection() .then(setCloudCogneeConnected) diff --git a/cognee-frontend/src/app/plan/Plan.tsx b/cognee-frontend/src/app/plan/Plan.tsx index 3fd181270..8dfcc470f 100644 --- a/cognee-frontend/src/app/plan/Plan.tsx +++ b/cognee-frontend/src/app/plan/Plan.tsx @@ -45,7 +45,7 @@ export default function Plan() {
Affordable and transparent pricing
- +
Basic
diff --git a/cognee-frontend/src/modules/chat/hooks/useChat.ts b/cognee-frontend/src/modules/chat/hooks/useChat.ts index ed5bc4d79..be6ab8e51 100644 --- a/cognee-frontend/src/modules/chat/hooks/useChat.ts +++ b/cognee-frontend/src/modules/chat/hooks/useChat.ts @@ -40,7 +40,7 @@ export default function useChat(dataset: Dataset) { setTrue: disableSearchRun, setFalse: enableSearchRun, } = useBoolean(false); - + const refreshChat = useCallback(async () => { const data = await fetchMessages(); return setMessages(data); diff --git a/cognee-frontend/src/modules/ingestion/useDatasets.ts b/cognee-frontend/src/modules/ingestion/useDatasets.ts index e25d9f932..9e9cb8fc0 100644 --- a/cognee-frontend/src/modules/ingestion/useDatasets.ts +++ b/cognee-frontend/src/modules/ingestion/useDatasets.ts @@ -46,7 +46,7 @@ function useDatasets(useCloud = false) { // checkDatasetStatuses(datasets); // }, 50000); // }, [fetchDatasetStatuses]); - + // useEffect(() => { // return () => { // if (statusTimeout.current !== null) { @@ -95,6 +95,7 @@ function useDatasets(useCloud = false) { }) .catch((error) => { console.error('Error fetching datasets:', error); + throw error; }); }, [useCloud]); diff --git a/cognee-frontend/src/modules/instances/cloudFetch.ts b/cognee-frontend/src/modules/instances/cloudFetch.ts new file mode 100644 index 000000000..6806feac8 --- /dev/null +++ b/cognee-frontend/src/modules/instances/cloudFetch.ts @@ -0,0 +1,59 @@ +import handleServerErrors from "@/utils/handleServerErrors"; + +// let numberOfRetries = 0; + +const cloudApiUrl = process.env.NEXT_PUBLIC_CLOUD_API_URL || "http://localhost:8001"; + +let apiKey: string | null = process.env.NEXT_PUBLIC_COGWIT_API_KEY || null; + +export function setApiKey(newApiKey: string) { + apiKey = newApiKey; +}; + +export default async function cloudFetch(url: URL | RequestInfo, options: RequestInit = {}): Promise { + // function retry(lastError: Response) { + // if (numberOfRetries >= 1) { + // return Promise.reject(lastError); + // } + + // numberOfRetries += 1; + + // return global.fetch("/auth/token") + // .then(() => { + // return fetch(url, options); + // }); + // } + + const authHeaders = { + "Authorization": `X-Api-Key ${apiKey}`, + }; + + return global.fetch( + cloudApiUrl + "/api" + (typeof url === "string" ? url : url.toString()).replace("/v1", ""), + { + ...options, + headers: { + ...options.headers, + ...authHeaders, + } as HeadersInit, + credentials: "include", + }, + ) + .then((response) => handleServerErrors(response, null, true)) + .catch((error) => { + if (error.message === "NEXT_REDIRECT") { + throw error; + } + + if (error.detail === undefined) { + return Promise.reject( + new Error("No connection to the server.") + ); + } + + return Promise.reject(error); + }); + // .finally(() => { + // numberOfRetries = 0; + // }); +} diff --git a/cognee-frontend/src/modules/instances/localFetch.ts b/cognee-frontend/src/modules/instances/localFetch.ts new file mode 100644 index 000000000..0fa95cfbf --- /dev/null +++ b/cognee-frontend/src/modules/instances/localFetch.ts @@ -0,0 +1,27 @@ +import handleServerErrors from "@/utils/handleServerErrors"; + +const localApiUrl = process.env.NEXT_PUBLIC_LOCAL_API_URL || "http://localhost:8000"; + +export default async function localFetch(url: URL | RequestInfo, options: RequestInit = {}): Promise { + return global.fetch( + localApiUrl + "/api" + (typeof url === "string" ? url : url.toString()), + { + ...options, + credentials: "include", + }, + ) + .then((response) => handleServerErrors(response, null, false)) + .catch((error) => { + if (error.message === "NEXT_REDIRECT") { + throw error; + } + + if (error.detail === undefined) { + return Promise.reject( + new Error("No connection to the server.") + ); + } + + return Promise.reject(error); + }); +} diff --git a/cognee-frontend/src/modules/instances/types.ts b/cognee-frontend/src/modules/instances/types.ts new file mode 100644 index 000000000..5becdf53f --- /dev/null +++ b/cognee-frontend/src/modules/instances/types.ts @@ -0,0 +1,4 @@ +export interface CogneeInstance { + name: string; + fetch: typeof global.fetch; +} diff --git a/cognee-frontend/src/modules/notebooks/createNotebook.ts b/cognee-frontend/src/modules/notebooks/createNotebook.ts new file mode 100644 index 000000000..270a932ad --- /dev/null +++ b/cognee-frontend/src/modules/notebooks/createNotebook.ts @@ -0,0 +1,13 @@ +import { CogneeInstance } from "@/modules/instances/types"; + +export default function createNotebook(notebookName: string, instance: CogneeInstance) { + return instance.fetch("/v1/notebooks/", { + body: JSON.stringify({ name: notebookName }), + method: "POST", + headers: { + "Content-Type": "application/json", + }, + }).then((response: Response) => + response.ok ? response.json() : Promise.reject(response) + ); +} diff --git a/cognee-frontend/src/modules/notebooks/deleteNotebook.ts b/cognee-frontend/src/modules/notebooks/deleteNotebook.ts new file mode 100644 index 000000000..2718526b5 --- /dev/null +++ b/cognee-frontend/src/modules/notebooks/deleteNotebook.ts @@ -0,0 +1,7 @@ +import { CogneeInstance } from "@/modules/instances/types"; + +export default function deleteNotebook(notebookId: string, instance: CogneeInstance) { + return instance.fetch(`/v1/notebooks/${notebookId}`, { + method: "DELETE", + }); +} diff --git a/cognee-frontend/src/modules/notebooks/getNotebooks.ts b/cognee-frontend/src/modules/notebooks/getNotebooks.ts new file mode 100644 index 000000000..2f6afa817 --- /dev/null +++ b/cognee-frontend/src/modules/notebooks/getNotebooks.ts @@ -0,0 +1,12 @@ +import { CogneeInstance } from "@/modules/instances/types"; + +export default function getNotebooks(instance: CogneeInstance) { + return instance.fetch("/v1/notebooks/", { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }).then((response: Response) => + response.ok ? response.json() : Promise.reject(response) + ); +} diff --git a/cognee-frontend/src/modules/notebooks/runNotebookCell.ts b/cognee-frontend/src/modules/notebooks/runNotebookCell.ts new file mode 100644 index 000000000..26df16d46 --- /dev/null +++ b/cognee-frontend/src/modules/notebooks/runNotebookCell.ts @@ -0,0 +1,14 @@ +import { Cell } from "@/ui/elements/Notebook/types"; +import { CogneeInstance } from "@/modules/instances/types"; + +export default function runNotebookCell(notebookId: string, cell: Cell, instance: CogneeInstance) { + return instance.fetch(`/v1/notebooks/${notebookId}/${cell.id}/run`, { + body: JSON.stringify({ + content: cell.content, + }), + method: "POST", + headers: { + "Content-Type": "application/json", + }, + }).then((response: Response) => response.json()); +} diff --git a/cognee-frontend/src/modules/notebooks/saveNotebook.ts b/cognee-frontend/src/modules/notebooks/saveNotebook.ts new file mode 100644 index 000000000..58a042300 --- /dev/null +++ b/cognee-frontend/src/modules/notebooks/saveNotebook.ts @@ -0,0 +1,13 @@ +import { CogneeInstance } from "@/modules/instances/types"; + +export default function saveNotebook(notebookId: string, notebookData: object, instance: CogneeInstance) { + return instance.fetch(`/v1/notebooks/${notebookId}`, { + body: JSON.stringify(notebookData), + method: "PUT", + headers: { + "Content-Type": "application/json", + }, + }).then((response: Response) => + response.ok ? response.json() : Promise.reject(response) + ); +} diff --git a/cognee-frontend/src/modules/notebooks/useNotebooks.ts b/cognee-frontend/src/modules/notebooks/useNotebooks.ts index e427f85ee..57da95b81 100644 --- a/cognee-frontend/src/modules/notebooks/useNotebooks.ts +++ b/cognee-frontend/src/modules/notebooks/useNotebooks.ts @@ -1,20 +1,18 @@ import { useCallback, useState } from "react"; -import { fetch, isCloudEnvironment } from "@/utils"; import { Cell, Notebook } from "@/ui/elements/Notebook/types"; +import { CogneeInstance } from "@/modules/instances/types"; +import createNotebook from "./createNotebook"; +import deleteNotebook from "./deleteNotebook"; +import getNotebooks from "./getNotebooks"; +import runNotebookCell from "./runNotebookCell"; +import { default as persistNotebook } from "./saveNotebook"; -function useNotebooks() { +function useNotebooks(instance: CogneeInstance) { const [notebooks, setNotebooks] = useState([]); const addNotebook = useCallback((notebookName: string) => { - return fetch("/v1/notebooks", { - body: JSON.stringify({ name: notebookName }), - method: "POST", - headers: { - "Content-Type": "application/json", - }, - }, isCloudEnvironment()) - .then((response) => response.json()) - .then((notebook) => { + return createNotebook(notebookName, instance) + .then((notebook: Notebook) => { setNotebooks((notebooks) => [ ...notebooks, notebook, @@ -22,36 +20,29 @@ function useNotebooks() { return notebook; }); - }, []); + }, [instance]); const removeNotebook = useCallback((notebookId: string) => { - return fetch(`/v1/notebooks/${notebookId}`, { - method: "DELETE", - }, isCloudEnvironment()) + return deleteNotebook(notebookId, instance) .then(() => { setNotebooks((notebooks) => notebooks.filter((notebook) => notebook.id !== notebookId) ); }); - }, []); + }, [instance]); const fetchNotebooks = useCallback(() => { - return fetch("/v1/notebooks", { - headers: { - "Content-Type": "application/json", - }, - }, isCloudEnvironment()) - .then((response) => response.json()) + return getNotebooks(instance) .then((notebooks) => { setNotebooks(notebooks); return notebooks; }) .catch((error) => { - console.error("Error fetching notebooks:", error); + console.error("Error fetching notebooks:", error.detail); throw error }); - }, []); + }, [instance]); const updateNotebook = useCallback((updatedNotebook: Notebook) => { setNotebooks((existingNotebooks) => @@ -64,20 +55,13 @@ function useNotebooks() { }, []); const saveNotebook = useCallback((notebook: Notebook) => { - return fetch(`/v1/notebooks/${notebook.id}`, { - body: JSON.stringify({ - name: notebook.name, - cells: notebook.cells, - }), - method: "PUT", - headers: { - "Content-Type": "application/json", - }, - }, isCloudEnvironment()) - .then((response) => response.json()) - }, []); + return persistNotebook(notebook.id, { + name: notebook.name, + cells: notebook.cells, + }, instance); + }, [instance]); - const runCell = useCallback((notebook: Notebook, cell: Cell, cogneeInstance: string) => { + const runCell = useCallback((notebook: Notebook, cell: Cell) => { setNotebooks((existingNotebooks) => existingNotebooks.map((existingNotebook) => existingNotebook.id === notebook.id ? { @@ -89,20 +73,11 @@ function useNotebooks() { error: undefined, } : existingCell ), - } : notebook + } : existingNotebook ) ); - return fetch(`/v1/notebooks/${notebook.id}/${cell.id}/run`, { - body: JSON.stringify({ - content: cell.content, - }), - method: "POST", - headers: { - "Content-Type": "application/json", - }, - }, cogneeInstance === "cloud") - .then((response) => response.json()) + return runNotebookCell(notebook.id, cell, instance) .then((response) => { setNotebooks((existingNotebooks) => existingNotebooks.map((existingNotebook) => @@ -115,11 +90,11 @@ function useNotebooks() { error: response.error, } : existingCell ), - } : notebook + } : existingNotebook ) ); }); - }, []); + }, [instance]); return { notebooks, diff --git a/cognee-frontend/src/ui/Icons/GitHubIcon.tsx b/cognee-frontend/src/ui/Icons/GitHubIcon.tsx index 590b2c217..76b34a81f 100644 --- a/cognee-frontend/src/ui/Icons/GitHubIcon.tsx +++ b/cognee-frontend/src/ui/Icons/GitHubIcon.tsx @@ -7,4 +7,4 @@ export default function GitHubIcon({ width = 24, height = 24, color = 'currentCo ); -} \ No newline at end of file +} diff --git a/cognee-frontend/src/ui/Layout/Header.tsx b/cognee-frontend/src/ui/Layout/Header.tsx index 1bc57f699..53f053f2e 100644 --- a/cognee-frontend/src/ui/Layout/Header.tsx +++ b/cognee-frontend/src/ui/Layout/Header.tsx @@ -46,7 +46,7 @@ export default function Header({ user }: HeaderProps) { checkMCPConnection(); const interval = setInterval(checkMCPConnection, 30000); - + return () => clearInterval(interval); }, [setMCPConnected, setMCPDisconnected]); diff --git a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx index 8b471dd51..c9a2c328a 100644 --- a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx +++ b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx @@ -90,7 +90,7 @@ export default function SearchView() { scrollToBottom(); setSearchInputValue(""); - + // Pass topK to sendMessage sendMessage(chatInput, searchType, topK) .then(scrollToBottom) @@ -171,4 +171,4 @@ export default function SearchView() {
); -} \ No newline at end of file +} diff --git a/cognee-frontend/src/ui/elements/Modal/index.ts b/cognee-frontend/src/ui/elements/Modal/index.ts index 6386401d6..b4740f10c 100644 --- a/cognee-frontend/src/ui/elements/Modal/index.ts +++ b/cognee-frontend/src/ui/elements/Modal/index.ts @@ -1,3 +1,2 @@ export { default as Modal } from "./Modal"; export { default as useModal } from "./useModal"; - diff --git a/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx b/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx new file mode 100644 index 000000000..9e9f82a2e --- /dev/null +++ b/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx @@ -0,0 +1,76 @@ +import { memo } from "react"; +import ReactMarkdown from "react-markdown"; + +interface MarkdownPreviewProps { + content: string; + className?: string; +} + +function MarkdownPreview({ content, className = "" }: MarkdownPreviewProps) { + return ( +
+

{children}

, + h2: ({ children }) =>

{children}

, + h3: ({ children }) =>

{children}

, + h4: ({ children }) =>

{children}

, + h5: ({ children }) =>
{children}
, + h6: ({ children }) =>
{children}
, + p: ({ children }) =>

{children}

, + ul: ({ children }) =>
    {children}
, + ol: ({ children }) =>
    {children}
, + li: ({ children }) =>
  • {children}
  • , + blockquote: ({ children }) => ( +
    {children}
    + ), + code: ({ className, children, ...props }) => { + const isInline = !className; + return isInline ? ( + + {children} + + ) : ( + + {children} + + ); + }, + pre: ({ children }) => ( +
    +              {children}
    +            
    + ), + a: ({ href, children }) => ( + + {children} + + ), + strong: ({ children }) => {children}, + em: ({ children }) => {children}, + hr: () =>
    , + table: ({ children }) => ( +
    + {children}
    +
    + ), + thead: ({ children }) => {children}, + tbody: ({ children }) => {children}, + tr: ({ children }) => {children}, + th: ({ children }) => ( + + {children} + + ), + td: ({ children }) => ( + {children} + ), + }} + > + {content} +
    +
    + ); +} + +export default memo(MarkdownPreview); diff --git a/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx b/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx index 69556552b..3ddafe728 100644 --- a/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx +++ b/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx @@ -2,15 +2,17 @@ import { v4 as uuid4 } from "uuid"; import classNames from "classnames"; -import { Fragment, MouseEvent, RefObject, useCallback, useEffect, useRef, useState } from "react"; +import { Fragment, MouseEvent, MutableRefObject, useCallback, useEffect, useRef, useState, memo } from "react"; import { useModal } from "@/ui/elements/Modal"; import { CaretIcon, CloseIcon, PlusIcon } from "@/ui/Icons"; -import { IconButton, PopupMenu, TextArea, Modal, GhostButton, CTAButton } from "@/ui/elements"; +import PopupMenu from "@/ui/elements/PopupMenu"; +import { IconButton, TextArea, Modal, GhostButton, CTAButton } from "@/ui/elements"; import { GraphControlsAPI } from "@/app/(graph)/GraphControls"; import GraphVisualization, { GraphVisualizationAPI } from "@/app/(graph)/GraphVisualization"; import NotebookCellHeader from "./NotebookCellHeader"; +import MarkdownPreview from "./MarkdownPreview"; import { Cell, Notebook as NotebookType } from "./types"; interface NotebookProps { @@ -19,7 +21,186 @@ interface NotebookProps { updateNotebook: (updatedNotebook: NotebookType) => void; } +interface NotebookCellProps { + cell: Cell; + index: number; + isOpen: boolean; + isMarkdownEditMode: boolean; + onToggleOpen: () => void; + onToggleMarkdownEdit: () => void; + onContentChange: (value: string) => void; + onCellRun: (cell: Cell, cogneeInstance: string) => Promise; + onCellRename: (cell: Cell) => void; + onCellRemove: (cell: Cell) => void; + onCellUp: (cell: Cell) => void; + onCellDown: (cell: Cell) => void; + onCellAdd: (afterCellIndex: number, cellType: "markdown" | "code") => void; +} + +const NotebookCell = memo(function NotebookCell({ + cell, + index, + isOpen, + isMarkdownEditMode, + onToggleOpen, + onToggleMarkdownEdit, + onContentChange, + onCellRun, + onCellRename, + onCellRemove, + onCellUp, + onCellDown, + onCellAdd, +}: NotebookCellProps) { + return ( + +
    +
    + {cell.type === "code" ? ( + <> +
    + + + +
    + + + + {isOpen && ( + <> +