Skip to content

feat(project): admin portal, legal, public config, MCP endpoint and AI service users - #25

Merged
Domantas merged 8 commits into
mainfrom
audit/project
Oct 3, 2026
Merged

Domantas merged 8 commits into
mainfrom
audit/project

Conversation

@Domantas

@Domantas Domantas commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Adds the Project-module routes the TypeScript SDK already has, sync + async, each with tests and docs.

hub.account

  • update_project_admin_url → PATCH /{version}/account/projects/{projectId}/settings/admin-url
  • update_project_legal_documents → PATCH .../settings/legal
  • update_project_expose_legal → PATCH .../settings/legal/expose
  • get_admin_portal_structure → GET .../admin-portal/structure
  • assign_admin_portal_service_user → PUT .../settings/admin-portal/service-user
  • create_ai_service_user, list_ai_service_users → POST / GET /{version}/account/ai/service-users
  • rotate_ai_service_user_key → POST .../service-users/{Id}/keys
  • revoke_ai_service_user_key → DELETE .../service-users/{Id}/keys/{KeyId}
  • delete_ai_service_user → DELETE .../service-users/{Id}
  • mcp / mcp_stream / mcp_end_session → POST / GET / DELETE /{version}/account/mcp — send the MCP headers and give back {status, sessionId, body, events} so the session id from initialize and SSE answers are usable.

api.public (new API-host module, twin of TS src/api/public.ts, no sign-in)

  • get_public_project_config → GET /{version}/public/projects/{ProjectId}/config
  • get_public_project_legal → GET /{version}/public/projects/{ProjectId}/legal/{Kind}

Transport: three additive send options for the MCP endpoint — extra_headers, query, response_type="envelope". Existing calls unchanged. No breaking change.

Not included (decided internal): AI plans, knowledge search, AI credits.

Checks: ruff clean · mypy clean (37 files) · pytest 799 passed (31 new).
Task file with findings: docs/tasks/project-audit-python.md.

🤖 Generated with Claude Code

Domantas and others added 8 commits October 3, 2026 11:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rtal structure and service user

hub.account gains update_project_admin_url, update_project_legal_documents,
update_project_expose_legal, get_admin_portal_structure and
assign_admin_portal_service_user (sync + async), each with a request-shape
test through both clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d revoke keys

hub.account gains create_ai_service_user, list_ai_service_users,
rotate_ai_service_user_key, revoke_ai_service_user_key and
delete_ai_service_user (sync + async) under /{version}/account/ai/service-users,
each with a request-shape test through both clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the session

hub.account gains mcp (POST), mcp_stream (GET) and mcp_end_session (DELETE)
on /{version}/account/mcp, sync + async. They send the MCP headers
(Accept, Mcp-Session-Id, MCP-Protocol-Version, Last-Event-ID), put toolsets
in the query string and give back {status, sessionId, body, events}, so the
session id from initialize and SSE answers of tools/call are usable.

The transport gains three additive options for this: extra_headers, query
and response_type="envelope". Existing calls are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l document

New API-host module api.public (sync + async), the twin of the TypeScript
SDK's src/api/public.ts: get_public_project_config and
get_public_project_legal. The gateway does not authenticate these routes,
so the SDK sends no Authorization header. Wired into the API namespaces and
the flat NorbixApi client (client.public / client.Public).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…section, findings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codemash-io

Copy link
Copy Markdown

Added on top (item B3b): hub.account.update_project_expose_brand and update_project_expose_auth (sync + async) — PATCH /account/projects/{projectId}/settings/brand/expose and .../settings/auth/expose, the new gateway twins of update_project_expose_legal. 4 new request-shape tests, docs rows, README sentence. ruff, mypy and pytest (803 passed) green.

🤖 Generated with Claude Code

@Domantas
Domantas merged commit 842b34e into main Oct 3, 2026
9 checks passed
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.

2 participants