hammer-ai 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1303,9 +1303,9 @@ declare abstract class ToolLoopAgentRuntime<TMemory extends AgentMemoryLayer = A
1303
1303
  protected constructor(deps: ToolLoopAgentRuntimeDeps<TStepInput>);
1304
1304
  protected abstract createRuntimeSetup(): Promise<ToolLoopRuntimeSetup<TMemory, TEnforcer>>;
1305
1305
  protected abstract getToolDefinitions(): ToolDefinition[];
1306
- protected buildSystemPrompt(_context: ToolLoopRuntimeStepContext<TStepInput>): string;
1307
- protected buildLLMRequest(_context: ToolLoopRuntimeStepContext<TStepInput>, _messages: ChatMessage[]): ToolLoopRuntimeLLMRequest;
1308
- protected parseStepResponse(_response: ToolLoopRuntimeLLMResponse, _tools: ToolDefinition[]): ParsedStepInput;
1306
+ protected abstract buildSystemPrompt(context: ToolLoopRuntimeStepContext<TStepInput>): string;
1307
+ protected abstract buildLLMRequest(context: ToolLoopRuntimeStepContext<TStepInput>, messages: ChatMessage[]): ToolLoopRuntimeLLMRequest;
1308
+ protected abstract parseStepResponse(response: ToolLoopRuntimeLLMResponse, tools: ToolDefinition[]): ParsedStepInput;
1309
1309
  protected get runtimeLoop(): AgentLoop | null;
1310
1310
  protected get runtimeMemory(): TMemory | null;
1311
1311
  protected get runtimeEnforcer(): TEnforcer | null;
@@ -1754,13 +1754,9 @@ declare abstract class WebToolLoopAgentRuntime<TState extends WebToolLoopRuntime
1754
1754
  * Agent Memory Layer Factory — Shared factory for creating pre-configured
1755
1755
  * AgentMemoryLayer instances.
1756
1756
  *
1757
- * Centralizes the shared Hammer/Magic/Monoslides/Monospace memory-layer presets so each
1758
- * agent only provides the small set of overrides it actually owns.
1759
- *
1760
- * Usage:
1761
- * import { createAgentMemoryLayer } from "./agent-memory-factory"
1762
- * const memory = createAgentMemoryLayer("hammer", { logger: myLogger })
1763
- * const memory = createAgentMemoryLayer("magic", { toolMemoryExtractor: canvasExtractor })
1757
+ * All agents share the same workspace-agent preset. Callers still pass
1758
+ * a preset name string (currently ignored) for call-site readability and
1759
+ * future differentiation.
1764
1760
  */
1765
1761
 
