Holarch
课程章节

培训 · 课程 5. 团队和管理 · 第 5.4 章,共 6 章

5.4 API 令牌和连接 AI 应用 2:39

使用 Individual 和 Team 方案的功能:

个人访问令牌、通过 OAuth 连接 AI 应用,以及审查其提议。

演示 Holarch 1.7。

您将学到

  • 创建访问权限、项目和有效期均受限的个人访问令牌
  • 在授权同意屏幕上登录,将 AI 应用连接到 Holarch
  • 审查 AI 客户端的提议,只应用您需要的更改
  • 撤销令牌并断开应用连接

让脚本和 AI 工具安全地处理您的项目:创建带范围、项目和有效期的个人访问令牌;在授权同意屏幕上通过 OAuth 连接 AI 应用;管理已连接的应用;审查并应用 AI 客户端的提议;以及组织的 API 开关。

项目文件

  • 起始项目 (.holarch.json;管理项目 → 项目文件 ▾ → 导入项目 (.json)…)

视频从 holarch.app 播放;参见隐私政策。

练习

在 Holarch 中基于 CubeSat EO-1 演示项目亲自完成此操作。

  1. 打开 账户设置 → API 令牌。在 新令牌 下将其命名为 EO-1 report,选择 只读、30 天 和 所选项目 并勾选 EO-1,然后单击 创建令牌;复制该令牌。
  2. 运行 令牌已创建 中的 curl 示例列出您的项目,确认只返回 EO-1。
  3. 单击 连接 AI 应用…,选择 AI 应用,然后按步骤操作。在 将 AI 应用连接到 Holarch 页面上,选择 读取并提出更改、所选项目(EO-1),以及 30 天的截止期限,然后单击 允许。
  4. 在 AI 应用中提问:Propose a test case in EO-1 that verifies requirement 2.4 Target Slew。
  5. 打开 EO-1,选择 ✦ AI ▾ → 评审“…”…,取消勾选您不需要的内容,然后单击 应用所选项。
  6. 回到 API 令牌,在 EO-1 report 上单击 撤销,如果您不需要连接 AI 应用,请在 已连接的应用 下单击 断开连接。

当 EO-1 包含来自该提议的新测试用例,且该令牌已从您的列表中消失时,即完成练习。

自测

  1. 什么时候使用令牌,什么时候使用已连接的应用?
  2. 您在某个项目中是评审者,并使用读写令牌。脚本能更改该项目吗?
  3. AI 应用提出了五项更改。项目中有什么发生了变化?
  4. 如何一次切断所有令牌和应用?
显示答案
  1. 什么时候使用令牌,什么时候使用已连接的应用?

    令牌用于发送固定请求头的脚本和客户端;它只显示一次,由您保存。已连接的应用在 Holarch 的授权同意屏幕上登录,无需粘贴令牌,最长一年后失效,并列在“已连接的应用”下。

  2. 您在某个项目中是评审者,并使用读写令牌。脚本能更改该项目吗?

    不能。令牌以您的身份、在您于每个项目中的角色范围内操作,因此评审者或查看者只能读取。

  3. AI 应用提出了五项更改。项目中有什么发生了变化?

    尚无变化。这些更改以提议的形式等待处理;您审查它们,取消勾选不需要的内容,“应用所选项”会将其余更改作为一个撤销步骤应用。删除操作以及对已批准或已纳入基线条目的更改,初始状态为不勾选。

  4. 如何一次切断所有令牌和应用?

    “在所有设备上退出登录”或重置密码会断开每个已连接的应用并撤销每个令牌。组织管理员还可以为组织的项目关闭 API 和 MCP 访问。

延伸阅读

文字稿

显示文字稿 (旁白和屏幕内容)

Introduction

Chapter four: API tokens and connecting Claude. Holarch has an API for scripts and reports, and an MCP endpoint that lets AI tools such as Claude work with your model.

Personal access tokens

Whatever connects, the same rules apply.

On screen: Rules card.

API tokens come with the Individual and Team plans. For a script, create a personal access token: in Account Settings, open AI and API, give the token a name, choose Read only, an expiry of ninety days, and create it.

On screen: API tokens → name → Read only → 90 days → Create Token.

The token is shown once. Copy it now, and store it where your script can read it. Holarch keeps only a fingerprint of it, and lists the token with when it was last used.

On screen: The new token; the list.

Connect Claude

To connect Claude, add Holarch as a connector in Claude's settings with the address app dot holarch dot app slash mcp, and click Connect. For this recording, a test client stands in for Claude, using the same steps.

On screen: Card: in Claude; then the consent screen.

Holarch opens its consent screen. It names the app and where it returns you, and you choose what it may do: read only, or read and propose changes; all your projects or chosen ones; and when it ends.

On screen: Consent screen.

Keep read and propose changes, and click Allow. Claude is now connected, and you get an email about it.

On screen: Allow.

Connected apps

Connected apps, in the same section, lists every app with its access, its projects and when it was last used. Disconnect cuts it off at once.

On screen: Account Settings → Connected apps.

Review a proposal

When Claude suggests changes to your model, nothing changes yet. They arrive as a proposal. Open the project: the AI menu shows the proposal waiting for review.

On screen: A proposal arrives; ✦ AI ▾.

Review it. You see each change, can edit it, and untick what you do not want. Apply Selected makes it one step you can undo.

On screen: Review → Apply Selected.

For the organization

An org admin can turn off API and AI-tool access for all of the organization's projects in Organization Settings. Tokens and connected apps then cannot reach them.

On screen: Organization Settings → API access.

Recap

Let's recap. Tokens are for scripts: scoped, limited to projects, and shown once. Claude connects with OAuth on a consent screen, appears under Connected apps, and its changes arrive as proposals you review.

Next, you set up AI for the organization.