interloper-api 0.88.0__tar.gz → 0.89.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {interloper_api-0.88.0 → interloper_api-0.89.0}/PKG-INFO +1 -1
  2. {interloper_api-0.88.0 → interloper_api-0.89.0}/pyproject.toml +1 -1
  3. {interloper_api-0.88.0 → interloper_api-0.89.0}/pyproject.toml.orig +1 -1
  4. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/admin.py +2 -0
  5. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/agent.py +3 -3
  6. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/backfills.py +1 -4
  7. {interloper_api-0.88.0 → interloper_api-0.89.0}/README.md +0 -0
  8. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/__init__.py +0 -0
  9. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/app.py +0 -0
  10. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/dependencies/__init__.py +0 -0
  11. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/dependencies/auth.py +0 -0
  12. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/dependencies/rbac.py +0 -0
  13. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/dependencies/state.py +0 -0
  14. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/notifications/__init__.py +0 -0
  15. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/notifications/invitations.py +0 -0
  16. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/__init__.py +0 -0
  17. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/auth.py +0 -0
  18. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/catalog.py +0 -0
  19. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/components.py +0 -0
  20. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/health.py +0 -0
  21. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/oauth.py +0 -0
  22. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/organisations.py +0 -0
  23. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/runs.py +0 -0
  24. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/tokens.py +0 -0
  25. {interloper_api-0.88.0 → interloper_api-0.89.0}/src/interloper_api/routes/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: interloper-api
3
- Version: 0.88.0
3
+ Version: 0.89.0
4
4
  Summary: Interloper FastAPI routes
5
5
  Author: Guillaume Onfroy
6
6
  Author-email: Guillaume Onfroy <guillaume@digitlcloud.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "interloper-api"
3
- version = "0.88.0"
3
+ version = "0.89.0"
4
4
  description = "Interloper FastAPI routes"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -3,7 +3,7 @@
3
3
  # ###############
4
4
  [project]
5
5
  name = "interloper-api"
6
- version = "0.88.0"
6
+ version = "0.89.0"
7
7
  description = "Interloper FastAPI routes"
8
8
  readme = "README.md"
9
9
  authors = [{ name = "Guillaume Onfroy", email = "guillaume@digitlcloud.com" }]
@@ -224,6 +224,7 @@ class AdminServicesConfig(BaseModel):
224
224
  reaper: AdminReaperConfig
225
225
  smtp: AdminSmtpConfig
226
226
  telemetry: AdminTelemetryConfig
227
+ app_external_url: str
227
228
  mcp_external_url: str
228
229
 
229
230
 
@@ -419,6 +420,7 @@ class AdminConfigResponse(BaseModel):
419
420
  metrics=settings.otel.metrics,
420
421
  sample_ratio=settings.otel.sample_ratio,
421
422
  ),
423
+ app_external_url=settings.server.external_url,
422
424
  mcp_external_url=settings.mcp.external_url,
423
425
  ),
424
426
  data=AdminDataConfig(
@@ -140,8 +140,8 @@ async def create_session(
140
140
  ) -> SessionResponse:
141
141
  """Create a new agent chat session.
142
142
 
143
- The authenticated user's ``org_id`` is injected into the ADK session
144
- state so agent tools are scoped to the correct organisation.
143
+ The active ``org_id`` and the user's role in it are stamped into the ADK
144
+ session state: the org scopes every tool, the role gates the writes.
145
145
 
146
146
  Args:
147
147
  user: The authenticated user, required to hold at least the ``editor`` role.
@@ -157,7 +157,7 @@ async def create_session(
157
157
  session = await session_service.create_session(
158
158
  app_name=APP_NAME,
159
159
  user_id=str(user.id),
160
- state={"org_id": str(org_id)},
160
+ state={"org_id": str(org_id), "role": store.organisations.member_role(user.id, org_id)},
161
161
  )
162
162
  return SessionResponse.from_session(session)
163
163
 
@@ -120,10 +120,7 @@ def list_backfills(
120
120
  Returns:
121
121
  The organisation's backfills, as response models.
122
122
  """
123
- if active_only:
124
- backfills = store.runs.list_active_backfills(org_id)
125
- else:
126
- backfills = store.runs.list_backfills(org_id)
123
+ backfills = store.runs.list_backfills(org_id, active_only=active_only)
127
124
  counts = store.runs.count_backfill_runs([backfill.id for backfill in backfills])
128
125
  return [BackfillResponse.from_backfill(backfill, counts.get(backfill.id)) for backfill in backfills]
129
126