mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
refactor: trim subagent helper type exports
This commit is contained in:
@@ -47,14 +47,14 @@ export type SubagentListItem = {
|
||||
endedAt?: number;
|
||||
};
|
||||
|
||||
export type BuiltSubagentList = {
|
||||
type BuiltSubagentList = {
|
||||
total: number;
|
||||
active: SubagentListItem[];
|
||||
recent: SubagentListItem[];
|
||||
text: string;
|
||||
};
|
||||
|
||||
export type SessionEntryResolution = {
|
||||
type SessionEntryResolution = {
|
||||
storePath: string;
|
||||
entry: SessionEntry | undefined;
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { SessionEntry } from "../config/sessions.js";
|
||||
const SUBAGENT_RECOVERY_MAX_AUTOMATIC_ATTEMPTS = 2;
|
||||
const SUBAGENT_RECOVERY_REWEDGE_WINDOW_MS = 2 * 60_000;
|
||||
|
||||
export type SubagentRecoveryGate =
|
||||
type SubagentRecoveryGate =
|
||||
| {
|
||||
allowed: true;
|
||||
nextAttempt: number;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
} from "./subagent-lifecycle-events.js";
|
||||
import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
||||
|
||||
export type DeferredCleanupDecision =
|
||||
type DeferredCleanupDecision =
|
||||
| {
|
||||
kind: "defer-descendants";
|
||||
delayMs: number;
|
||||
|
||||
@@ -36,10 +36,7 @@ export const ANNOUNCE_COMPLETION_HARD_EXPIRY_MS = 30 * 60_000;
|
||||
|
||||
const FROZEN_RESULT_TEXT_MAX_BYTES = 100 * 1024;
|
||||
|
||||
export type SubagentRunOrphanReason =
|
||||
| "missing-session-entry"
|
||||
| "missing-session-id"
|
||||
| "stale-unended-run";
|
||||
type SubagentRunOrphanReason = "missing-session-entry" | "missing-session-id" | "stale-unended-run";
|
||||
|
||||
export function capFrozenResultText(resultText: string): string {
|
||||
const trimmed = resultText.trim();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
||||
|
||||
export type ReplaceSubagentRunAfterSteerParams = {
|
||||
type ReplaceSubagentRunAfterSteerParams = {
|
||||
previousRunId: string;
|
||||
nextRunId: string;
|
||||
fallback?: SubagentRunRecord;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { normalizeAgentId } from "../routing/session-key.js";
|
||||
|
||||
export type SubagentTargetPolicyResult =
|
||||
| { ok: true }
|
||||
| { ok: false; allowedText: string; error: string };
|
||||
type SubagentTargetPolicyResult = { ok: true } | { ok: false; allowedText: string; error: string };
|
||||
|
||||
function normalizeAllowAgents(allowAgents: readonly string[] | undefined): {
|
||||
configured: boolean;
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
type ResolvedTimeFormat,
|
||||
} from "./date-time.js";
|
||||
|
||||
export type RuntimeInfoInput = {
|
||||
type RuntimeInfoInput = {
|
||||
agentId?: string;
|
||||
host: string;
|
||||
os: string;
|
||||
@@ -28,7 +28,7 @@ export type RuntimeInfoInput = {
|
||||
canvasRootDir?: string;
|
||||
};
|
||||
|
||||
export type SystemPromptRuntimeParams = {
|
||||
type SystemPromptRuntimeParams = {
|
||||
runtimeInfo: RuntimeInfoInput;
|
||||
userTimezone: string;
|
||||
userTime?: string;
|
||||
|
||||
Reference in New Issue
Block a user