chore: generate

This commit is contained in:
opencode-agent[bot]
2026-02-09 17:35:30 +00:00
parent dc53086c1e
commit d578f80f00
222 changed files with 6797 additions and 6590 deletions

View File

@@ -37,13 +37,13 @@ const { client } = await createOpencode()
#### 選項
|選項|型別 |描述 |預設|
| 選項 | 型別 | 描述 | 預設 |
| ---------- | ------------- | ------------------------------ | ----------- |
| `hostname` | `string` | 服务器主机名 | `127.0.0.1` |
| `port` | `number` |伺服器埠 | `4096` |
| `signal` | `AbortSignal` | 取消的中止讯号 | `undefined` |
| `timeout` | `number` | 服务器启动超时(以毫秒为单位)| `5000` |
| `config` | `Config` |放置的财产 | `{}` |
| `hostname` | `string` | 服务器主机名 | `127.0.0.1` |
| `port` | `number` | 伺服器埠 | `4096` |
| `signal` | `AbortSignal` | 取消的中止讯号 | `undefined` |
| `timeout` | `number` | 服务器启动超时(以毫秒为单位) | `5000` |
| `config` | `Config` | 放置的财产 | `{}` |
---
@@ -81,13 +81,13 @@ const client = createOpencodeClient({
#### 選項
|選項|型別 |描述 |預設 |
| --------------- | ---------- | -------------------------------- | ----------------------- |
| `baseUrl` | `string` |伺服器的 URL | `http://localhost:4096` |
| `fetch` | `function` |习俗获取实现| `globalThis.fetch` |
| `parseAs` | `string` |响应解析方法| `auto` |
| `responseStyle` | `string` | 返回样式:`data` 或 `fields` | `fields` |
| `throwOnError` | `boolean` | 掷骰错误而不是返回 | `false` |
| 選項 | 型別 | 描述 | 預設 |
| --------------- | ---------- | ---------------------------- | ----------------------- |
| `baseUrl` | `string` | 伺服器的 URL | `http://localhost:4096` |
| `fetch` | `function` | 习俗获取实现 | `globalThis.fetch` |
| `parseAs` | `string` | 响应解析方法 | `auto` |
| `responseStyle` | `string` | 返回样式:`data` 或 `fields` | `fields` |
| `throwOnError` | `boolean` | 掷骰错误而不是返回 | `false` |
---
@@ -125,9 +125,9 @@ SDK跨越型别安全客户端公开所有服务器API。
### 全球的
|方法|描述 |回應 |
| ----------------- | ------------------------------- | ------------------------------------ |
| `global.health()` |检查服务器健康状况和版本 | `{ healthy: true, version: string }` |
| 方法 | 描述 | 回應 |
| ----------------- | ------------------------ | ------------------------------------ |
| `global.health()` | 检查服务器健康状况和版本 | `{ healthy: true, version: string }` |
---
@@ -142,10 +142,10 @@ console.log(health.data.version)
### 應用程式
|方法|描述 |回應 |
| -------------- | ------------------------- | ------------------------------------------- |
| `app.log()` | 登录日志 | `boolean` |
| `app.agents()` |列出所有可用的代理 | <a href={typesUrl}><code>代理[]</code></a> |
| 方法 | 描述 | 回應 |
| -------------- | ------------------ | ------------------------------------------ |
| `app.log()` | 登录日志 | `boolean` |
| `app.agents()` | 列出所有可用的代理 | <a href={typesUrl}><code>代理[]</code></a> |
---
@@ -169,10 +169,10 @@ const agents = await client.app.agents()
### 專案
|方法|描述 |回應 |
| ------------------- | ------------------- | --------------------------------------------- |
| `project.list()` |列出所有專案 | <a href={typesUrl}><code>專案[]</code></a> |
| `project.current()` |獲取當前專案 | <a href={typesUrl}><code>專案</code></a> |
| 方法 | 描述 | 回應 |
| ------------------- | ------------ | ------------------------------------------ |
| `project.list()` | 列出所有專案 | <a href={typesUrl}><code>專案[]</code></a> |
| `project.current()` | 獲取當前專案 | <a href={typesUrl}><code>專案</code></a> |
---
@@ -190,9 +190,9 @@ const currentProject = await client.project.current()
### 小路
|方法|描述 |回應 |
| ------------ | ---------------- | ---------------------------------------- |
| `path.get()` |獲取當前路徑 | <a href={typesUrl}><code>路徑</code></a> |
| 方法 | 描述 | 回應 |
| ------------ | ------------ | ---------------------------------------- |
| `path.get()` | 獲取當前路徑 | <a href={typesUrl}><code>路徑</code></a> |
---
@@ -207,10 +207,10 @@ const pathInfo = await client.path.get()
### 配置
|方法|描述 |回應 |
| -------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `config.get()` |獲取配置資訊 | <a href={typesUrl}><code>配置</code></a> |
| `config.providers()` |列出提供商和預設模型 | `{ providers: `<a href={typesUrl}><code>提供商[]</code></a>`, default: { [key: string]: string } }` |
| 方法 | 描述 | 回應 |
| -------------------- | -------------------- | --------------------------------------------------------------------------------------------------- |
| `config.get()` | 獲取配置資訊 | <a href={typesUrl}><code>配置</code></a> |
| `config.providers()` | 列出提供商和預設模型 | `{ providers: `<a href={typesUrl}><code>提供商[]</code></a>`, default: { [key: string]: string } }` |
---
@@ -226,27 +226,27 @@ const { providers, default: defaults } = await client.config.providers()
### 會議
|方法|描述 |筆記|
| ---------------------------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `session.list()` |列出會話 |返回 <a href={typesUrl}><code>Session[]</code></a> |
| `session.get({ path })` |獲取會話 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.children({ path })` |列出子會話 |返回 <a href={typesUrl}><code>Session[]</code></a> |
| `session.create({ body })` |建立會話 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.delete({ path })` | 离开会话 | 返回`boolean` |
| `session.update({ path, body })` |更新會話屬性 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.init({ path, body })` | Analyze app and create `AGENTS.md` | Returns `boolean` |
| `session.abort({ path })` |中止正在执行的会话 |返回`boolean` |
| `session.share({ path })` |分享會 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.unshare({ path })` |取消共享會話 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.summarize({ path, body })` | 会议总结 |返回`boolean` |
| `session.messages({ path })` |列出會話中的訊息 |返回 `{ info: `<a href={typesUrl}><code>訊息</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}[]` |
| `session.message({ path })` |獲取訊息詳情 |返回 `{ info: `<a href={typesUrl}><code>訊息</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}` |
| `session.prompt({ path, body })` |傳送提示資訊 | `body.noReply: true` 返回 UserMessage僅限上下文。預設返回 <a href={typesUrl}><code>AssistantMessage</code></a> 以及 AI 響應 |
| `session.command({ path, body })` |向會話傳送命令 |返回 `{ info: `<a href={typesUrl}><code>AssistantMessage</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}` |
| `session.shell({ path, body })` |執行 shell 命令 |返回 <a href={typesUrl}><code>AssistantMessage</code></a> |
| `session.revert({ path, body })` |回覆訊息 |返回 <a href={typesUrl}><code>會話</code></a> |
| `session.unrevert({ path })` |恢復已恢復的訊息 |返回 <a href={typesUrl}><code>會話</code></a> |
| `postSessionByIdPermissionsByPermissionId({ path, body })` |回复许可权限请求 |返回`boolean` |
| 方法 | 描述 | 筆記 |
| ---------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `session.list()` | 列出會話 | 返回 <a href={typesUrl}><code>Session[]</code></a> |
| `session.get({ path })` | 獲取會話 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.children({ path })` | 列出子會話 | 返回 <a href={typesUrl}><code>Session[]</code></a> |
| `session.create({ body })` | 建立會話 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.delete({ path })` | 离开会话 | 返回`boolean` |
| `session.update({ path, body })` | 更新會話屬性 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.init({ path, body })` | Analyze app and create `AGENTS.md` | Returns `boolean` |
| `session.abort({ path })` | 中止正在执行的会话 | 返回`boolean` |
| `session.share({ path })` | 分享會 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.unshare({ path })` | 取消共享會話 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.summarize({ path, body })` | 会议总结 | 返回`boolean` |
| `session.messages({ path })` | 列出會話中的訊息 | 返回 `{ info: `<a href={typesUrl}><code>訊息</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}[]` |
| `session.message({ path })` | 獲取訊息詳情 | 返回 `{ info: `<a href={typesUrl}><code>訊息</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}` |
| `session.prompt({ path, body })` | 傳送提示資訊 | `body.noReply: true` 返回 UserMessage僅限上下文。預設返回 <a href={typesUrl}><code>AssistantMessage</code></a> 以及 AI 響應 |
| `session.command({ path, body })` | 向會話傳送命令 | 返回 `{ info: `<a href={typesUrl}><code>AssistantMessage</code></a>`, parts: `<a href={typesUrl}><code>部分[]</code></a>`}` |
| `session.shell({ path, body })` | 執行 shell 命令 | 返回 <a href={typesUrl}><code>AssistantMessage</code></a> |
| `session.revert({ path, body })` | 回覆訊息 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `session.unrevert({ path })` | 恢復已恢復的訊息 | 返回 <a href={typesUrl}><code>會話</code></a> |
| `postSessionByIdPermissionsByPermissionId({ path, body })` | 回复许可权限请求 | 返回`boolean` |
---
@@ -283,13 +283,13 @@ await client.session.prompt({
### 檔案
|方法|描述 |回應 |
| ------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------- |
| `find.text({ query })` |搜索档案中文字 | 含 `path`、`lines`、`line_number`、`absolute_offset`、`submatches` | 与像团队的匹配 |
| `find.files({ query })` |按名称查询档案和目录 | `string[]`(路径)|
| `find.symbols({ query })` |查詢工作區符號 | <a href={typesUrl}><code>符號[]</code></a> |
| `file.read({ query })` | 读取档案 | `{ type: "raw" \| "patch", content: string }` |
| `file.status({ query? })` |獲取跟蹤檔案的狀態 | <a href={typesUrl}><code>檔案[]</code></a> |
| 方法 | 描述 | 回應 |
| ------------------------- | -------------------- | ------------------------------------------------------------------ | -------------- |
| `find.text({ query })` | 搜索档案中文字 | 含 `path`、`lines`、`line_number`、`absolute_offset`、`submatches` | 与像团队的匹配 |
| `find.files({ query })` | 按名称查询档案和目录 | `string[]`(路径) |
| `find.symbols({ query })` | 查詢工作區符號 | <a href={typesUrl}><code>符號[]</code></a> |
| `file.read({ query })` | 读取档案 | `{ type: "raw" \| "patch", content: string }` |
| `file.status({ query? })` | 獲取跟蹤檔案的狀態 | <a href={typesUrl}><code>檔案[]</code></a> |
`find.files` 支持一些可选的查询栏位:
@@ -324,17 +324,17 @@ const content = await client.file.read({
### TUI
|方法|描述 |回應 |
| ------------------------------ | ------------------------- | --------- |
| `tui.appendPrompt({ body })` |将文字附加到提示| `boolean` |
| `tui.openHelp()` | 开启帮助对话方块 | `boolean` |
| `tui.openSessions()` |开启会话选择器 | `boolean` |
| `tui.openThemes()` |开启主题选择器 | `boolean` |
| `tui.openModels()` | 开启模型选择器 | `boolean` |
| `tui.submitPrompt()` |提交当前提示| `boolean` |
| `tui.clearPrompt()` |清除提示| `boolean` |
| `tui.executeCommand({ body })` |执行命令| `boolean` |
| `tui.showToast({ body })` | 显示吐司通知 | `boolean` |
| 方法 | 描述 | 回應 |
| ------------------------------ | ---------------- | --------- |
| `tui.appendPrompt({ body })` | 将文字附加到提示 | `boolean` |
| `tui.openHelp()` | 开启帮助对话方块 | `boolean` |
| `tui.openSessions()` | 开启会话选择器 | `boolean` |
| `tui.openThemes()` | 开启主题选择器 | `boolean` |
| `tui.openModels()` | 开启模型选择器 | `boolean` |
| `tui.submitPrompt()` | 提交当前提示 | `boolean` |
| `tui.clearPrompt()` | 清除提示 | `boolean` |
| `tui.executeCommand({ body })` | 执行命令 | `boolean` |
| `tui.showToast({ body })` | 显示吐司通知 | `boolean` |
---
@@ -355,9 +355,9 @@ await client.tui.showToast({
### 授權
|方法|描述 |回應 |
| ------------------- | ------------------------------ | --------- |
| `auth.set({ ... })` |设定身份验证凭据| `boolean` |
| 方法 | 描述 | 回應 |
| ------------------- | ---------------- | --------- |
| `auth.set({ ... })` | 设定身份验证凭据 | `boolean` |
---
@@ -374,8 +374,8 @@ await client.auth.set({
### 活動
|方法|描述 |回應 |
| ------------------- | ------------------------- | ------------------------- |
| 方法 | 描述 | 回應 |
| ------------------- | ------------------ | ------------------ |
| `event.subscribe()` | 服务器传送的事件流 | 服务器传送的事件流 |
---