# 管理与恢复

## 编辑展示与所有权

注册 name 不可更改。edit 接受完整六字段 metadata、当前 revision 和稳定 command-id。
manage 用于生命周期或 visibility；namespace-transfer 申请整体转移命名空间及全部包。
转让后旧 owner 的后续读取、提交、receipt 重放都重新鉴权。

```sh
pluginctl show --scope OWNED --name my-team/my-plugin --endpoint https://market.example/v1/graphql --json
pluginctl manage --name my-team/my-plugin --revision <lifecycle-revision> --lifecycle disable --command-id <uuid> --endpoint https://market.example/v1/graphql --json
```

请从 show 获取对应 revision：edit 使用 listing revision，namespace-transfer 使用 namespaces 返回的 revision，
生命周期使用 lifecycle_revision；visibility 需要管理员权限。

## 发布中断

保留原 publish journal、endpoint、账号、制品和参数，再运行同一命令。
工具核对已持久回执，继续原操作；同键不同输入返回 IDEMPOTENCY_KEY_REUSED。
到期 grant 的恢复先核对原提交和版本，不能换 ID 盲重试。

## 手动命令结果未知

```sh
pluginctl status --command-id <原-command-uuid> --endpoint https://market.example/v1/graphql --json
```

不存在 receipt 不证明外部写没有发生。CAS 冲突应读取新 revision 再决定是否发新命令。
已发布版本不能重写；已发布制品不会因升级 CLI 而被重新打包。

```sh
pluginctl namespaces --endpoint https://market.example/v1/graphql --json
pluginctl namespace-transfer --name my-team --transfer-to <用户uuid> --revision <namespace-revision> --command-id <uuid> --endpoint https://market.example/v1/graphql --json
```

## 分页查询

namespaces、namespace-requests、show、插件 status 和 review 队列默认保留数组 JSON。
显式提供 `--limit` 选择分页对象；namespace 查询也可以用 `--search` 选择分页。

```sh
pluginctl namespaces --search my-team --limit 24 --endpoint https://market.example/v1/graphql --json
```

读取对应 `namespaces_page`、`namespace_requests_page`、`releases_page` 或
`submissions_page` 的 items、next_cursor 和 observed_at；下一页保留筛选并传入 next_cursor。
分页游标按原查询条件整体传入 next_cursor；游标是不透明字符串，不复用其他筛选。
准确 `--release-id`、原 `--command-id` receipt 和审核 approve/reject 拒绝分页参数。
