Skip to content

Add personal agent self-service to the server-side SDKs - #184

Draft
sajitha-tj wants to merge 2 commits into
thunder-id:mainfrom
sajitha-tj:personal-agents-server-sdks
Draft

sajitha-tj wants to merge 2 commits into
thunder-id:mainfrom
sajitha-tj:personal-agents-server-sdks

Conversation

@sajitha-tj

Copy link
Copy Markdown

Purpose

Lets a signed-in user manage the personal assistant agents they own from a Next.js or Nuxt app. The components from #183 run here with the access token kept on the server: Next.js loads them through server actions, Nuxt through server routes.

Approach

This PR depends on #183 and is stacked on it. Until #183 merges, its commit shows here too; review only the second commit, "Add personal agent self-service to the server-side SDKs".

@thunderid/node

  • parseUpdateMeAgentRequest, which the Next.js actions and Nuxt routes use to keep only the fields an owner may change.

@thunderid/nextjs

  • One server action per operation. Each keeps the access token on the server, checks the agent ID and paging, and passes only the fields an owner may change. A refusal returns the server's status and code, never its message.
  • PersonalAgentList and PersonalAgentDetails render React's Base components with data loaded through these actions, using React's useResourceQuery and useResourceMutation.

@thunderid/nuxt

  • Server routes under /api/auth/user/agents, with the same checks as the Next.js actions, using the session's token.
  • PersonalAgentList and PersonalAgentDetails render Vue's Base components with data loaded from these routes. A refusal comes back as the same ThunderIDAPIError, with the same status and code, as in Next.js.

Playgrounds

  • Next.js and Nuxt have sample and live stories for both components.

Related Issues

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.
  • Cross-SDK parity. Exactly one of parity/prs-raised or parity/prs-not-needed added.
    • If parity/prs-raised, the port links are posted as a reply on the parity check's comment.

Security checks

  • Followed secure coding standards.
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Let a signed-in user list, view, edit, delete and suspend their own
personal agents through /users/me/agents in the React and Vue SDKs,
and show the personal kind and who applied a suspension in the admin
agent views.

Refs thunder-id/thunderid#4468

Signed-off-by: sajitha-tj <sajitha.jayawickrama@gmail.com>
Let a signed-in user manage their own personal agents in Next.js
through server actions and in Nuxt through server routes, keeping the
access token on the server and passing only the fields an owner may
change.

Refs thunder-id/thunderid#4468

Signed-off-by: sajitha-tj <sajitha.jayawickrama@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

🔀 Cross-SDK feature parity

Does this change need to ship in the other ThunderID SDKs too? This check stays red until one of these labels answers that:

Label What it asserts
parity/prs-raised The ports exist in every other SDK this change reaches, or are recorded as not applying there.
parity/prs-not-needed Nothing to port: a fix, refactor, docs, CI, dependency bump, release, or a change specific to this platform.

Ports (DO NOT EDIT)

  • thunder-id/ios-sdks, iOS
  • thunder-id/android-sdks, Android
  • thunder-id/flutter-sdks, Flutter

No sibling SDKs accounted for on this thread yet.

Important

Reply to this comment with this block, filled in. The boxes above tick
themselves when you post it.

- thunder-id/ios-sdks: <paste the port link here>
- thunder-id/android-sdks: <paste the port link here>
- thunder-id/flutter-sdks: <paste the port link here>

A link can be a pull request or a tracked issue, written in full or as thunder-id/ios-sdks#123.
Where the change does not reach an SDK, replace the placeholder with N/A and a short
reason, as in - thunder-id/ios-sdks: N/A, the capability has no equivalent there.

The contract is in the SDK development specification.

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.

1 participant