-
Notifications
You must be signed in to change notification settings - Fork 927
Add session participants routes #1428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
CI Feedback 🧐(Feedback updated until commit 2a0f520)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 588ba49 in 1 minute and 2 seconds. Click for details.
- Reviewed
243
lines of code in7
files - Skipped
0
files when reviewing. - Skipped posting
7
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. agents-api/agents_api/queries/sessions/__init__.py:17
- Draft comment:
New query imports for 'get_session_agents' and 'get_session_users' have been added and included in all; structure is consistent. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. agents-api/agents_api/queries/sessions/get_session_agents.py:40
- Draft comment:
The agent query function is well structured with proper error handling, metrics, and parameterized SQL. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. agents-api/agents_api/queries/sessions/get_session_users.py:35
- Draft comment:
The user query function mirrors the agent query; it properly uses decorators and parameterized SQL for security. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. agents-api/agents_api/routers/sessions/__init__.py:8
- Draft comment:
Router initialization now includes the new session agents and users endpoints; naming and import order are consistent. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. agents-api/agents_api/routers/sessions/get_session_agents.py:16
- Draft comment:
The FastAPI endpoint for listing session agents is clear; dependency injection and return type (ListResponse[Agent]) are used appropriately. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
6. agents-api/agents_api/routers/sessions/get_session_users.py:14
- Draft comment:
The FastAPI endpoint for listing session users is implemented similarly; it correctly uses dependency injection and returns the expected ListResponse. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
7. typespec/sessions/endpoints.tsp:25
- Draft comment:
New Typespec endpoints for 'listAgents' and 'listUsers' are added with proper annotations; ensure they align with backend response models. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_MvOTvnpMbpHljU1Q
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
x_developer_id: Annotated[UUID, Depends(get_developer_id)], | ||
) -> ListResponse[User]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Add pagination parameters
x_developer_id: Annotated[UUID, Depends(get_developer_id)], | |
) -> ListResponse[User]: | |
x_developer_id: Annotated[UUID, Depends(get_developer_id)], | |
limit: int = 100, | |
offset: int = 0, | |
) -> ListResponse[User]: |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
17693055 | Triggered | JSON Web Token | 2a0f520 | cli/tests/test_auth.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
User description
Summary
Testing
ruff check .
ruff format .
PR Type
Enhancement
Description
Add endpoints to list agents and users in a session
/sessions/{session_id}/agents
and/sessions/{session_id}/users
Update TypeSpec to document new session participant endpoints
Changes walkthrough 📝
6 files
Export new session agent and user query functions
Add SQL query to fetch session agents
Add SQL query to fetch session users
Export new session agent and user routers
Add API endpoint to list session agents
Add API endpoint to list session users
1 files
Add TypeSpec endpoints for session agents and users
Important
Add SQL queries and API endpoints to list session agents and users, updating TypeSpec endpoints accordingly.
get_session_agents
andget_session_users
functions inqueries/sessions
to fetch agents and users for a session.routers/sessions
to list agents (get_session_agents
) and users (get_session_users
) for a session.endpoints.tsp
to includelistAgents
andlistUsers
endpoints for sessions.queries/sessions/__init__.py
androuters/sessions/__init__.py
to include new functions.This description was created by
for 588ba49. You can customize this summary. It will automatically update as commits are pushed.