client

package
v1.65.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentgridClient

type AgentgridClient struct {
	core.JDCloudClient
}

func NewAgentgridClient

func NewAgentgridClient(credential *core.Credential) *AgentgridClient

func (*AgentgridClient) CreateBrowserTool

创建一个 Browser Tool 资源。

## 接口说明 - 支持通过 `clientToken` 保证请求幂等性。 - 创建成功后由服务端自动生成 `apiKey`。 - Browser Tool 状态包括:`pending`(已受理,等待资源准备)、`ready`(可创建 Session)、`failed`(处理失败)、`deleting`(删除中)、`deleted`(已删除)。 - 本接口为异步接口。请求受理成功后,资源通常先进入 `pending`,待底层资源准备完成后进入 `ready`;如创建失败则进入 `failed`。建议通过“查询 Browser Tool 详情”或“查询 Browser Tool 列表”轮询确认最终状态。

func (*AgentgridClient) CreateBrowserToolSession

创建并初始化 Browser Tool Session。

## 接口说明 - 支持通过 `clientToken` 保证请求幂等性。 - Session 状态包括:`pending`(已受理,等待资源准备)、`creating`(初始化中)、`ready`(可连接使用)、`deleting`(删除中)、`deleted`(已删除)、`failed`(初始化失败)。 - 本接口为异步接口。请求受理成功后返回 `sessionId`,Session 通常会依次经历 `pending`、`creating`,最终进入 `ready` 或 `failed`。建议通过“查询 Browser Tool Session 详情”轮询确认状态;仅当 `state` 为 `ready` 时,`cdpEndpoint`、`vncEndpoint` 才可用于接入。

func (*AgentgridClient) CreateCodeInterpreter

创建一个 Code Interpreter 工具实例。

## 接口说明 - 支持通过 `clientToken` 保证请求幂等性。 - 创建成功后由服务端自动生成 `apiKey`。 - Code Interpreter 状态包括:`pending`(已受理,等待资源准备)、`ready`(可创建 Session)、`failed`(处理失败)、`deleting`(删除中)、`deleted`(已删除)。 - 本接口为异步接口。请求受理成功后,资源通常先进入 `pending`,待底层资源准备完成后进入 `ready`;如创建失败则进入 `failed`。建议通过“查询 Code Interpreter 详情”或“查询 Code Interpreter 列表”轮询确认最终状态。

func (*AgentgridClient) CreateCodeInterpreterSession

创建并初始化 Code Interpreter Session。

## 接口说明 - Session 状态包括:`pending`(已受理,等待资源准备)、`creating`(初始化中)、`ready`(可执行工具调用)、`deleting`(删除中)、`deleted`(已删除)、`failed`(初始化失败)。 - 本接口为异步接口。请求受理成功后返回 `sessionId`,Session 通常会依次经历 `pending`、`creating`,最终进入 `ready` 或 `failed`。建议通过“查询 Code Interpreter Session 详情”轮询确认状态,并在 `state=ready` 后再发起后续调用。

func (*AgentgridClient) CreateRuntime

创建一个 Runtime 资源,并生成首个 Runtime 版本。

## 接口说明 - 支持通过 `clientToken` 保证请求幂等性。 - 创建时需提供制品、鉴权方式、网络等核心配置信息。 - Runtime 状态包括:`pending`(已受理,等待资源准备)、`creating`(创建中)、`running`(可正常调用)、`updating`(版本或配置更新中)、`failed`(处理失败)、`deleted`(已删除,不可继续使用)。 - Runtime Version 状态包括:`pending`(已受理,等待资源准备)、`creating`(创建中)、`running`(可正常使用)、`failed`(处理失败)、`deleted`(已删除)。 - 本接口为异步接口,请求受理成功后会返回 `requestId`、`runtimeId` 和初始 `runtimeVersion`。创建初期,Runtime 与首个 Runtime Version 通常先处于 `pending`,随后进入 `creating`,最终进入 `running` 或 `failed`。 - 建议在创建成功后,通过“查询 Runtime 详情”或“查询 Runtime 版本列表”轮询状态;当 `state=running` 且 `versionView.state=running` 后,再进行调用或版本相关操作。

func (*AgentgridClient) CreateRuntimeEndpoint

为指定 Runtime 创建 Endpoint 访问地址。

## 接口说明 - 调用成功后将返回该 Runtime 的公网与私网访问地址。 - Endpoint 地址可用于后续 Runtime 的调用与接入配置。

func (*AgentgridClient) DeleteBrowserTool

删除指定 Browser Tool。

## 接口说明 - 删除时会级联停止并删除该 Browser Tool 下的所有 Session。 - 删除请求受理后,Browser Tool 状态会变为 deleting,删除完成后变为 deleted;deleting 期间不可继续创建新的 Session

func (*AgentgridClient) DeleteBrowserToolSession

停止指定 Browser Tool Session。

## 接口说明 - 删除请求受理后,Session 状态会进入 `deleting`,删除完成后进入 `deleted`。 - `deleted` 状态的 Session 不可恢复;如需继续使用,请重新创建新的 Session。

func (*AgentgridClient) DeleteCodeInterpreter

删除指定 Code Interpreter。

## 接口说明 - 删除请求受理后,Code Interpreter 状态会变为 `deleting`,删除完成后变为 `deleted`。

func (*AgentgridClient) DeleteCodeInterpreterSession

停止指定 Code Interpreter Session。

## 接口说明 - 删除请求受理后,Session 状态会进入 `deleting`,删除完成后进入 `deleted`。 - `deleted` 状态的 Session 不可恢复;如需继续使用,请重新创建新的 Session。

func (*AgentgridClient) DeleteRuntime

删除指定 Runtime 及其所有版本信息。

## 接口说明 - 仅当 Runtime 当前状态为 `running` 或 `failed` 时允许删除。 - 删除后数据不可恢复,请谨慎操作。 - 删除完成后,Runtime 最终状态为 `deleted`;`deleted` 状态的 Runtime 不可恢复。

func (*AgentgridClient) DeleteRuntimeEndpoint

删除指定 Runtime 的 Endpoint 配置。

func (*AgentgridClient) DeleteRuntimeVersion

删除指定 Runtime 的目标版本信息。

## 接口说明 - 删除后该版本不可恢复,请谨慎操作。 - 删除完成后,该版本状态最终为 `deleted`。

func (*AgentgridClient) DescribeBrowserTool

查询指定 Browser Tool 的详细信息。

func (*AgentgridClient) DescribeBrowserToolSession

查询指定 Browser Tool Session 的详细信息。

func (*AgentgridClient) DescribeBrowserToolSessions

查询指定 Browser Tool 的 Session 列表。

## 接口说明 - 支持按 Session 状态过滤。 - 未指定 `state` 时,默认返回该 Browser Tool 下的全部 Session。 - 如仅需获取可直接接入的 Session,建议筛选 `state=ready`。

func (*AgentgridClient) DescribeBrowserTools

查询 Browser Tool 列表。

## 接口说明 - 支持按 Browser Tool ID 批量查询。

func (*AgentgridClient) DescribeCodeInterpreter

查询指定 Code Interpreter 的详细信息。

func (*AgentgridClient) DescribeCodeInterpreterSession

查询指定 Code Interpreter Session 详情。

func (*AgentgridClient) DescribeCodeInterpreterSessions

查询指定 Code Interpreter 的 Session 列表。

## 接口说明 - 支持按 Session 状态过滤。 - 未指定 `state` 时,默认返回该 Code Interpreter 下的全部 Session。 - 如仅需获取可继续执行工具调用的 Session,建议筛选 `state=ready`。

func (*AgentgridClient) DescribeCodeInterpreters

查询 Code Interpreter 列表。

## 接口说明 - 支持按 Code Interpreter ID 批量查询。

func (*AgentgridClient) DescribeRuntime

查询指定 Runtime 的版本详情信息。

## 接口说明 - 不传 `version` 时,返回 Runtime 当前生效版本的信息。 - 返回结果中的顶层 `state` 表示 Runtime 当前整体状态;`versionView.state` 表示指定版本或当前生效版本的状态。

func (*AgentgridClient) DescribeRuntimeEndpoint

查询指定 Runtime 的 Endpoint 详细信息。

func (*AgentgridClient) DescribeRuntimeEndpoints

批量查询多个 Runtime 的 Endpoint 信息。

func (*AgentgridClient) DescribeRuntimeVersions

查询 Runtime 的版本列表信息。

## 接口说明 - 每个版本的 `state` 可选值为:`pending`、`creating`、`running`、`failed`、`deleted`。 - 建议在创建 Runtime 或更新 Runtime 后,通过本接口确认版本是否已进入 `running`。

func (*AgentgridClient) DescribeRuntimes

查询 Runtime 列表,默认返回当前生效版本的信息。

## 接口说明 - 支持分页、排序、条件过滤与标签过滤。 - Runtime 状态包括:`pending`、`creating`、`running`、`updating`、`failed`、`deleted`。 - 返回结果中的 `state` 表示 Runtime 当前整体状态;`versionView.state` 表示本次返回版本的状态。

func (*AgentgridClient) DisableLogger

func (c *AgentgridClient) DisableLogger()

func (*AgentgridClient) GetRuntimeSessions

查询指定 Runtime 当前运行中的 Session 数量。

## 接口说明 - 返回值为查询时刻的快照统计,其中 `versionSessions` 用于展示各版本当前生效的 Session 数量。

func (*AgentgridClient) ModifyRuntimeVersion

将指定版本设置为 Runtime 的生效版本。

## 接口说明 - 调用前建议先通过“查询 Runtime 的版本列表”确认目标版本 `state=running`。 - 切换成功后,后续未显式指定版本的 Runtime 调用将默认命中该生效版本。

func (*AgentgridClient) SetConfig

func (c *AgentgridClient) SetConfig(config *core.Config)

func (*AgentgridClient) SetLogger

func (c *AgentgridClient) SetLogger(logger core.Logger)

func (*AgentgridClient) UpdateRuntime

更新 Runtime 模板配置,并生成一个新版本。

## 接口说明 - 该操作用于更新 Runtime 的配置信息。 - Runtime 在处理更新请求期间,其状态通常会变为 `updating`;本次新生成的 Runtime Version 状态通常会依次经历 `pending`、`creating`,最终进入 `running` 或 `failed`。 - 本接口响应仅返回 `requestId`,不会直接返回新版本号。请求受理后,建议调用“查询 Runtime 版本列表”确认最新版本号及其状态。 - 新版本创建成功后不会自动成为生效版本;如需切换,请继续调用“选择 Runtime 模版版本”接口。

func (*AgentgridClient) UpdateRuntimeAttributes

更新 Runtime 基础信息

## 接口说明 - 该操作仅更新 Runtime 的基础元信息,不会生成新的版本,也不会改变当前生效版本。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL