💬 Review commented on "refactor(backend): 二要素認証の内部構造・APIエンドポイントを整理": coderabbitai[bot] "<details>
<summary>🧩 Analysis chain</summary>
🏁 Script executed:
```shell
#!/bin/bash
set -euo pipefail
# Map the handwritten public entity declarations and the endpoint type mapping.
ast-grep outline packages/misskey-js/src/entities.ts --items all --type type,interface
ast-grep outline packages/misskey-js/src/api.types.ts --items all --type type,interface
# Show only the declarations that connect passkey registration to its public response type.
rg -n -C 8 \
-e 'I2faPasskeyRegisterResponse' \
-e "'i/2fa/passkey/register'" \
packages/misskey-js/src/entities.ts \
packages/misskey-js/src/api.types.ts \
packages/misskey-js/src/autogen/entities.ts
```
Length of output: 939
---
🏁 Script executed:
```shell
#!/bin/bash
set -u
# Map declarations without an unsupported ast-grep symbol-type filter.
ast-grep outline packages/misskey-js/src/entities.ts --items all || true
ast-grep outline packages/misskey-js/src/api.types.ts --items all || true
# Show the handwritten response type and its public endpoint mapping.
rg -n -C 10 \
-e '\bI2faPasskeyRegisterResponse\b' \
-e "'i/2fa/passkey/register'" \
packages/misskey-js/src/entities.ts \
packages/misskey-js/src/api.types.ts \
packages/misskey-js/src/autogen/entities.ts || true
```
Length of output: 10803
---
</details>
`@kakkokari-gtyih`、ご説明ありがとうございます。確認しました。
`packages/misskey-js/src/entities.ts` は `I2faPasskeyRegisterResponse` を `PublicKeyCredentialCreationOptionsJSON` として定義しています。`packages/misskey-js/src/api.types.ts` は `Endpoints['i/2fa/passkey/register'].res` にこの手動型を設定しています。したがって、公開される `misskey-js` の戻り値型は生成された `Record<string, never>` ではありません。
この指摘は取り下げます。
🐇
---
<details>
<summary>✏️ Learnings added</summary>
```
Learnt from: kakkokari-gtyih
Repo: misskey-dev/misskey PR: 17938
File: packages/misskey-js/src/autogen/types.ts:24685-24703
Timestamp: 2026-09-11T12:39:43.523Z
Learning: `packages/misskey-js/src/autogen/types.ts` cannot represent `PublicKeyCredentialCreationOptionsJSON` for `i/2fa/passkey/register`. `packages/misskey-js/src/entities.ts` defines `I2faPasskeyRegisterResponse` as `PublicKeyCredentialCreationOptionsJSON`, and `packages/misskey-js/src/api.types.ts` overrides `Endpoints['i/2fa/passkey/register'].res` with that handwritten type.
```
> Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure [review instructions](https://docs.coderabbit.ai/guides/review-instructions). You can manage existing learnings in the [app](https://app.coderabbit.ai/learnings).
</details>
✅ Review thread resolved.
_You are interacting with an AI system._
<!-- This is an auto-generated reply by CodeRabbit -->" https://github.com/misskey-dev/misskey/pull/17938#discussion_r3989189277
<summary>🧩 Analysis chain</summary>
🏁 Script executed:
```shell
#!/bin/bash
set -euo pipefail
# Map the handwritten public entity declarations and the endpoint type mapping.
ast-grep outline packages/misskey-js/src/entities.ts --items all --type type,interface
ast-grep outline packages/misskey-js/src/api.types.ts --items all --type type,interface
# Show only the declarations that connect passkey registration to its public response type.
rg -n -C 8 \
-e 'I2faPasskeyRegisterResponse' \
-e "'i/2fa/passkey/register'" \
packages/misskey-js/src/entities.ts \
packages/misskey-js/src/api.types.ts \
packages/misskey-js/src/autogen/entities.ts
```
Length of output: 939
---
🏁 Script executed:
```shell
#!/bin/bash
set -u
# Map declarations without an unsupported ast-grep symbol-type filter.
ast-grep outline packages/misskey-js/src/entities.ts --items all || true
ast-grep outline packages/misskey-js/src/api.types.ts --items all || true
# Show the handwritten response type and its public endpoint mapping.
rg -n -C 10 \
-e '\bI2faPasskeyRegisterResponse\b' \
-e "'i/2fa/passkey/register'" \
packages/misskey-js/src/entities.ts \
packages/misskey-js/src/api.types.ts \
packages/misskey-js/src/autogen/entities.ts || true
```
Length of output: 10803
---
</details>
`@kakkokari-gtyih`、ご説明ありがとうございます。確認しました。
`packages/misskey-js/src/entities.ts` は `I2faPasskeyRegisterResponse` を `PublicKeyCredentialCreationOptionsJSON` として定義しています。`packages/misskey-js/src/api.types.ts` は `Endpoints['i/2fa/passkey/register'].res` にこの手動型を設定しています。したがって、公開される `misskey-js` の戻り値型は生成された `Record<string, never>` ではありません。
この指摘は取り下げます。
🐇
---
<details>
<summary>✏️ Learnings added</summary>
```
Learnt from: kakkokari-gtyih
Repo: misskey-dev/misskey PR: 17938
File: packages/misskey-js/src/autogen/types.ts:24685-24703
Timestamp: 2026-09-11T12:39:43.523Z
Learning: `packages/misskey-js/src/autogen/types.ts` cannot represent `PublicKeyCredentialCreationOptionsJSON` for `i/2fa/passkey/register`. `packages/misskey-js/src/entities.ts` defines `I2faPasskeyRegisterResponse` as `PublicKeyCredentialCreationOptionsJSON`, and `packages/misskey-js/src/api.types.ts` overrides `Endpoints['i/2fa/passkey/register'].res` with that handwritten type.
```
> Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure [review instructions](https://docs.coderabbit.ai/guides/review-instructions). You can manage existing learnings in the [app](https://app.coderabbit.ai/learnings).
</details>
✅ Review thread resolved.
_You are interacting with an AI system._
<!-- This is an auto-generated reply by CodeRabbit -->" https://github.com/misskey-dev/misskey/pull/17938#discussion_r3989189277











