refactor: trim subagent helper type exports · openclaw/openclaw@df32527
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,14 +47,14 @@ export type SubagentListItem = {
|
47 | 47 | endedAt?: number; |
48 | 48 | }; |
49 | 49 | |
50 | | -export type BuiltSubagentList = { |
| 50 | +type BuiltSubagentList = { |
51 | 51 | total: number; |
52 | 52 | active: SubagentListItem[]; |
53 | 53 | recent: SubagentListItem[]; |
54 | 54 | text: string; |
55 | 55 | }; |
56 | 56 | |
57 | | -export type SessionEntryResolution = { |
| 57 | +type SessionEntryResolution = { |
58 | 58 | storePath: string; |
59 | 59 | entry: SessionEntry | undefined; |
60 | 60 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ import type { SessionEntry } from "../config/sessions.js";
|
3 | 3 | const SUBAGENT_RECOVERY_MAX_AUTOMATIC_ATTEMPTS = 2; |
4 | 4 | const SUBAGENT_RECOVERY_REWEDGE_WINDOW_MS = 2 * 60_000; |
5 | 5 | |
6 | | -export type SubagentRecoveryGate = |
| 6 | +type SubagentRecoveryGate = |
7 | 7 | | { |
8 | 8 | allowed: true; |
9 | 9 | nextAttempt: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import {
|
4 | 4 | } from "./subagent-lifecycle-events.js"; |
5 | 5 | import type { SubagentRunRecord } from "./subagent-registry.types.js"; |
6 | 6 | |
7 | | -export type DeferredCleanupDecision = |
| 7 | +type DeferredCleanupDecision = |
8 | 8 | | { |
9 | 9 | kind: "defer-descendants"; |
10 | 10 | delayMs: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,10 +36,7 @@ export const ANNOUNCE_COMPLETION_HARD_EXPIRY_MS = 30 * 60_000;
|
36 | 36 | |
37 | 37 | const FROZEN_RESULT_TEXT_MAX_BYTES = 100 * 1024; |
38 | 38 | |
39 | | -export type SubagentRunOrphanReason = |
40 | | -| "missing-session-entry" |
41 | | -| "missing-session-id" |
42 | | -| "stale-unended-run"; |
| 39 | +type SubagentRunOrphanReason = "missing-session-entry" | "missing-session-id" | "stale-unended-run"; |
43 | 40 | |
44 | 41 | export function capFrozenResultText(resultText: string): string { |
45 | 42 | const trimmed = resultText.trim(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { SubagentRunRecord } from "./subagent-registry.types.js"; |
2 | 2 | |
3 | | -export type ReplaceSubagentRunAfterSteerParams = { |
| 3 | +type ReplaceSubagentRunAfterSteerParams = { |
4 | 4 | previousRunId: string; |
5 | 5 | nextRunId: string; |
6 | 6 | fallback?: SubagentRunRecord; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { normalizeAgentId } from "../routing/session-key.js"; |
2 | 2 | |
3 | | -export type SubagentTargetPolicyResult = |
4 | | -| { ok: true } |
5 | | -| { ok: false; allowedText: string; error: string }; |
| 3 | +type SubagentTargetPolicyResult = { ok: true } | { ok: false; allowedText: string; error: string }; |
6 | 4 | |
7 | 5 | function normalizeAllowAgents(allowAgents: readonly string[] | undefined): { |
8 | 6 | configured: boolean; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import {
|
11 | 11 | type ResolvedTimeFormat, |
12 | 12 | } from "./date-time.js"; |
13 | 13 | |
14 | | -export type RuntimeInfoInput = { |
| 14 | +type RuntimeInfoInput = { |
15 | 15 | agentId?: string; |
16 | 16 | host: string; |
17 | 17 | os: string; |
@@ -28,7 +28,7 @@ export type RuntimeInfoInput = {
|
28 | 28 | canvasRootDir?: string; |
29 | 29 | }; |
30 | 30 | |
31 | | -export type SystemPromptRuntimeParams = { |
| 31 | +type SystemPromptRuntimeParams = { |
32 | 32 | runtimeInfo: RuntimeInfoInput; |
33 | 33 | userTimezone: string; |
34 | 34 | userTime?: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。