# Cline 手动接入包 / Manual connection pack

参考 **Cline VS Code 扩展 4.1.23** 的官方设置和源码。`connection-profile.json` 是本包的人工字段清单，不是 Cline 官方 preset、配置导入文件或插件；本包不会修改 `settings.json`、扩展 state 或凭据。尚未在扩展内验证 apizt 连接、流式、工具或实际账单。Desktop、CLI/TUI、Kanban 和组织远程配置分别有自己的入口，本清单不宣称覆盖它们。

## 本地检查与设置

```bash
node examples/ecosystem/cline/check-profile.mjs
```

只校验本地清单，输出 `networkRequests: 0`、`credentialsRead: false` 和 `userConfigWrites: 0`。执行成功不代表 Cline 连接成功。可用 `--profile FILE` 检查自己复制并修改的清单；禁止把 Key 或认证头写入清单。

1. 记录 VS Code 和 Cline 的已安装版本。打开 Cline 设置，API Provider 选择 **OpenAI Compatible**，Base URL 填 `https://api.apizt.com/v1`，Model ID 填 `glm-5.3`（或当前已确认可用的精确 ID）。Key 仅填扩展的私密 API Key 字段。
2. Azure Identity 关闭，不增加认证用 Custom Headers。修改 Key/Base URL 可能触发扩展读取模型列表；不要把本地清单检查与这次客户端联网混为一谈。
3. 在 Model Configuration 中先关闭图片能力，Context Window 设 **4096**、Max Output Tokens 设 **512**，这是小任务预算。型号真实上限需要另行核对；默认价格 0 不能作为免费或实扣依据。
4. 首次检查关闭 **Auto Approve**，暂停 MCP 和浏览器动作。进入空的临时目录，复制 `read-only-task.txt` 发起文字任务；执行任务可能发一个或多个模型请求并计费。即使在 Plan 模式，也要逐项核对工具权限；文字提示词不会成为强制权限隔离。
5. 若出现写文件、命令、浏览器或其他工具请求，停止并人工检查。保存扩展任务状态与请求记录，在 apizt 账户核对请求次数和费用；超时不直接继续/重试。

先验收普通文字输出，再分别验收流式、工具协议、图片、上下文、停止/恢复与完整仓库任务。兼容 Chat Completions 的单次文字请求不能证明 Responses 或完整 Agent 行为。本清单不控制 Cline SDK 的 transport 重试、自动续写或其他回合。4.1.23 发布说明包含无法识别结束原因时请求继续一次的行为变化，因此不能宣称“一个任务必定一次调用”。

## English

This is a manual field guide for **Cline VS Code extension 4.1.23**, not an official native preset or import format. Run the local checker from the package root; it never reads a key, calls a model or writes user settings. A valid profile does not prove a live Cline connection.

Select **OpenAI Compatible**, enter `https://api.apizt.com/v1`, use your exact model ID, and put your key only in the extension's private key field. Start with images/Azure Identity disabled, a 4096 context budget and 512 output tokens; these are conservative task limits, not verified model maxima. Disable Auto Approve, MCP and browser actions for the first task. Use the supplied read-only prompt in an empty temporary workspace. Stop if any write/command/browser tool is requested. Prompts do not enforce read-only permissions.

Actual extension connection, streaming, tools, Responses, images and billing remain untested. Other Cline surfaces need separate configuration checks. A task may call a model more than once: this pack does not control runtime retries or continuations. The 4.1.23 release notes describe a once-only continuation when a finish reason is unrecognized. Review client/account records before retrying an unknown result.

[OpenAI Compatible](https://docs.cline.bot/provider-config/openai-compatible) · [4.1.23 release](https://github.com/cline/cline/releases/tag/v4.1.23) · [Source/version record](../docs/ecosystem-integrations.md)
