Skip to content

feat: notte.cc integration#133

Merged
thisisfixer merged 3 commits intomainfrom
feat/notte
Apr 18, 2025
Merged

feat: notte.cc integration#133
thisisfixer merged 3 commits intomainfrom
feat/notte

Conversation

@TooonyChen
Copy link
Contributor

@TooonyChen TooonyChen commented Apr 10, 2025

🏷️ Notion Ticket

https://www.notion.so/notte-cc-1c18378d6a478036b271c828845c0f03?pvs=4

📝 Description

Notte.cc API Integration

Added function definitions and configuration files required for Notte.cc integration, including:

  • Browser session management
  • Page observation and navigation
  • Content scraping capabilities

Implemented Functions

Currently implemented and working functions:

  • NOTTE__START_SESSION: Create new browser sessions
  • NOTTE__OBSERVE_PAGE: Observe available actions on a given URL
  • NOTTE__SCRAPE_DATA: Extract data from specified URLs

Pending Functions

The following functions are documented and finished but not yet implemented due to API issues:

  • NOTTE__CLOSE_SESSION: Currently not working due to API server issue
  • NOTTE__STEP_IN_PAGE: Not working due to unclear action_id parameter requirements in API documentation

Notes

  • API endpoint for session creation has changed from /session/start to /sessions/start (documented in Notion)
  • All implemented functions have been tested and validated
  • Functions with known issues will be added once the API provider resolves the reported problems
  • Each function includes proper parameter validation and documentation
  • Implementation follows the standard API integration pattern used in other services

Summary by CodeRabbit

  • New Features
    • Introduced an application configuration defining metadata, display properties, and security settings for public access.
    • Launched three new API endpoints enabling users to start browser sessions, observe webpage actions, and scrape data with customizable session options.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces two new JSON files for the NOTTE application. The first file defines the application's metadata, including its name, display name, logo URL, provider, version, description, security scheme, categorization, and visibility status. The second file sets up three REST API endpoints related to browser session management: starting a session, observing a page, and scraping data, with detailed parameter requirements for each endpoint.

Changes

File(s) Change Summary
apps/notte/app.json New configuration file for NOTTE outlining metadata, security scheme (API key in header with Bearer prefix), application categorization (search, scrape, web), visibility (public), and active status.
apps/notte/functions.json New REST API endpoint definitions for browser session management and web environment interaction, including:
- NOTTE__START_SESSION (starts a new browser session)
- NOTTE__OBSERVE_PAGE (observes page actions)
- NOTTE__SCRAPE_DATA (scrapes page data)

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant NOTTE_Server

    Client->>NOTTE_Server: POST /sessions/start {optional: session_id, keep_alive, session_timeout, screenshot}
    NOTTE_Server-->>Client: Returns Session ID

    Client->>NOTTE_Server: POST /env/observe {session_id, url, optional: keep_alive, session_timeout}
    NOTTE_Server-->>Client: Returns Observed Page Data

    Client->>NOTTE_Server: POST /env/scrape {session_id, url, optional: keep_alive, session_timeout, screenshot}
    NOTTE_Server-->>Client: Returns Scraped Data
Loading

Possibly related PRs

  • feat: notte.cc integration #133: Adds the same JSON configuration and REST API endpoint definitions for the NOTTE application, indicating direct relation and overlapping integration work.

Poem

In the code garden I softly hop,
New configs and endpoints make my heart stop.
A session starts with a gentle key,
Observing and scraping so magically free.
I, the rabbit, cheer with a joyful bound,
In digital fields, where wonders are found!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76791ab and d81afcd.

