ThreadIdFactory
public final class ThreadIdFactory
io/agentscope/harness/coding/control/ThreadIdFactory.java:32–133会话线程标识工厂,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.control 包。核心成员包括 fromGitHubIssue、fromGitHubPr、fromGitHubReviewer、fromGitHubComment、fromDingtalkConversation、fromFeishuChat。
Generates deterministic thread IDs from GitHub issue/PR/reviewer context.
SHA-256 hash of a canonical key string is converted to a UUID for uniqueness and readability.
Slack and Linear thread ID generation are deferred to a later phase.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static String fromGitHubIssue(String owner, String repo, int issueNumber)static | 执行 `fromGitHubIssue` 方法。 Thread ID for a GitHub issue conversation. |
public static String fromGitHubPr(String owner, String repo, int prNumber)static | 执行来自 GitHub Pr相关操作。 Thread ID for a GitHub PR coding session (branch-stable). |
public static String fromGitHubReviewer(String owner, String repo, int prNumber)static | 执行 `fromGitHubReviewer` 方法。 Thread ID for a reviewer session on a specific PR. |
public static String fromGitHubComment(String owner, String repo, int issueOrPrNumber)static | 执行 `fromGitHubComment` 方法。 Thread ID derived from a comment on a GitHub issue or PR. |
public static String fromDingtalkConversation(String appKey, String conversationId)static | 用于DingTalk 会话(DM 或组)的会话线程标识。 Thread ID for a DingTalk conversation (DM or group). |
public static String fromFeishuChat(String tenantKey, String chatId)static | 执行 `fromFeishuChat` 方法。 Thread ID for a Feishu/Lark chat (DM, group, or thread). |
方法详情Method Detail
fromGitHubIssue
public static String fromGitHubIssue(String owner, String repo, int issueNumber)
执行 fromGitHubIssue 方法。
Thread ID for a GitHub issue conversation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
owner | String | 所有者(类型 `String`)。repo owner |
repo | String | 仓库(类型 `String`)。repo name |
issueNumber | int | issue 数量(类型 `int`)。issue number |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:43–45fromGitHubPr
public static String fromGitHubPr(String owner, String repo, int prNumber)
执行来自 GitHub Pr相关操作。
Thread ID for a GitHub PR coding session (branch-stable).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
owner | String | 所有者(类型 `String`)。repo owner |
repo | String | 仓库(类型 `String`)。repo name |
prNumber | int | pr 数量(类型 `int`)。PR number |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:54–56fromGitHubReviewer
public static String fromGitHubReviewer(String owner, String repo, int prNumber)
执行 fromGitHubReviewer 方法。
Thread ID for a reviewer session on a specific PR.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
owner | String | 所有者(类型 `String`)。repo owner |
repo | String | 仓库(类型 `String`)。repo name |
prNumber | int | pr 数量(类型 `int`)。PR number |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:65–67fromGitHubComment
public static String fromGitHubComment(String owner, String repo, int issueOrPrNumber)
执行 fromGitHubComment 方法。
Thread ID derived from a comment on a GitHub issue or PR.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
owner | String | 所有者(类型 `String`)。repo owner |
repo | String | 仓库(类型 `String`)。repo name |
issueOrPrNumber | int | issue 或 Pr 数量(类型 `int`)。issue/PR number |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:76–78fromDingtalkConversation
public static String fromDingtalkConversation(String appKey, String conversationId)
用于DingTalk 会话(DM 或组)的会话线程标识。
Thread ID for a DingTalk conversation (DM or group).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
appKey | String | 应用键(类型 `String`)。enterprise internal app key (namespaces conversation ids across tenants) |
conversationId | String | 会话标识(类型 `String`)。DingTalk conversation id (DM senderStaffId or group openConversationId) |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:87–89fromFeishuChat
public static String fromFeishuChat(String tenantKey, String chatId)
执行 fromFeishuChat 方法。
Thread ID for a Feishu/Lark chat (DM, group, or thread).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tenantKey | String | 租户键(类型 `String`)。Feishu tenant key (namespaces chat ids across tenants) |
chatId | String | 聊天标识(类型 `String`)。Feishu chat id (`open_chat_id` for DMs/groups, `thread_id` for threaded conversations) |
Stringio/agentscope/harness/coding/control/ThreadIdFactory.java:98–100