Skip to content

Commit f5ccfb7

Browse files
committed
docs: document runner attempt helpers
1 parent 6719528 commit f5ccfb7

15 files changed

Lines changed: 45 additions & 0 deletions

src/agents/embedded-agent-runner/run/abortable.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* AbortSignal-aware promise racing helper for embedded-agent attempts.
3+
*/
14
function getAbortReason(signal: AbortSignal): unknown {
25
return "reason" in signal ? (signal as { reason?: unknown }).reason : undefined;
36
}

src/agents/embedded-agent-runner/run/assistant-failover.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Handles assistant-stage failover decisions during embedded-agent attempts.
3+
*/
14
import { sanitizeForLog } from "../../../../packages/terminal-core/src/ansi.js";
25
import type { OpenClawConfig } from "../../../config/types.openclaw.js";
36
import type { AssistantMessage } from "../../../llm/types.js";

src/agents/embedded-agent-runner/run/attempt-abort.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Releases attempt resources when an embedded-agent run aborts.
3+
*/
14
import type { EmbeddedAttemptSessionLockController } from "./attempt.session-lock.js";
25

36
type AbortLockReleaseLog = {

src/agents/embedded-agent-runner/run/attempt-bootstrap-routing.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Resolves bootstrap context targets for one embedded-agent attempt.
3+
*/
14
import type { BootstrapMode } from "../../bootstrap-mode.js";
25
import { resolveBootstrapMode } from "../../bootstrap-mode.js";
36
import { DEFAULT_BOOTSTRAP_FILENAME, type WorkspaceBootstrapFile } from "../../workspace.js";

src/agents/embedded-agent-runner/run/attempt-http-runtime.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Configures HTTP timeout defaults for embedded-agent attempt runtime calls.
3+
*/
14
import {
25
DEFAULT_UNDICI_STREAM_TIMEOUT_MS,
36
ensureGlobalUndiciDispatcherStreamTimeouts,

src/agents/embedded-agent-runner/run/attempt-session.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Creates embedded-agent sessions with the runner resource loader installed.
3+
*/
14
import type { CreateAgentSessionOptions } from "../../sessions/index.js";
25

36
/**

src/agents/embedded-agent-runner/run/attempt-system-prompt.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Builds the system prompt inputs for a single embedded-agent attempt.
3+
*/
14
import type { OpenClawConfig } from "../../../config/types.openclaw.js";
25
import type { ProviderTransformSystemPromptContext } from "../../../plugins/types.js";
36
import { buildEmbeddedSystemPrompt } from "../system-prompt.js";

src/agents/embedded-agent-runner/run/attempt-tool-construction-plan.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Plans which core, bundle MCP, and bundle LSP tools an attempt should build.
3+
*/
14
import { TOOL_NAME_SEPARATOR } from "../../agent-bundle-mcp-names.js";
25
import type { OpenClawCodingToolConstructionPlan } from "../../agent-tools.js";
36
import { isToolAllowedByPolicyName } from "../../tool-policy-match.js";

src/agents/embedded-agent-runner/run/attempt-trajectory-flush-cleanup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Flushes attempt trajectory recorders during cleanup.
3+
*/
14
import { runAgentCleanupStep } from "../../run-cleanup-timeout.js";
25

36
/** Minimal recorder surface needed to flush trajectory data during run cleanup. */

src/agents/embedded-agent-runner/run/attempt-trajectory-status.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Resolves terminal attempt trajectory status and assistant-visible text.
3+
*/
14
import {
25
hasAcceptedSessionSpawn,
36
type AcceptedSessionSpawn,

0 commit comments

Comments
 (0)