refactor: trim subagent capability exports · openclaw/openclaw@280d529
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,11 +10,15 @@ import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js";
|
10 | 10 | import { getSubagentDepthFromSessionStore } from "./subagent-depth.js"; |
11 | 11 | import { normalizeSubagentSessionKey } from "./subagent-session-key.js"; |
12 | 12 | |
13 | | -export const SUBAGENT_SESSION_ROLES = ["main", "orchestrator", "leaf"] as const; |
14 | | -export type SubagentSessionRole = (typeof SUBAGENT_SESSION_ROLES)[number]; |
| 13 | +export type SubagentSessionRole = "main" | "orchestrator" | "leaf"; |
| 14 | +const SUBAGENT_SESSION_ROLES: readonly SubagentSessionRole[] = [ |
| 15 | +"main", |
| 16 | +"orchestrator", |
| 17 | +"leaf", |
| 18 | +] as const; |
15 | 19 | |
16 | | -export const SUBAGENT_CONTROL_SCOPES = ["children", "none"] as const; |
17 | | -export type SubagentControlScope = (typeof SUBAGENT_CONTROL_SCOPES)[number]; |
| 20 | +type SubagentControlScope = "children" | "none"; |
| 21 | +const SUBAGENT_CONTROL_SCOPES: readonly SubagentControlScope[] = ["children", "none"] as const; |
18 | 22 | |
19 | 23 | export type SessionCapabilityEntry = { |
20 | 24 | sessionId?: unknown; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。