AssociationSource
SUPPORT · interface · 类型合同
Local provenance, never an extra model input requirement.
导入
ts
import type { AssociationSource } from '@jangts/agent-core/support';js
/** @typedef {import('@jangts/agent-core/support').AssociationSource} AssociationSource */其他公开入口:@jangts/agent-core/support。
定义
ts
interface AssociationSource字段结构
| 字段 | 类型 | 必需 | 说明 |
|---|---|---|---|
kind | "registration" | "standalone" | 必需 | 只读。见类型定义及调用场景。 |
id | string | 必需 | 只读。见类型定义及调用场景。 |
description | string | 必需 | 只读。见类型定义及调用场景。 |
toolIds | readonly string[] | 必需 | 只读。见类型定义及调用场景。 |
类型使用
在调用方读取该合同
ts
import type { AssociationSource } from '@jangts/agent-core/support';
// 在使用点保留原合同,TS 与 JS 具有相同的运行行为。
function inspect(value: AssociationSource) {
return value.kind;
}js
/** @param {import('@jangts/agent-core/support').AssociationSource} value */
function inspect(value) {
return value.kind;
}