Skip to content

Commit dd48bc9

Browse files
committed
update remove autherization reference and user_id naming convention
1 parent 73dca86 commit dd48bc9

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

documentation/CustomizeSolution.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,22 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
7474

7575
**Request Headers:**
7676

77-
- `user_id`: User ID extracted from the authentication header.
77+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
7878

7979
**Request Body:** `InputTask`
8080
- `session_id`: Optional string. If not provided, a new UUID will be generated.
8181
- `description`: The description of the task the user wants to accomplish.
82-
- `user_id`: The user ID associated with the task.
82+
8383

8484
**Response:**
8585
- `status`: Confirmation message.
8686
- `session_id`: The session ID associated with the task.
8787
- `plan_id`: The ID of the plan generated.
8888
- `description`: The task description.
89-
- `user_id`: The user ID associated with the task.
89+
9090

9191
**Flow:**
92-
1. Validates the `Authorization` header and extracts the `user_id`.
92+
1. Validates header and extracts `user_principal_id` as `user_id`.
9393
2. Generates a `session_id` if not provided.
9494
3. Initializes agents and context for the session.
9595
4. Sends the `InputTask` message to the `GroupChatManager`.
@@ -102,7 +102,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
102102
**Description:** Receives human feedback on a step (e.g., approval, rejection, or modification).
103103

104104
**Request Headers:**
105-
- `user_id`: User ID extracted from the authentication header.
105+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
106106

107107
**Request Body:** `HumanFeedback`
108108
- `step_id`: The ID of the step to provide feedback for.
@@ -111,15 +111,14 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
111111
- `approved`: Boolean indicating if the step is approved.
112112
- `human_feedback`: Optional string containing any comments.
113113
- `updated_action`: Optional string if the action was modified.
114-
- `user_id`: The user ID providing the feedback.
115114

116115
**Response:**
117116
- `status`: Confirmation message.
118117
- `session_id`: The session ID.
119118
- `step_id`: The step ID associated with the feedback.
120119

121120
**Flow:**
122-
1. Validates the `Authorization` header and extracts the `user_id`.
121+
1. Validates header and extracts `user_principal_id` as `user_id`.
123122
2. Initializes runtime and context for the session.
124123
3. Sends the `HumanFeedback` message to the `HumanAgent`.
125124
4. Returns the `status`, `session_id`, and `step_id`.
@@ -131,20 +130,19 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
131130
**Description:** Receives human clarification on a plan.
132131

133132
**Request Headers:**
134-
- `user_id`: User ID extracted from the authentication header.
133+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
135134

136135
**Request Body:** `HumanClarification`
137136
- `plan_id`: The ID of the plan requiring clarification.
138137
- `session_id`: The session ID associated with the plan.
139138
- `human_clarification`: Clarification details provided by the user.
140-
- `user_id`: The user ID providing the clarification.
141139

142140
**Response:**
143141
- `status`: Confirmation message.
144142
- `session_id`: The session ID associated with the plan.
145143

146144
**Flow:**
147-
1. Validates the `Authorization` header and extracts the `user_id`.
145+
1. Validates header and extracts `user_principal_id` as `user_id`.
148146
2. Initializes runtime and context for the session.
149147
3. Sends the `HumanClarification` message to the `PlannerAgent`.
150148
4. Returns the `status` and `session_id`.
@@ -156,7 +154,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
156154

157155
**Request Headers:**
158156

159-
- `user_id`: User ID extracted from the authentication header.
157+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
160158

161159
**Request Body:** `HumanFeedback`
162160
- `step_id`: Optional step ID to approve. If not provided, all steps are approved.
@@ -165,13 +163,12 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
165163
- `approved`: Boolean indicating whether the step(s) are approved.
166164
- `human_feedback`: Optional string containing any comments.
167165
- `updated_action`: Optional string if the action was modified.
168-
- `user_id`: The user ID providing the approval.
169166

170167
**Response:**
171168
- `status`: A confirmation message indicating the approval result.
172169

173170
**Flow:**
174-
1. Validates the `Authorization` header and extracts the `user_id`.
171+
1. Validates header and extracts `user_principal_id` as `user_id`.
175172
2. Initializes runtime and context for the session.
176173
3. Sends the `HumanFeedback` approval message to the `GroupChatManager`.
177174
4. If `step_id` is provided, approves the specific step; otherwise, approves all steps.
@@ -184,7 +181,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
184181

185182
**Request Headers:**
186183

187-
- `user_id`: User ID extracted from the authentication header.
184+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
188185

189186
**Query Parameters:**
190187
- `session_id` (optional): Retrieve the plan for this specific session ID. If not provided, all plans for the user are retrieved.
@@ -206,7 +203,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
206203
- `updated_action`: Optional modified action based on feedback.
207204

208205
**Flow:**
209-
1. Validates the `Authorization` header and extracts the `user_id`.
206+
1. Validates header and extracts `user_principal_id` as `user_id`.
210207
2. If `session_id` is provided:
211208
- Retrieves the plan for the specified session ID.
212209
- Fetches the steps for the plan.
@@ -222,7 +219,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
222219

223220
**Request Headers:**
224221

225-
- `user_id`: User ID extracted from the authentication header.
222+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
226223

227224
**Path Parameters:**
228225
- `plan_id`: The ID of the plan to retrieve steps for.
@@ -239,7 +236,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
239236
- `updated_action`: Optional modified action based on feedback.
240237

241238
**Flow:**
242-
1. Validates the `Authorization` header and extracts the `user_id`.
239+
1. Validates header and extracts `user_principal_id` as `user_id`.
243240
2. Retrieves the steps for the specified `plan_id`.
244241
3. Returns the list of steps with their details.
245242

@@ -249,7 +246,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
249246
**Description:** Retrieves all agent messages for a specific session.
250247

251248
**Request Headers:**
252-
- `user_id`: User ID extracted from the authentication header.
249+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
253250

254251
**Path Parameters:**
255252
- `session_id`: The ID of the session to retrieve agent messages for.
@@ -265,7 +262,7 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
265262
- `step_id`: Optional step ID associated with the message.
266263

267264
**Flow:**
268-
1. Validates the `Authorization` header and extracts the `user_id`.
265+
1. Validates header and extracts `user_principal_id` as `user_id`.
269266
2. Retrieves the agent messages for the specified `session_id`.
270267
3. Returns the list of agent messages with their details.
271268

@@ -276,14 +273,14 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
276273

277274
**Request Headers:**
278275

279-
- `user_id`: User ID extracted from the authentication header.
276+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
280277

281278
**Response:**
282279
- A confirmation message:
283280
- `status`: A status message indicating all messages were deleted.
284281

285282
**Flow:**
286-
1. Validates the `Authorization` header and extracts the `user_id`.
283+
1. Validates header and extracts `user_principal_id` as `user_id`.
287284
2. Deletes all messages across sessions, including:
288285
- Plans
289286
- Sessions
@@ -298,19 +295,18 @@ Below, we'll dive into the details of each component, focusing on the endpoints,
298295

299296
**Request Headers:**
300297

301-
- `user_id`: User ID extracted from the authentication header.
298+
- `user_principal_id`: User ID (`user_id`) extracted from the authentication header.
302299

303300
**Response:**
304301
- A list of all messages with their details:
305302
- `id`: Unique ID of the message.
306303
- `data_type`: The type of the message (e.g., session, step, plan, agent_message).
307304
- `session_id`: The session ID associated with the message.
308-
- `user_id`: The user ID associated with the message.
309305
- `content`: The content of the message.
310306
- `ts`: The timestamp of the message.
311307

312308
**Flow:**
313-
1. Validates the `Authorization` header and extracts the `user_id`.
309+
1. Validates header and extracts `user_principal_id` as `user_id`.
314310
2. Retrieves all messages across sessions.
315311
3. Returns the list of messages with their details.
316312

src/backend/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def input_task_endpoint(input_task: InputTask, request: Request):
6363
tags:
6464
- Input Task
6565
parameters:
66-
- name: user_id
66+
- name: user_principal_id
6767
in: header
6868
type: string
6969
required: true
@@ -141,7 +141,7 @@ async def human_feedback_endpoint(human_feedback: HumanFeedback, request: Reques
141141
tags:
142142
- Feedback
143143
parameters:
144-
- name: user_id
144+
- name: user_principal_id
145145
in: header
146146
type: string
147147
required: true
@@ -216,7 +216,7 @@ async def human_clarification_endpoint(human_clarification: HumanClarification,
216216
tags:
217217
- Clarification
218218
parameters:
219-
- name: user_id
219+
- name: user_principal_id
220220
in: header
221221
type: string
222222
required: true
@@ -279,7 +279,7 @@ async def approve_step_endpoint(human_feedback: HumanFeedback, request: Request)
279279
tags:
280280
- Approval
281281
parameters:
282-
- name: user_id
282+
- name: user_principal_id
283283
in: header
284284
type: string
285285
required: true

0 commit comments

Comments
 (0)