1766
1762
  interface AgentMemoryFactoryOverrides {
@@ -1776,30 +1772,13 @@ interface AgentMemoryFactoryOverrides {
1776
1772
  logger?: AgentMemoryLogger;
1777
1773
  }
1778
1774
  /**
1779
- * Create an AgentMemoryLayer pre-configured for a specific agent preset.
1775
+ * Create an AgentMemoryLayer pre-configured with the shared workspace defaults.
1780
1776
  *
1781
- * @param preset - Agent preset name ("hammer" | "magic" | "monoslides" | "monospace").
1777
+ * @param _preset - Ignored. All agents share the same preset. Kept for call-site compatibility.
1782
1778
  * @param overrides - Optional overrides for any preset value.
1783
1779
  * @returns Configured AgentMemoryLayer instance.
1784
- *
1785
- * @example
1786
- * ```ts
1787
- * // Hammer (Node.js — use TiktokenEstimator for precision)
1788
- * const memory = createAgentMemoryLayer("hammer", {
1789
- * compactionClient,
1790
- * tokenEstimator: new TiktokenEstimator(),
1791
- * logger: hammerLogger,
1792
- * })
1793
- *
1794
- * // Magic/Monoslides/Monospace (browser — CharTokenEstimator is default)
1795
- * const memory = createAgentMemoryLayer("magic", {
1796
- * compactionClient,
1797
- * getToolDefinitions: () => registry.getToolDefinitions(),
1798
- * toolMemoryExtractor: MAGIC_TOOL_MEMORY_EXTRACTOR,
1799
- * })
1800
- * ```
1801
1780
  */
1802
- declare function createAgentMemoryLayer(preset: string, overrides?: AgentMemoryFactoryOverrides): AgentMemoryLayer;
1781
+ declare function createAgentMemoryLayer(_preset: string, overrides?: AgentMemoryFactoryOverrides): AgentMemoryLayer;
1803
1782
 
1804
1783
  /**
1805
1784
  * Shared structured control-segment prompt fragments used across agent loops.
@@ -1818,7 +1797,6 @@ interface BashCommandsSectionOptions {
1818
1797
  declare const STANDARD_TOOL_CALL_FORMAT_RULES: string[];
1819
1798
  declare const SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE: string;
1820
1799
  declare const SHARED_TOOL_CALL_EXAMPLE_LINES: string[];
1821
- declare const CONTINUE_TOOL_CALL_RESPONSE_EXAMPLE: string;
1822
1800
 
1823
1801
  /**
1824
1802
  * Shared prompt building utilities for agentic loops.
@@ -2405,4 +2383,4 @@ declare function runStructuredLLMCompaction<TMessage extends MemoryMessage, TSta
2405
2383
  parseState: (obj: Record<string, unknown>) => TState | null;
2406
2384
  }): Promise<TState | null>;
2407
2385
 
2408
- export { AGENT_MACHINE_STATES, AgentLoop, type AgentLoopCallbacks, type AgentLoopDeps, type AgentMachineContext, type AgentMachineEvent, type AgentMachineState, type AgentMemoryCitation, type AgentMemoryConstraint, type AgentMemoryEvidence, type AgentMemoryFactoryOverrides, AgentMemoryLayer, type AgentMemoryLayerConfig, type AgentMemoryLogger, type AgentMemoryNote, type AgentMemoryTask, type AgentMessage, type AgentPhase, type AgentState, ApiError, type BackgroundBashAction, BackgroundBashRunCommand, BaseMemoryLayer, BaseValidationEnforcer, BashRunCommand, type BuildMemoryCompactionPromptOptions, CODE_QUALITY_RULE_LINE, CONTINUE_TOOL_CALL_RESPONSE_EXAMPLE, CharTokenEstimator, type ChatMessage, type CommandRuntime, type CommandTargetInfo, type CompactionCursor, type CompactionLLMClient, type ConversationAdapter, type ConversationSink, type CreateWebRuntimeSetupOptions, DEFAULT_AGENT_FALLBACK_SYSTEM_PROMPT, DEFAULT_ALLOWED_RUN_TARGETS, DEFAULT_RUN_COMMAND_REGISTRY, DEFAULT_THREAD_AUTO_SCROLL_BOTTOM_THRESHOLD, DEFAULT_TOOL_MEMORY_EXTRACTOR, ERROR_RECOVERY_RULE_LINE, ERROR_TRUNCATED_RESPONSE, type EnforcerResult, type ExecuteWebLoopRunOptions, type FetchLike, type FetchResponseLike, type HammerAgentConfig, type HammerAgentProviderPreset, INCREMENTAL_TESTING_RULE_LINE, JUST_BASH_SCRIPT_EXECUTION_RESTRICTION_LINES, JUST_BASH_SHELL_NATIVE_WORKFLOW_COMMAND_EXAMPLES, LLMClient, type LLMClientResponse, type LLMProviderConfig, type LLMRequest, type LLMRequestOptions, type LLMResponse, LLMResponseSchema, type LoopOutcome, MAX_TOOL_RESULT_CHARS, type MemoryMessage, type MemoryProvenance, type MemoryStorage, PORT_CONFLICT_RULE_LINE, type ParseAgentResponseOptions, type ParsedAgentResponse, type ParsedBackgroundBashCommand, type ParsedStepInput, PendingAgentMessageBuffer, type PersistedMemoryData, type ProviderName, ProxyTool, type ProxyToolExecutor, ROOT_CAUSES_RULE_LINE, type RawMessage, RunCommand, type RunCommandParseResult, type RunCommandPromptAvailability, RunCommandRegistry, type RunInvocationTarget, type RuntimeController, type RuntimeSnapshotUpdater, type RuntimeStore, type RuntimeSubscriber, SHARED_TOOL_CALL_EXAMPLE_LINES, SHARED_TOOL_USAGE_RULE, SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE, SKILL_INVOKE_READ_RULE_LINE, STANDARD_TOOL_CALL_FORMAT_RULES, SUPPORTED_RUN_TARGETS, type SkillSummaryLike, type StepResult, type StreamCallbacks, StreamingToolParser, type StreamingToolParserCallbacks, type SystemPromptBuildContext, type SystemPromptCustomizer, type SystemPromptSections, TODO_LIST_FIRST_RESPONSE_RULE_LINE, TOOL_CALL_SEPARATOR_RULE, type TodoItem, type TodoStatus, type TokenEstimator, Tool, type ToolCall, ToolCallSchema, type ToolDataPrimitive, type ToolDataSchema, type ToolDataValue, type ToolDefinition, type ToolDefinitionMetadata, type ToolExecutionResult, type ToolLike, ToolLoopAgentRuntime, type ToolLoopAgentRuntimeDeps, type ToolLoopRuntimeExecuteStepResult, type ToolLoopRuntimeHooks, type ToolLoopRuntimeInfrastructure, type ToolLoopRuntimeLLMRequest, type ToolLoopRuntimeLLMResponse, type ToolLoopRuntimeRunStepOptions, type ToolLoopRuntimeRunStepResult, type ToolLoopRuntimeSetup, type ToolLoopRuntimeStepContext, type ToolLoopStepExecutionResult, type ToolLoopStepExecutorCallbacks, type ToolLoopStepExecutorOptions, type ToolLoopStepExecutorResponse, type ToolMemoryCitationKind, type ToolMemoryEvidenceKind, type ToolMemoryEvidencePolicy, type ToolMemoryExtractor, type ToolMemoryMetadata, type ToolMemoryNoteKind, type ToolMemoryNotePolicy, type ToolMemoryNoteScope, type ToolMetadata, type ToolParameterDefinition, ToolRegistry, type ToolRegistryBeforeExecuteContext, type ToolRegistryMissingToolContext, type ToolRegistryOptions, type ToolResult, ToolRunCommand, type ToolSchema, type TruncatedToolInfo, VALIDATE_AFTER_CHANGES_RULE_LINE, type WebSearchToolActionInput, WebToolLoopAgentRuntime, type WebToolLoopAgentRuntimeConstructorOptions, type WebToolLoopRuntimeStateLike, WebValidationEnforcer, type WorkspaceCodingStaticRulesOptions, agentMachine, applyIdleWebAgentState, applyInitialWebAgentRunState, buildAgentIdentityLine, buildAgentSystemPrompt, buildCompactionEntry, buildCoreStaticRules, buildNoStructuredResponseFoundError, buildParseFeedback, buildSkillAwareStaticContext, buildSkillsSection, buildStepUserMessage, buildToolLogRevealFrames, buildToolUsageExample, buildValidationErrorMessage, buildWebRuntimeRules, buildWorkspaceCodingStaticRules, canonicalizeCompactionText, coerceToolCallToDefinition, configure, containsStandaloneStructuredInvocationStart, createAgentMemoryLayer, createAppendToolsSectionCustomizer, createBackgroundBashDefinition, createConversationSink, createCustomRunCommandRegistry, createInitialWebAgentState, createRunCommandRuntimeBindings, createRuntimeStore, createToolAgentMessage, createToolRegistry, createToolsSectionOverrideCustomizer, createWebAgentMessageIdGenerator, createWebSearchToolActions, createWebToolLoopCallbacks, decodeEscapedShellText, defineRuntimeController, enrichToolResultWithUnixMetadata, executeBackgroundUnixCommandString, executeToolCallWithRunCommands, executeToolLoopStep, executeToolSafe, executeUnixCommandString, extractPrimaryCommandMetadata, extractTruncatedToolInfo, formatToolCallAsUnixCommand, formatToolDefinitions, formatToolResultMessage, formatToolsSection, formatUnixToolSurface, formatZodValidationError, getDiagnosticSummaryLine, getProviderConfig, getRunCommandPromptAvailability, getToolLogSummaryLine, isBackgroundBashToolCall, isBashToolCall, limitEntriesByRecency, machineStateToWebAgentPhase, mapConversationRoleToAgentRole, parseAgentResponse, parseResponseWithRecovery, parseStructuredAgentText, parseToolResultMessage, parseUnixToolCommand, readDiagnosticLevel, readDiagnosticSource, resolveToolDefinitionForInvocation, runStructuredLLMCompaction, selectLatestByKey, shouldAutoScrollThread, shouldSkipStepUserMessage, stripDiagnosticMessagePrefix, suppressWebValidationLog, tokenizeUnixCommand, truncateToolResult };
2386
+ export { AGENT_MACHINE_STATES, AgentLoop, type AgentLoopCallbacks, type AgentLoopDeps, type AgentMachineContext, type AgentMachineEvent, type AgentMachineState, type AgentMemoryCitation, type AgentMemoryConstraint, type AgentMemoryEvidence, type AgentMemoryFactoryOverrides, AgentMemoryLayer, type AgentMemoryLayerConfig, type AgentMemoryLogger, type AgentMemoryNote, type AgentMemoryTask, type AgentMessage, type AgentPhase, type AgentState, ApiError, type BackgroundBashAction, BackgroundBashRunCommand, BaseMemoryLayer, BaseValidationEnforcer, BashRunCommand, type BuildMemoryCompactionPromptOptions, CODE_QUALITY_RULE_LINE, CharTokenEstimator, type ChatMessage, type CommandRuntime, type CommandTargetInfo, type CompactionCursor, type CompactionLLMClient, type ConversationAdapter, type ConversationSink, type CreateWebRuntimeSetupOptions, DEFAULT_AGENT_FALLBACK_SYSTEM_PROMPT, DEFAULT_ALLOWED_RUN_TARGETS, DEFAULT_RUN_COMMAND_REGISTRY, DEFAULT_THREAD_AUTO_SCROLL_BOTTOM_THRESHOLD, DEFAULT_TOOL_MEMORY_EXTRACTOR, ERROR_RECOVERY_RULE_LINE, ERROR_TRUNCATED_RESPONSE, type EnforcerResult, type ExecuteWebLoopRunOptions, type FetchLike, type FetchResponseLike, type HammerAgentConfig, type HammerAgentProviderPreset, INCREMENTAL_TESTING_RULE_LINE, JUST_BASH_SCRIPT_EXECUTION_RESTRICTION_LINES, JUST_BASH_SHELL_NATIVE_WORKFLOW_COMMAND_EXAMPLES, LLMClient, type LLMClientResponse, type LLMProviderConfig, type LLMRequest, type LLMRequestOptions, type LLMResponse, LLMResponseSchema, type LoopOutcome, MAX_TOOL_RESULT_CHARS, type MemoryMessage, type MemoryProvenance, type MemoryStorage, PORT_CONFLICT_RULE_LINE, type ParseAgentResponseOptions, type ParsedAgentResponse, type ParsedBackgroundBashCommand, type ParsedStepInput, PendingAgentMessageBuffer, type PersistedMemoryData, type ProviderName, ProxyTool, type ProxyToolExecutor, ROOT_CAUSES_RULE_LINE, type RawMessage, RunCommand, type RunCommandParseResult, type RunCommandPromptAvailability, RunCommandRegistry, type RunInvocationTarget, type RuntimeController, type RuntimeSnapshotUpdater, type RuntimeStore, type RuntimeSubscriber, SHARED_TOOL_CALL_EXAMPLE_LINES, SHARED_TOOL_USAGE_RULE, SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE, SKILL_INVOKE_READ_RULE_LINE, STANDARD_TOOL_CALL_FORMAT_RULES, SUPPORTED_RUN_TARGETS, type SkillSummaryLike, type StepResult, type StreamCallbacks, StreamingToolParser, type StreamingToolParserCallbacks, type SystemPromptBuildContext, type SystemPromptCustomizer, type SystemPromptSections, TODO_LIST_FIRST_RESPONSE_RULE_LINE, TOOL_CALL_SEPARATOR_RULE, type TodoItem, type TodoStatus, type TokenEstimator, Tool, type ToolCall, ToolCallSchema, type ToolDataPrimitive, type ToolDataSchema, type ToolDataValue, type ToolDefinition, type ToolDefinitionMetadata, type ToolExecutionResult, type ToolLike, ToolLoopAgentRuntime, type ToolLoopAgentRuntimeDeps, type ToolLoopRuntimeExecuteStepResult, type ToolLoopRuntimeHooks, type ToolLoopRuntimeInfrastructure, type ToolLoopRuntimeLLMRequest, type ToolLoopRuntimeLLMResponse, type ToolLoopRuntimeRunStepOptions, type ToolLoopRuntimeRunStepResult, type ToolLoopRuntimeSetup, type ToolLoopRuntimeStepContext, type ToolLoopStepExecutionResult, type ToolLoopStepExecutorCallbacks, type ToolLoopStepExecutorOptions, type ToolLoopStepExecutorResponse, type ToolMemoryCitationKind, type ToolMemoryEvidenceKind, type ToolMemoryEvidencePolicy, type ToolMemoryExtractor, type ToolMemoryMetadata, type ToolMemoryNoteKind, type ToolMemoryNotePolicy, type ToolMemoryNoteScope, type ToolMetadata, type ToolParameterDefinition, ToolRegistry, type ToolRegistryBeforeExecuteContext, type ToolRegistryMissingToolContext, type ToolRegistryOptions, type ToolResult, ToolRunCommand, type ToolSchema, type TruncatedToolInfo, VALIDATE_AFTER_CHANGES_RULE_LINE, type WebSearchToolActionInput, WebToolLoopAgentRuntime, type WebToolLoopAgentRuntimeConstructorOptions, type WebToolLoopRuntimeStateLike, WebValidationEnforcer, type WorkspaceCodingStaticRulesOptions, agentMachine, applyIdleWebAgentState, applyInitialWebAgentRunState, buildAgentIdentityLine, buildAgentSystemPrompt, buildCompactionEntry, buildCoreStaticRules, buildNoStructuredResponseFoundError, buildParseFeedback, buildSkillAwareStaticContext, buildSkillsSection, buildStepUserMessage, buildToolLogRevealFrames, buildToolUsageExample, buildValidationErrorMessage, buildWebRuntimeRules, buildWorkspaceCodingStaticRules, canonicalizeCompactionText, coerceToolCallToDefinition, configure, containsStandaloneStructuredInvocationStart, createAgentMemoryLayer, createAppendToolsSectionCustomizer, createBackgroundBashDefinition, createConversationSink, createCustomRunCommandRegistry, createInitialWebAgentState, createRunCommandRuntimeBindings, createRuntimeStore, createToolAgentMessage, createToolRegistry, createToolsSectionOverrideCustomizer, createWebAgentMessageIdGenerator, createWebSearchToolActions, createWebToolLoopCallbacks, decodeEscapedShellText, defineRuntimeController, enrichToolResultWithUnixMetadata, executeBackgroundUnixCommandString, executeToolCallWithRunCommands, executeToolLoopStep, executeToolSafe, executeUnixCommandString, extractPrimaryCommandMetadata, extractTruncatedToolInfo, formatToolCallAsUnixCommand, formatToolDefinitions, formatToolResultMessage, formatToolsSection, formatUnixToolSurface, formatZodValidationError, getDiagnosticSummaryLine, getProviderConfig, getRunCommandPromptAvailability, getToolLogSummaryLine, isBackgroundBashToolCall, isBashToolCall, limitEntriesByRecency, machineStateToWebAgentPhase, mapConversationRoleToAgentRole, parseAgentResponse, parseResponseWithRecovery, parseStructuredAgentText, parseToolResultMessage, parseUnixToolCommand, readDiagnosticLevel, readDiagnosticSource, resolveToolDefinitionForInvocation, runStructuredLLMCompaction, selectLatestByKey, shouldAutoScrollThread, shouldSkipStepUserMessage, stripDiagnosticMessagePrefix, suppressWebValidationLog, tokenizeUnixCommand, truncateToolResult };
package/dist/index.js CHANGED
@@ -1007,10 +1007,6 @@ var SHARED_TOOL_CALL_EXAMPLE_LINES = [
1007
1007
  ` \u2717 ${INCORRECT_INLINE_PROSE_AND_TOOL_SLUG_EXAMPLE}`,
1008
1008
  ` \u2717 ${INCORRECT_INLINE_HEADER_AND_PAYLOAD_EXAMPLE}`
1009
1009
  ];
1010
- var CONTINUE_TOOL_CALL_RESPONSE_EXAMPLE = [
1011
- "I need to inspect the file first.",
1012
- SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE
1013
- ].join("\n");
1014
1010
  function buildBashCommandsSection(options) {
1015
1011
  return buildBashCommandsSectionLines(options).join("\n");
1016
1012
  }
@@ -3933,21 +3929,6 @@ var ToolLoopAgentRuntime = class {
3933
3929
  this.hooks = deps.hooks ?? {};
3934
3930
  this.requireTodoListOnFirstResponse = deps.requireTodoListOnFirstResponse ?? false;
3935
3931
  }
3936
- buildSystemPrompt(_context) {
3937
- throw new Error(
3938
- `buildSystemPrompt is not implemented for ${this.constructor.name}`
3939
- );
3940
- }
3941
- buildLLMRequest(_context, _messages) {
3942
- throw new Error(
3943
- `buildLLMRequest is not implemented for ${this.constructor.name}`
3944
- );
3945
- }
3946
- parseStepResponse(_response, _tools) {
3947
- throw new Error(
3948
- `parseStepResponse is not implemented for ${this.constructor.name}`
3949
- );
3950
- }
3951
3932
  get runtimeLoop() {
3952
3933
  return this.infrastructure?.loop ?? null;
3953
3934
  }
@@ -5773,30 +5754,20 @@ var SHARED_WORKSPACE_AGENT_MEMORY_PRESET = {
5773
5754
  systemPromptOverhead: 4e3,
5774
5755
  toolMemoryExtractor: DEFAULT_TOOL_MEMORY_EXTRACTOR
5775
5756
  };
5776
- var PRESETS = {
5777
- hammer: SHARED_WORKSPACE_AGENT_MEMORY_PRESET,
5778
- magic: SHARED_WORKSPACE_AGENT_MEMORY_PRESET,
5779
- monoslides: SHARED_WORKSPACE_AGENT_MEMORY_PRESET,
5780
- monospace: SHARED_WORKSPACE_AGENT_MEMORY_PRESET
5781
- };
5782
- function createAgentMemoryLayer(preset, overrides) {
5783
- const presetConfig = PRESETS[preset];
5784
- if (!presetConfig) {
5785
- throw new Error(`Unknown memory preset: "${preset}". Available: ${Object.keys(PRESETS).join(", ")}`);
5786
- }
5757
+ function createAgentMemoryLayer(_preset, overrides) {
5787
5758
  return new AgentMemoryLayer({
5788
- compactionTokenThreshold: presetConfig.compactionTokenThreshold,
5789
- protectedContextTokens: presetConfig.protectedContextTokens,
5790
- stateBudgetTokens: presetConfig.stateBudgetTokens,
5791
- maxRawHistory: presetConfig.maxRawHistory,
5792
- compactionDebounceTurns: presetConfig.compactionDebounceTurns,
5793
- systemPromptOverhead: presetConfig.systemPromptOverhead,
5759
+ compactionTokenThreshold: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.compactionTokenThreshold,
5760
+ protectedContextTokens: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.protectedContextTokens,
5761
+ stateBudgetTokens: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.stateBudgetTokens,
5762
+ maxRawHistory: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.maxRawHistory,
5763
+ compactionDebounceTurns: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.compactionDebounceTurns,
5764
+ systemPromptOverhead: SHARED_WORKSPACE_AGENT_MEMORY_PRESET.systemPromptOverhead,
5794
5765
  tokenEstimator: overrides?.tokenEstimator ?? new CharTokenEstimator(),
5795
5766
  compactionClient: overrides?.compactionClient,
5796
5767
  compactionTemperature: getCompactionLlmTemperature(),
5797
5768
  compactionMaxTokens: getCompactionLlmMaxTokens(),
5798
5769
  getToolDefinitions: overrides?.getToolDefinitions,
5799
- toolMemoryExtractor: overrides?.toolMemoryExtractor ?? presetConfig.toolMemoryExtractor,
5770
+ toolMemoryExtractor: overrides?.toolMemoryExtractor ?? SHARED_WORKSPACE_AGENT_MEMORY_PRESET.toolMemoryExtractor,
5800
5771
  logger: overrides?.logger
5801
5772
  });
5802
5773
  }
@@ -7155,9 +7126,6 @@ function splitToolLogRevealSegments(content) {
7155
7126
  function createWebSearchToolActions(deps) {
7156
7127
  return {
7157
7128
  executeWebTool: async (input) => {
7158
- if (input.tool !== "BraveWebSearch" && input.tool !== "BochaWebSearch") {
7159
- throw new Error(`Unknown tool: ${String(input.tool)}`);
7160
- }
7161
7129
  return deps.executeWebSearch(input.tool, input.input);
7162
7130
  }
7163
7131
  };
@@ -7417,6 +7385,6 @@ async function executeToolLoopStep(options) {
7417
7385
  };
7418
7386
  }
7419
7387
 
7420
- export { AGENT_MACHINE_STATES, AgentLoop, AgentMemoryLayer, ApiError, BackgroundBashRunCommand, BaseMemoryLayer, BaseValidationEnforcer, BashRunCommand, CODE_QUALITY_RULE_LINE, CONTINUE_TOOL_CALL_RESPONSE_EXAMPLE, CharTokenEstimator, DEFAULT_AGENT_FALLBACK_SYSTEM_PROMPT, DEFAULT_ALLOWED_RUN_TARGETS, DEFAULT_RUN_COMMAND_REGISTRY, DEFAULT_THREAD_AUTO_SCROLL_BOTTOM_THRESHOLD, DEFAULT_TOOL_MEMORY_EXTRACTOR, ERROR_RECOVERY_RULE_LINE, ERROR_TRUNCATED_RESPONSE, INCREMENTAL_TESTING_RULE_LINE, JUST_BASH_SCRIPT_EXECUTION_RESTRICTION_LINES, JUST_BASH_SHELL_NATIVE_WORKFLOW_COMMAND_EXAMPLES, LLMClient, LLMResponseSchema, MAX_TOOL_RESULT_CHARS, PORT_CONFLICT_RULE_LINE, PendingAgentMessageBuffer, ProxyTool, ROOT_CAUSES_RULE_LINE, RunCommand, RunCommandRegistry, SHARED_TOOL_CALL_EXAMPLE_LINES, SHARED_TOOL_USAGE_RULE, SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE, SKILL_INVOKE_READ_RULE_LINE, STANDARD_TOOL_CALL_FORMAT_RULES, SUPPORTED_RUN_TARGETS, StreamingToolParser, TODO_LIST_FIRST_RESPONSE_RULE_LINE, TOOL_CALL_SEPARATOR_RULE, Tool, ToolCallSchema, ToolLoopAgentRuntime, ToolRegistry, ToolRunCommand, VALIDATE_AFTER_CHANGES_RULE_LINE, WebToolLoopAgentRuntime, WebValidationEnforcer, agentMachine, applyIdleWebAgentState, applyInitialWebAgentRunState, buildAgentIdentityLine, buildAgentSystemPrompt, buildCompactionEntry, buildCoreStaticRules, buildNoStructuredResponseFoundError, buildParseFeedback, buildSkillAwareStaticContext, buildSkillsSection, buildStepUserMessage, buildToolLogRevealFrames, buildToolUsageExample, buildValidationErrorMessage, buildWebRuntimeRules, buildWorkspaceCodingStaticRules, canonicalizeCompactionText, coerceToolCallToDefinition, configure, containsStandaloneStructuredInvocationStart, createAgentMemoryLayer, createAppendToolsSectionCustomizer, createBackgroundBashDefinition, createConversationSink, createCustomRunCommandRegistry, createInitialWebAgentState, createRunCommandRuntimeBindings, createRuntimeStore, createToolAgentMessage, createToolRegistry, createToolsSectionOverrideCustomizer, createWebAgentMessageIdGenerator, createWebSearchToolActions, createWebToolLoopCallbacks, decodeEscapedShellText, defineRuntimeController, enrichToolResultWithUnixMetadata, executeBackgroundUnixCommandString, executeToolCallWithRunCommands, executeToolLoopStep, executeToolSafe, executeUnixCommandString, extractPrimaryCommandMetadata, extractTruncatedToolInfo, formatToolCallAsUnixCommand, formatToolDefinitions, formatToolResultMessage, formatToolsSection, formatUnixToolSurface, formatZodValidationError, getDiagnosticSummaryLine, getProviderConfig, getRunCommandPromptAvailability, getToolLogSummaryLine, isBackgroundBashToolCall, isBashToolCall, limitEntriesByRecency, machineStateToWebAgentPhase, mapConversationRoleToAgentRole, parseAgentResponse, parseResponseWithRecovery, parseStructuredAgentText, parseToolResultMessage, parseUnixToolCommand, readDiagnosticLevel, readDiagnosticSource, resolveToolDefinitionForInvocation, runStructuredLLMCompaction, selectLatestByKey, shouldAutoScrollThread, shouldSkipStepUserMessage, stripDiagnosticMessagePrefix, suppressWebValidationLog, tokenizeUnixCommand, truncateToolResult };
7388
+ export { AGENT_MACHINE_STATES, AgentLoop, AgentMemoryLayer, ApiError, BackgroundBashRunCommand, BaseMemoryLayer, BaseValidationEnforcer, BashRunCommand, CODE_QUALITY_RULE_LINE, CharTokenEstimator, DEFAULT_AGENT_FALLBACK_SYSTEM_PROMPT, DEFAULT_ALLOWED_RUN_TARGETS, DEFAULT_RUN_COMMAND_REGISTRY, DEFAULT_THREAD_AUTO_SCROLL_BOTTOM_THRESHOLD, DEFAULT_TOOL_MEMORY_EXTRACTOR, ERROR_RECOVERY_RULE_LINE, ERROR_TRUNCATED_RESPONSE, INCREMENTAL_TESTING_RULE_LINE, JUST_BASH_SCRIPT_EXECUTION_RESTRICTION_LINES, JUST_BASH_SHELL_NATIVE_WORKFLOW_COMMAND_EXAMPLES, LLMClient, LLMResponseSchema, MAX_TOOL_RESULT_CHARS, PORT_CONFLICT_RULE_LINE, PendingAgentMessageBuffer, ProxyTool, ROOT_CAUSES_RULE_LINE, RunCommand, RunCommandRegistry, SHARED_TOOL_CALL_EXAMPLE_LINES, SHARED_TOOL_USAGE_RULE, SINGLE_TOOL_CALL_RUN_LINE_EXAMPLE, SKILL_INVOKE_READ_RULE_LINE, STANDARD_TOOL_CALL_FORMAT_RULES, SUPPORTED_RUN_TARGETS, StreamingToolParser, TODO_LIST_FIRST_RESPONSE_RULE_LINE, TOOL_CALL_SEPARATOR_RULE, Tool, ToolCallSchema, ToolLoopAgentRuntime, ToolRegistry, ToolRunCommand, VALIDATE_AFTER_CHANGES_RULE_LINE, WebToolLoopAgentRuntime, WebValidationEnforcer, agentMachine, applyIdleWebAgentState, applyInitialWebAgentRunState, buildAgentIdentityLine, buildAgentSystemPrompt, buildCompactionEntry, buildCoreStaticRules, buildNoStructuredResponseFoundError, buildParseFeedback, buildSkillAwareStaticContext, buildSkillsSection, buildStepUserMessage, buildToolLogRevealFrames, buildToolUsageExample, buildValidationErrorMessage, buildWebRuntimeRules, buildWorkspaceCodingStaticRules, canonicalizeCompactionText, coerceToolCallToDefinition, configure, containsStandaloneStructuredInvocationStart, createAgentMemoryLayer, createAppendToolsSectionCustomizer, createBackgroundBashDefinition, createConversationSink, createCustomRunCommandRegistry, createInitialWebAgentState, createRunCommandRuntimeBindings, createRuntimeStore, createToolAgentMessage, createToolRegistry, createToolsSectionOverrideCustomizer, createWebAgentMessageIdGenerator, createWebSearchToolActions, createWebToolLoopCallbacks, decodeEscapedShellText, defineRuntimeController, enrichToolResultWithUnixMetadata, executeBackgroundUnixCommandString, executeToolCallWithRunCommands, executeToolLoopStep, executeToolSafe, executeUnixCommandString, extractPrimaryCommandMetadata, extractTruncatedToolInfo, formatToolCallAsUnixCommand, formatToolDefinitions, formatToolResultMessage, formatToolsSection, formatUnixToolSurface, formatZodValidationError, getDiagnosticSummaryLine, getProviderConfig, getRunCommandPromptAvailability, getToolLogSummaryLine, isBackgroundBashToolCall, isBashToolCall, limitEntriesByRecency, machineStateToWebAgentPhase, mapConversationRoleToAgentRole, parseAgentResponse, parseResponseWithRecovery, parseStructuredAgentText, parseToolResultMessage, parseUnixToolCommand, readDiagnosticLevel, readDiagnosticSource, resolveToolDefinitionForInvocation, runStructuredLLMCompaction, selectLatestByKey, shouldAutoScrollThread, shouldSkipStepUserMessage, stripDiagnosticMessagePrefix, suppressWebValidationLog, tokenizeUnixCommand, truncateToolResult };
7421
7389
  //# sourceMappingURL=index.js.map
7422
7390
  //# sourceMappingURL=index.js.map