📒 Files selected for processing (1)
  • apps/notte/functions.json (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@thisisfixer thisisfixer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you run fuzzy test? can you please attach the proof of the test result

@TooonyChen
Copy link
Contributor Author

have you run fuzzy test? can you please attach the proof of the test result

Proof of the test result:

root@nz-debian:~/aipolabs# docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \
>   --function-name NOTTE__START_SESSION \
>   --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \
>   --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \
>   --prompt "Start a new browser session with 3 minute timeout and enable screenshot"
───────────────────────────────────────────────────────────── Function definition Fetched ──────────────────────────────────────────────────────────────
{
    'type': 'function',
    'function': {
        'name': 'NOTTE__START_SESSION',
        'description': 'Starts a new browser session and returns a session ID. An existing session cannot provide a session ID during creation.',
        'parameters': {
            'type': 'object',
            'required': ['body'],
            'properties': {
                'body': {
                    'type': 'object',
                    'required': [],
                    'properties': {
                        'keep_alive': {
                            'type': 'boolean',
                            'default': False,
                            'description': 'Optional parameter to keep the session alive beyond its timeout period.'
                        },
                        'screenshot': {
                            'type': 'boolean',
                            'default': False,
                            'description': 'Optional parameter to request a screenshot during the session.'
                        },
                        'session_id': {
                            'type': 'string',
                            'default': None,
                            'description': 'Optional parameter to specify a session ID. Session ID should not be provided when starting a new session.'
                        },
                        'session_timeout': {
                            'type': 'integer',
                            'default': 10,
                            'description': 'Optional parameter to set a custom timeout for the session. Specify the timeout in minutes.'
                        }
                    },
                    'additionalProperties': False
                }
            },
            'additionalProperties': False
        }
    }
}
────────────────────────────────────────────────────────── Generated Function Call Arguments ───────────────────────────────────────────────────────────
{'body': {'session_timeout': 3, 'screenshot': True}}
────────────────────────────────────────────────────── Execution Result for NOTTE__START_SESSION ───────────────────────────────────────────────────────
{
    'success': True,
    'data': {
        'session_id': '47d759a5-5038-4221-92c6-dc2780fbb771',
        'timeout_minutes': 3,
        'created_at': '2025-04-12T20:04:25.469794Z',
        'closed_at': None,
        'last_accessed_at': '2025-04-12T20:04:26.079737Z',
        'duration': 'PT0.609962S',
        'status': 'active',
        'error': None,
        'proxies': False,
        'browser_type': 'chromium'
    }
}
root@nz-debian:~/aipolabs# 

root@nz-debian:~/aipolabs# docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \
>   --function-name NOTTE__OBSERVE_PAGE \
>   --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \
>   --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \
>   --prompt "Observe the page at https://example.com and identify available actions with session ID 47d759a5-5038-4221-92c6-dc2780fbb771"
───────────────────────────────────────────────────────────── Function definition Fetched ──────────────────────────────────────────────────────────────
{
    'type': 'function',
    'function': {
        'name': 'NOTTE__OBSERVE_PAGE',
        'description': "This endpoint observes the actions available on a given URL within the session's environment.",
        'parameters': {
            'type': 'object',
            'required': ['body'],
            'properties': {
                'body': {
                    'type': 'object',
                    'required': ['url'],
                    'properties': {
                        'url': {
                            'type': 'string',
                            'description': 'Required parameter to specify the URL to observe. The URL to analyze and fetch available actions.'
                        },
                        'keep_alive': {
                            'type': 'boolean',
                            'default': False,
                            'description': 'Optional parameter to keep the session alive beyond its timeout period.'
                        },
                        'session_id': {
                            'type': 'string',
                            'description': 'Optional parameter to specify the session ID. The session ID of the session within which the environment 
will be observed.'
                        },
                        'session_timeout': {
                            'type': 'integer',
                            'default': 10,
                            'description': 'Optional parameter to set a custom timeout for the session. Specify the timeout in minutes.'
                        }
                    },
                    'additionalProperties': False
                }
            },
            'additionalProperties': False
        }
    }
}
────────────────────────────────────────────────────────── Generated Function Call Arguments ───────────────────────────────────────────────────────────
{'body': {'url': 'https://example.com', 'session_id': '47d759a5-5038-4221-92c6-dc2780fbb771'}}
─────────────────────────────────────────────────────── Execution Result for NOTTE__OBSERVE_PAGE ───────────────────────────────────────────────────────
{
    'success': True,
    'data': {
        'session': {
            'session_id': '47d759a5-5038-4221-92c6-dc2780fbb771',
            'timeout_minutes': 3,
            'created_at': '2025-04-12T20:04:25.469794Z',
            'closed_at': None,
            'last_accessed_at': '2025-04-12T20:05:43.464339Z',
            'duration': 'PT1M17.994569S',
            'status': 'active',
            'error': None,
            'proxies': False,
            'browser_type': 'chromium'
        },
        'space': {
            'markdown': "# Navigation\n* L1: Open the page with more information about the example domain\n\n# Special Browser Actions\n* S1: Go to a 
specific URL ([ActionParameter(name='url', type='string', default=None, values=[])])\n* S10: Scroll down ([ActionParameter(name='amount', type='int', 
default=None, values=[])])\n* S11: Wait for a specific amount of time (in ms) ([ActionParameter(name='time_ms', type='int', default=None, 
values=[])])\n* S12: Terminate the current session\n* S2: Scrape data from the current page\n* S3: Go to the previous page\n* S4: Go to the next page\n*
S5: Refresh the current page\n* S6: Go to a new tab ([ActionParameter(name='url', type='string', default=None, values=[])])\n* S7: Switch to a specific 
tab ([ActionParameter(name='tab_index', type='int', default=None, values=[])])\n* S8: Press a specific key ([ActionParameter(name='key', type='string', 
default=None, values=[])])\n* S9: Scroll up ([ActionParameter(name='amount', type='int', default=None, values=[])])",
            'actions': [
                {
                    'id': 'L1',
                    'description': 'Open the page with more information about the example domain',
                    'category': 'Navigation',
                    'params': [],
                    'status': 'valid'
                }
            ],
            'browser_actions': [
                {
                    'id': 'S1',
                    'description': 'Go to a specific URL',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'url', 'type': 'string', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {
                    'id': 'S2',
                    'description': 'Scrape data from the current page',
                    'category': 'Special Browser Actions',
                    'params': [],
                    'status': 'valid'
                },
                {'id': 'S3', 'description': 'Go to the previous page', 'category': 'Special Browser Actions', 'params': [], 'status': 'valid'},
                {'id': 'S4', 'description': 'Go to the next page', 'category': 'Special Browser Actions', 'params': [], 'status': 'valid'},
                {'id': 'S5', 'description': 'Refresh the current page', 'category': 'Special Browser Actions', 'params': [], 'status': 'valid'},
                {
                    'id': 'S11',
                    'description': 'Wait for a specific amount of time (in ms)',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'time_ms', 'type': 'int', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {'id': 'S12', 'description': 'Terminate the current session', 'category': 'Special Browser Actions', 'params': [], 'status': 'valid'},
                {
                    'id': 'S8',
                    'description': 'Press a specific key',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'key', 'type': 'string', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {
                    'id': 'S9',
                    'description': 'Scroll up',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'amount', 'type': 'int', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {
                    'id': 'S10',
                    'description': 'Scroll down',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'amount', 'type': 'int', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {
                    'id': 'S6',
                    'description': 'Go to a new tab',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'url', 'type': 'string', 'default': None, 'values': []}],
                    'status': 'valid'
                },
                {
                    'id': 'S7',
                    'description': 'Switch to a specific tab',
                    'category': 'Special Browser Actions',
                    'params': [{'name': 'tab_index', 'type': 'int', 'default': None, 'values': []}],
                    'status': 'valid'
                }
            ],
            'description': 'The provided web document is a simple webpage with a link to "More information..." about the example domain. Users can click
on this link to navigate to an external webpage for further details. The main content of the document is informative text about the example domain.',
            'category': 'item'
        },
        'metadata': {
            'title': 'Example Domain',
            'url': 'https://example.com/',
            'viewport': {'scroll_x': 0, 'scroll_y': 0, 'viewport_width': 1280, 'viewport_height': 1020, 'total_width': 1280, 'total_height': 1020},
            'tabs': [{'tab_id': 0, 'title': 'Example Domain', 'url': 'https://example.com/'}],
            'timestamp': '2025-04-12T20:05:41.408843'
        },
        'screenshot': 
'iVBORw0KGgoAAAANSUhEUgAABQAAAAP8CAIAAACWBoT4AAAAAXNSR0IArs4c6QAAIABJREFUeJzs3XlcTfn/wPFzu+1pF0oqjGUojZg0qISy7zuZsQ+y74NC2ffEfInBjH0bopAt+2RLjLGPGTOWkEo
SaarfH+f3OHPcW7dbGGbu6/nw8Ljncz7ncz7nc5bu+57P+RxFWlq6AAAAAADAf53eh64AAAAAAAD/BAJgAAAAAIBOIAAGAAAAAOgEAmAAAAAAgE4gAAYAAAAA6AQCYAAAAACATiAABgAAAADoBAJgAAA
AAIBOIAAGAAAAAOgEAmAAAAAAgE4gAAYAAAAA6AQCYAAA.... // screenshot result too long, ignored here,
        'data': {
            'markdown': '# Example Domain\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without 
prior coordination or asking for permission.\n[More information...](https://www.iana.org/domains/example)',
            'images': None,
            'structured': None
        },
        'progress': {'current_step': 0, 'max_steps': 20}
    }
}
root@nz-debian:~/aipolabs# docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \
>   --function-name NOTTE__SCRAPE_DATA \
>   --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \
>   --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \
>   --prompt "Scrape data from https://news.ycombinator.com and take a screenshot"
───────────────────────────────────────────────────────────── Function definition Fetched ──────────────────────────────────────────────────────────────
{
    'type': 'function',
    'function': {
        'name': 'NOTTE__SCRAPE_DATA',
        'description': "This endpoint scrapes data from a specified URL within the session's environment.",
        'parameters': {
            'type': 'object',
            'required': ['body'],
            'properties': {
                'body': {
                    'type': 'object',
                    'required': ['url'],
                    'properties': {
                        'url': {'type': 'string', 'default': None, 'description': 'URL to scrape data from.'},
                        'keep_alive': {
                            'type': 'boolean',
                            'default': False,
                            'description': 'Optional parameter to keep the session alive beyond its timeout period.'
                        },
                        'screenshot': {
                            'type': 'boolean',
                            'default': None,
                            'description': 'Optional parameter to request a screenshot of the scraped page.'
                        },
                        'session_id': {'type': 'string', 'default': None, 'description': 'Optional parameter to specify the session ID.'},
                        'session_timeout': {
                            'type': 'integer',
                            'default': 10,
                            'description': 'Optional parameter to set a custom timeout for the session. Specify the timeout in minutes.'
                        }
                    },
                    'additionalProperties': False
                }
            },
            'additionalProperties': False
        }
    }
}
────────────────────────────────────────────────────────── Generated Function Call Arguments ───────────────────────────────────────────────────────────
{'body': {'url': 'https://news.ycombinator.com', 'screenshot': True}}
─────────────────────────────────────────────────────── Execution Result for NOTTE__SCRAPE_DATA ────────────────────────────────────────────────────────
{
    'success': True,
    'data': {
        'session': {
            'session_id': '8532b0fc-d2ac-481d-9883-5edb9bd6a067',
            'timeout_minutes': 3,
            'created_at': '2025-04-12T20:07:36.265436Z',
            'closed_at': None,
            'last_accessed_at': '2025-04-12T20:07:40.588038Z',
            'duration': 'PT4.322626S',
            'status': 'active',
            'error': None,
            'proxies': False,
            'browser_type': 'chromium'
        },
        'space': None,
        'metadata': {
            'title': 'Hacker News',
            'url': 'https://news.ycombinator.com/',
            'viewport': {'scroll_x': 0, 'scroll_y': 0, 'viewport_width': 1280, 'viewport_height': 1020, 'total_width': 1280, 'total_height': 1209},
            'tabs': [{'tab_id': 0, 'title': 'Hacker News', 'url': 'https://news.ycombinator.com/'}],
            'timestamp': '2025-04-12T20:07:38.563619'
        },
        'screenshot': 
// screenshot result too long, ignored here

@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-14 09:24:52.791

This review analyzes changes to integration files in the app/ directories.

Code Review: Notte.cc Integration

1. apps/notte/app.json

The app.json file looks good overall. It properly defines the integration metadata, security scheme, and categories.

2. apps/notte/functions.json

Issue 1: Inconsistent Required Parameters

File: apps/notte/functions.json, Line 41-42

Problem: The required array is empty in the NOTTE__START_SESSION function's body parameters, but the function description suggests that certain parameters might be required for proper functionality.

Suggested Solution: Based on the function description, consider whether any parameters should be marked as required. If none are truly required, the current implementation is correct, but the description should be updated to clarify this.

Issue 2: Default Values for Optional Parameters

File: apps/notte/functions.json, Line 118-119

Problem: The url parameter has a default value of null but is marked as required in the required array.

Suggested Solution: Remove the default value for required parameters. Required parameters should not have default values as they must be provided by the user.

"url": {
  "type": "string",
  "description": "URL to scrape data from."
}

Issue 3: Inconsistent Default Values

File: apps/notte/functions.json, Line 137-138

Problem: The screenshot parameter has a default value of null which is inconsistent with the boolean type.

Suggested Solution: Change the default value to false to be consistent with the parameter type:

"screenshot": {
  "type": "boolean",
  "description": "Optional parameter to request a screenshot of the scraped page.",
  "default": false
}

Issue 4: Session ID Description Inconsistency

File: apps/notte/functions.json, Line 20-23

Problem: The description for session_id in NOTTE__START_SESSION states it "should not be provided when starting a new session" but it's included in the visible parameters.

Suggested Solution: Either:

  1. Remove it from visible parameters if it shouldn't be used, or
  2. Clarify the description to indicate when it should be used (e.g., "Only provide when resuming an existing session, leave empty when starting a new session")

Issue 5: Missing Header Parameters

File: apps/notte/functions.json, All functions

Problem: None of the functions include header parameters, which might be needed for proper API requests.

Suggested Solution: Consider adding a header parameter section to each function, especially if there are specific headers required beyond the Authorization header:

"header": {
  "type": "object",
  "description": "Headers for the HTTP request",
  "properties": {
    "Content-Type": {
      "type": "string",
      "description": "Content type of the request",
      "default": "application/json"
    }
  },
  "required": ["Content-Type"],
  "visible": ["Content-Type"],
  "additionalProperties": false
}

Summary of Changes and Impact

This PR introduces a new integration for Notte.cc, a service that transforms websites into structured, navigable maps for intelligent agents. The integration includes three main functions:

  1. NOTTE__START_SESSION: Creates a new browser session
  2. NOTTE__OBSERVE_PAGE: Observes available actions on a given URL
  3. NOTTE__SCRAPE_DATA: Extracts data from specified URLs

The integration follows the standard pattern for API integrations, with proper security scheme configuration and function specifications. The functions provide a comprehensive set of capabilities for browser session management, page observation, and content scraping.

The issues identified are mostly minor inconsistencies in parameter definitions and descriptions, which should be addressed to ensure clarity and proper functionality.

Overall Assessment

Rating: Acceptable

The integration is well-structured and follows the standard patterns for API integrations. The functions are clearly defined with appropriate descriptions, tags, and parameters. However, there are some inconsistencies in parameter definitions and descriptions that should be addressed.

Actionable Next Steps

  1. Review and address the inconsistencies in required parameters and default values
  2. Consider adding header parameters if needed for proper API requests
  3. Clarify the descriptions for parameters like session_id to provide better guidance to users
  4. Ensure all required parameters are properly marked and do not have default values
  5. Test the integration with various parameter combinations to ensure proper functionality

Once these issues are addressed, the integration should be ready for production use.

Copy link
Contributor

@thisisfixer thisisfixer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

"url": {
"type": "string",
"description": "URL to scrape data from.",
"default": null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per the bot's comment below, can you double confirm
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per the bot's comment below, can you double confirm image

I double-checked the notte.cc docs – Scrape data endpoint, and confirmed that the url parameter is assigned a default value of null.

Since parameters with default values should not be marked as required, the best fix here is to remove url from the "required" array. This aligns with the documentation and avoids the contradiction flagged by the bot.

I'll proceed with the update accordingly.

@thisisfixer
Copy link
Contributor

@TooonyChen plz see comment

@TooonyChen
Copy link
Contributor Author

@TooonyChen plz see comment

Thanks for reminding! I will check and fix it today

@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-18 00:46:48.064

This review analyzes changes to integration files in the app/ directories.

Code Review: Notte.cc Integration

Issues and Recommendations

1. apps/notte/functions.json - NOTTE__SCRAPE_DATA function

Line 140-141:

"required": [""],
"visible": ["session_id", "url", "keep_alive", "session_timeout", "screenshot"],

Problem: The required field contains an empty string instead of actual required parameters. Based on the function description, at minimum the url parameter should be required.

Suggested solution: Update the required field to include necessary parameters:

"required": ["url"],

2. apps/notte/functions.json - NOTTE__SCRAPE_DATA function

Line 122-123:

"description": "URL to scrape data from.",
"default": null

Problem: The url parameter has a null default value, but based on the function purpose, it should not have a default value as it's likely required for the function to work properly.

Suggested solution: Remove the default value for the url parameter:

"description": "URL to scrape data from."

3. apps/notte/functions.json - All functions

Lines 12, 58, 106:

"path": "/sessions/start",
"path": "/env/observe",
"path": "/env/scrape",

Problem: The paths are correctly defined, but there's no documentation in the PR description about the base URL structure or versioning. This could be helpful for future maintenance.

Suggested solution: Consider adding a comment in the PR description or documentation about the API version being used and any versioning strategy.

4. apps/notte/functions.json - NOTTE__START_SESSION function

Line 39-40:

"required": [],
"visible": ["session_id", "keep_alive", "session_timeout", "screenshot"],

Problem: The function doesn't have any required parameters, which seems unusual for an API that creates a session. While this might be correct if all parameters are optional with defaults, it's worth double-checking.

Suggested solution: Verify with the API documentation that no parameters are required for session creation. If any are required, update the required array accordingly.

5. apps/notte/functions.json - Consistency in parameter descriptions

Various lines:

Problem: There's some inconsistency in how parameters are described. Some have "Optional parameter to..." while others don't explicitly state they're optional.

Suggested solution: Standardize parameter descriptions for better readability. For example, consistently use "Optional parameter to..." for all optional parameters.

Summary of Changes and Impact

This PR introduces a new integration with Notte.cc, a service that transforms websites into structured, navigable maps for intelligent agents. The integration includes three main functions:

  1. NOTTE__START_SESSION: Creates a new browser session with configurable parameters
  2. NOTTE__OBSERVE_PAGE: Observes available actions on a given URL
  3. NOTTE__SCRAPE_DATA: Extracts data from specified URLs

The integration follows the standard pattern used in other services, with proper configuration in app.json and function definitions in functions.json. The security scheme is correctly set up to use Bearer token authentication.

The implementation will enable users to create browser sessions, navigate web pages, and extract data, which aligns with the service's purpose of making the internet more accessible to intelligent agents.

Overall Assessment

Rating: Acceptable with minor improvements needed

The integration is well-structured and follows the standard patterns for API integrations. The functions are clearly defined with appropriate parameters and descriptions. However, there are a few minor issues that should be addressed, particularly around required parameters and consistency in documentation.

Actionable Next Steps

  1. Fix the empty required array in the NOTTE__SCRAPE_DATA function to include at least the "url" parameter
  2. Review default values for parameters, especially removing null defaults for parameters that should be required
  3. Standardize parameter descriptions for consistency
  4. Consider adding more documentation about API versioning and structure
  5. Double-check that the required parameters for each function match the actual API requirements

Once these issues are addressed, the integration should be ready for production use.

@thisisfixer thisisfixer merged commit e1bb88c into main Apr 18, 2025
3 of 4 checks passed
@thisisfixer thisisfixer deleted the feat/notte branch April 18, 2025 15:05
@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-18 15:06:07.084

This review analyzes changes to integration files in the app/ directories.

Code Review: Notte.cc Integration

Issues and Recommendations

1. File: apps/notte/functions.json, Line 17-18

Issue: The server URL and path structure is not optimal.

"path": "/sessions/start",
"server_url": "https://api.notte.cc"

Recommendation: The API version should be included in the server_url field according to the special rules.

"path": "/sessions/start",
"server_url": "https://api.notte.cc/v1" // Assuming there's a version, if not, current is fine

2. File: apps/notte/functions.json, Line 42-43

Issue: The required array is empty for the body object in NOTTE__START_SESSION, but it's unclear if any parameters are actually required.

"required": [],

Recommendation: Verify with the API documentation if any parameters are required for starting a session. If none are required, this is fine, but it's unusual for an API endpoint to have no required parameters.

3. File: apps/notte/functions.json, Line 59-60

Issue: Similar to issue #1, server URL structure.

"path": "/env/observe",
"server_url": "https://api.notte.cc"

Recommendation: Ensure API version is included in server_url if applicable.

4. File: apps/notte/functions.json, Line 106-107

Issue: Similar to issue #1, server URL structure.

"path": "/env/scrape",
"server_url": "https://api.notte.cc"

Recommendation: Ensure API version is included in server_url if applicable.

5. File: apps/notte/functions.json, Line 140-141

Issue: The required array is empty for NOTTE__SCRAPE_DATA, but the function likely needs at least a URL to scrape.

"required": [],

Recommendation: Based on the function's purpose, url should likely be a required parameter. Verify with the API documentation and update accordingly:

"required": ["url"],

6. File: apps/notte/functions.json, Line 121-125

Issue: The url parameter has a default value of null, which doesn't make sense for a scraping function.

"url": {
  "type": "string",
  "description": "URL to scrape data from.",
  "default": null
},

Recommendation: Remove the default value since a null URL cannot be scraped:

"url": {
  "type": "string",
  "description": "URL to scrape data from."
},

7. File: apps/notte/functions.json, Line 117-120

Issue: The session_id parameter has a default value of null, which might cause confusion.

"session_id": {
  "type": "string",
  "description": "Optional parameter to specify the session ID.",
  "default": null
},

Recommendation: If the session_id is truly optional, consider removing the default value rather than explicitly setting it to null, as this is implied for optional parameters.

Summary of Changes and Impact

This PR introduces a new integration for Notte.cc, a service that transforms websites into structured, navigable maps for intelligent agents. The integration includes three main functions:

  1. NOTTE__START_SESSION: Creates a new browser session with configurable options
  2. NOTTE__OBSERVE_PAGE: Analyzes a URL to determine available actions
  3. NOTTE__SCRAPE_DATA: Extracts data from specified URLs

The integration is well-structured and follows most of the required patterns for API integrations. The functions are appropriately named, tagged, and described. The parameter structures are clear, with proper type definitions and descriptions.

The main issues identified are related to:

  • Potential missing required parameters in some functions
  • Default values that might not be appropriate (null URLs)
  • Possible missing API version in the server URL (if applicable)

These issues are relatively minor and don't significantly impact the functionality of the integration, but addressing them would improve clarity and robustness.

Overall Assessment

Rating: Acceptable

The integration is functional and well-documented, with clear descriptions and appropriate parameter structures. The issues identified are minor and can be easily addressed.

Next Steps for the Developer

  1. Verify if any API version should be included in the server_url fields
  2. Review the required parameters for each function, especially for NOTTE__SCRAPE_DATA where a URL is likely required
  3. Remove unnecessary default null values for parameters that are optional
  4. Consider adding more detailed descriptions for parameters to help users understand their purpose and valid values
  5. Ensure all functions have been tested with the actual API to verify functionality

Once these adjustments are made, the integration should be ready for production use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants