Skip to content
English

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"必需只读。见类型定义及调用场景。
idstring必需只读。见类型定义及调用场景。
descriptionstring必需只读。见类型定义及调用场景。
toolIdsreadonly 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;
}

接口参考、使用示例与开发指南。