erosolar-cli 2.1.170 → 2.1.172
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/README.md +1 -1
- package/agents/erosolar-code.rules.json +2 -2
- package/agents/general.rules.json +3 -21
- package/dist/StringUtils.d.ts +8 -0
- package/dist/StringUtils.d.ts.map +1 -0
- package/dist/StringUtils.js +11 -0
- package/dist/StringUtils.js.map +1 -0
- package/dist/capabilities/statusCapability.js +2 -2
- package/dist/capabilities/statusCapability.js.map +1 -1
- package/dist/contracts/agent-schemas.json +5 -5
- package/dist/core/agent.d.ts +24 -83
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +248 -499
- package/dist/core/agent.js.map +1 -1
- package/dist/core/aiFlowSupervisor.d.ts +44 -0
- package/dist/core/aiFlowSupervisor.d.ts.map +1 -0
- package/dist/core/aiFlowSupervisor.js +299 -0
- package/dist/core/aiFlowSupervisor.js.map +1 -0
- package/dist/core/cliTestHarness.d.ts +200 -0
- package/dist/core/cliTestHarness.d.ts.map +1 -0
- package/dist/core/cliTestHarness.js +549 -0
- package/dist/core/cliTestHarness.js.map +1 -0
- package/dist/core/preferences.d.ts +0 -1
- package/dist/core/preferences.d.ts.map +1 -1
- package/dist/core/preferences.js +1 -8
- package/dist/core/preferences.js.map +1 -1
- package/dist/core/schemaValidator.js +3 -3
- package/dist/core/schemaValidator.js.map +1 -1
- package/dist/core/testUtils.d.ts +121 -0
- package/dist/core/testUtils.d.ts.map +1 -0
- package/dist/core/testUtils.js +235 -0
- package/dist/core/testUtils.js.map +1 -0
- package/dist/core/toolPreconditions.d.ts +11 -0
- package/dist/core/toolPreconditions.d.ts.map +1 -1
- package/dist/core/toolPreconditions.js +164 -33
- package/dist/core/toolPreconditions.js.map +1 -1
- package/dist/core/toolRuntime.d.ts.map +1 -1
- package/dist/core/toolRuntime.js +114 -9
- package/dist/core/toolRuntime.js.map +1 -1
- package/dist/core/toolValidation.d.ts +116 -0
- package/dist/core/toolValidation.d.ts.map +1 -0
- package/dist/core/toolValidation.js +282 -0
- package/dist/core/toolValidation.js.map +1 -0
- package/dist/core/updateChecker.d.ts +1 -61
- package/dist/core/updateChecker.d.ts.map +1 -1
- package/dist/core/updateChecker.js +3 -147
- package/dist/core/updateChecker.js.map +1 -1
- package/dist/headless/headlessApp.d.ts.map +1 -1
- package/dist/headless/headlessApp.js +39 -0
- package/dist/headless/headlessApp.js.map +1 -1
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
- package/dist/plugins/tools/nodeDefaults.js +2 -0
- package/dist/plugins/tools/nodeDefaults.js.map +1 -1
- package/dist/providers/openaiResponsesProvider.d.ts.map +1 -1
- package/dist/providers/openaiResponsesProvider.js +74 -79
- package/dist/providers/openaiResponsesProvider.js.map +1 -1
- package/dist/runtime/agentController.d.ts.map +1 -1
- package/dist/runtime/agentController.js +3 -6
- package/dist/runtime/agentController.js.map +1 -1
- package/dist/runtime/agentSession.d.ts +2 -0
- package/dist/runtime/agentSession.d.ts.map +1 -1
- package/dist/runtime/agentSession.js +2 -2
- package/dist/runtime/agentSession.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +18 -11
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +291 -273
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/shellApp.d.ts.map +1 -1
- package/dist/shell/shellApp.js +1 -7
- package/dist/shell/shellApp.js.map +1 -1
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +15 -4
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/subagents/taskRunner.js +1 -2
- package/dist/subagents/taskRunner.js.map +1 -1
- package/dist/tools/bashTools.d.ts.map +1 -1
- package/dist/tools/bashTools.js +8 -101
- package/dist/tools/bashTools.js.map +1 -1
- package/dist/tools/diffUtils.d.ts +2 -8
- package/dist/tools/diffUtils.d.ts.map +1 -1
- package/dist/tools/diffUtils.js +13 -72
- package/dist/tools/diffUtils.js.map +1 -1
- package/dist/tools/grepTools.d.ts.map +1 -1
- package/dist/tools/grepTools.js +2 -10
- package/dist/tools/grepTools.js.map +1 -1
- package/dist/tools/planningTools.d.ts +10 -0
- package/dist/tools/planningTools.d.ts.map +1 -1
- package/dist/tools/planningTools.js +16 -0
- package/dist/tools/planningTools.js.map +1 -1
- package/dist/tools/searchTools.d.ts.map +1 -1
- package/dist/tools/searchTools.js +2 -4
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/ui/PromptController.d.ts +4 -1
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +7 -1
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/ShellUIAdapter.d.ts +28 -292
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +121 -1513
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts +30 -133
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +370 -939
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/dist/ui/animatedStatus.d.ts +6 -128
- package/dist/ui/animatedStatus.d.ts.map +1 -1
- package/dist/ui/animatedStatus.js +50 -383
- package/dist/ui/animatedStatus.js.map +1 -1
- package/dist/ui/display.d.ts +26 -182
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +97 -678
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/layout.d.ts +1 -0
- package/dist/ui/layout.d.ts.map +1 -1
- package/dist/ui/layout.js +12 -0
- package/dist/ui/layout.js.map +1 -1
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts +7 -61
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts.map +1 -1
- package/dist/ui/orchestration/UIUpdateCoordinator.js +20 -232
- package/dist/ui/orchestration/UIUpdateCoordinator.js.map +1 -1
- package/dist/ui/planOverlay.d.ts +28 -0
- package/dist/ui/planOverlay.d.ts.map +1 -0
- package/dist/ui/planOverlay.js +156 -0
- package/dist/ui/planOverlay.js.map +1 -0
- package/dist/ui/shortcutsHelp.d.ts.map +1 -1
- package/dist/ui/shortcutsHelp.js +1 -0
- package/dist/ui/shortcutsHelp.js.map +1 -1
- package/dist/ui/streamingFormatter.d.ts +30 -0
- package/dist/ui/streamingFormatter.d.ts.map +1 -0
- package/dist/ui/streamingFormatter.js +91 -0
- package/dist/ui/streamingFormatter.js.map +1 -0
- package/dist/ui/unified/index.d.ts +1 -30
- package/dist/ui/unified/index.d.ts.map +1 -1
- package/dist/ui/unified/index.js +2 -45
- package/dist/ui/unified/index.js.map +1 -1
- package/dist/utils/errorUtils.d.ts +16 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +66 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/package.json +2 -1
- package/dist/core/reliabilityPrompt.d.ts +0 -9
- package/dist/core/reliabilityPrompt.d.ts.map +0 -1
- package/dist/core/reliabilityPrompt.js +0 -31
- package/dist/core/reliabilityPrompt.js.map +0 -1
- package/dist/ui/UnifiedUIController.d.ts +0 -81
- package/dist/ui/UnifiedUIController.d.ts.map +0 -1
- package/dist/ui/UnifiedUIController.js +0 -212
- package/dist/ui/UnifiedUIController.js.map +0 -1
- package/dist/ui/animation/AnimationScheduler.d.ts +0 -192
- package/dist/ui/animation/AnimationScheduler.d.ts.map +0 -1
- package/dist/ui/animation/AnimationScheduler.js +0 -432
- package/dist/ui/animation/AnimationScheduler.js.map +0 -1
- package/dist/ui/inPlaceUpdater.d.ts +0 -181
- package/dist/ui/inPlaceUpdater.d.ts.map +0 -1
- package/dist/ui/inPlaceUpdater.js +0 -515
- package/dist/ui/inPlaceUpdater.js.map +0 -1
- package/dist/ui/interrupts/InterruptManager.d.ts +0 -142
- package/dist/ui/interrupts/InterruptManager.d.ts.map +0 -1
- package/dist/ui/interrupts/InterruptManager.js +0 -439
- package/dist/ui/interrupts/InterruptManager.js.map +0 -1
- package/dist/ui/telemetry/ResponseTracker.d.ts +0 -22
- package/dist/ui/telemetry/ResponseTracker.d.ts.map +0 -1
- package/dist/ui/telemetry/ResponseTracker.js +0 -60
- package/dist/ui/telemetry/ResponseTracker.js.map +0 -1
- package/dist/ui/telemetry/UITelemetry.d.ts +0 -181
- package/dist/ui/telemetry/UITelemetry.d.ts.map +0 -1
- package/dist/ui/telemetry/UITelemetry.js +0 -446
- package/dist/ui/telemetry/UITelemetry.js.map +0 -1
- package/dist/ui/unified/layout.d.ts +0 -12
- package/dist/ui/unified/layout.d.ts.map +0 -1
- package/dist/ui/unified/layout.js +0 -96
- package/dist/ui/unified/layout.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Unified command-line agent with a single, persistent chat box pinned to the bott
|
|
|
4
4
|
|
|
5
5
|
## Highlights
|
|
6
6
|
- One chat box, always on the bottom during the entire session (idle or streaming).
|
|
7
|
-
- Shared control bar for status,
|
|
7
|
+
- Shared control bar for status, verify/build toggle, auto-continue, and context gauge.
|
|
8
8
|
- Works with OpenAI, Anthropic, Google, xAI, DeepSeek, and local Ollama using the same UI contract.
|
|
9
9
|
- Multi-agent Task tool with built-in general-purpose, explore (read-only), and plan subagents; add custom agents from `.claude/agents`, `~/.claude/agents`, or `--agents` JSON.
|
|
10
10
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"description": "Lean, aggressive coding agent. Act first, ask only when blocked.",
|
|
8
8
|
"globalPrinciples": [
|
|
9
9
|
{
|
|
10
|
-
"id": "core.
|
|
11
|
-
"summary": "
|
|
10
|
+
"id": "core.act",
|
|
11
|
+
"summary": "ACT by default. Execute tools immediately. Only ask if genuinely blocked or request is unsafe.",
|
|
12
12
|
"severity": "critical"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"globalPrinciples": [
|
|
9
9
|
{
|
|
10
10
|
"id": "guardrail.clarify_ambiguous",
|
|
11
|
-
"summary": "
|
|
12
|
-
"detail": "
|
|
13
|
-
"severity": "
|
|
11
|
+
"summary": "CRITICAL: If user request is vague, single-word, or ambiguous (e.g., 'typing', 'fix it', 'help'), ASK for clarification FIRST. Do NOT explore or guess.",
|
|
12
|
+
"detail": "Respond with: 'Could you clarify what you mean by [X]? For example: [option A], [option B], or [option C]?' Only proceed after clarification.",
|
|
13
|
+
"severity": "critical"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"id": "guardrail.concise_responses",
|
|
@@ -42,29 +42,11 @@
|
|
|
42
42
|
"detail": "Keep tool usage auditable by narrating the intent before running them and summarizing their output afterward.",
|
|
43
43
|
"severity": "required"
|
|
44
44
|
},
|
|
45
|
-
{
|
|
46
|
-
"id": "guardrail.bias_to_action",
|
|
47
|
-
"summary": "CRITICAL: Act first, ask later. When the user makes a request, immediately use tools to investigate and accomplish it. NEVER ask clarifying questions when you can take reasonable action instead.",
|
|
48
|
-
"detail": "For 'find junk code' or 'cleanup': 1) search_files for 'TODO|FIXME|HACK|XXX', 2) grep for unused exports 'export.*(?!.*import)', 3) find empty/stub files, 4) look for commented-out code blocks. For 'fix bug' or 'debug': 1) search for error messages, 2) trace the code path, 3) read relevant files, 4) propose a fix. NEVER respond with just 'What would you like me to do?' when you can investigate.",
|
|
49
|
-
"severity": "critical"
|
|
50
|
-
},
|
|
51
45
|
{
|
|
52
46
|
"id": "guardrail.continuous_execution",
|
|
53
47
|
"summary": "CRITICAL: Continue using tools until the task is complete. Do NOT stop after reading files—immediately proceed to make the requested edits. Do NOT describe what you WILL do—just DO it by calling the appropriate tools. After each tool call, continue with the next step until the task is fully accomplished.",
|
|
54
48
|
"severity": "critical"
|
|
55
49
|
},
|
|
56
|
-
{
|
|
57
|
-
"id": "guardrail.smart_narration",
|
|
58
|
-
"summary": "CRITICAL: Narrate meaningfully. Share key insights and discoveries, not mechanical step descriptions. Say what you FOUND, not what you're DOING.",
|
|
59
|
-
"detail": "Good: 'Found the bug: processInput clears suggestions before Enter is handled (line 234)'. Bad: 'Let me trace processInput... Let me check the suggestions... I see it now, let me look at...'. For complex debugging, provide progress updates on discoveries, not tool invocations.",
|
|
60
|
-
"severity": "critical"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"id": "guardrail.deep_investigation",
|
|
64
|
-
"summary": "For ANY exploratory request, perform thorough multi-step investigation using 5-10+ tool calls. Do NOT stop after 2 tools.",
|
|
65
|
-
"detail": "When exploring: 1) list_files to get overview, 2) search_files for patterns, 3) read_file on suspicious files, 4) grep for related patterns, 5) check imports/exports, 6) look for test files, 7) check for duplicates. Report findings as you discover them. A proper investigation uses MANY tools, not just 1-2.",
|
|
66
|
-
"severity": "critical"
|
|
67
|
-
},
|
|
68
50
|
{
|
|
69
51
|
"id": "guardrail.manual_loop_supervision",
|
|
70
52
|
"summary": "Humans supervise the loop manually—escalate when you lack evidence or stall.",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../src/StringUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,KAAG,GAGxC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringUtils.js","sourceRoot":"","sources":["../src/StringUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAU,EAAO,EAAE;IAC7C,qBAAqB;IACrB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -30,8 +30,8 @@ export function createStatusCapability(statusTracker) {
|
|
|
30
30
|
tools: [
|
|
31
31
|
{
|
|
32
32
|
name: 'set_status',
|
|
33
|
-
description: '
|
|
34
|
-
'
|
|
33
|
+
description: 'Update the live status bar with a short, present-tense note about what you are doing. ' +
|
|
34
|
+
'Use an empty message to clear it.',
|
|
35
35
|
parameters: {
|
|
36
36
|
type: 'object',
|
|
37
37
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusCapability.js","sourceRoot":"","sources":["../../src/capabilities/statusCapability.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,sBAAsB,CAAC,aAAgC;IACrE,MAAM,UAAU,GAAG,cAAc,CAAC;IAClC,MAAM,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEjD,MAAM,UAAU,GAAG,CAAC,EAAU,EAAQ,EAAE;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChC,IAAI,QAAQ,EAAE,CAAC;YACb,YAAY,CAAC,QAAQ,CAAC,CAAC;YACvB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,KAAc,EAA8B,EAAE;QACnE,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QAChD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC9C,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;YAC7G,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,EAAE,EAAE,2BAA2B;QAC/B,WAAW,EAAE,gFAAgF;QAC7F,KAAK,CAAC,MAAM;YACV,OAAO;gBACL,EAAE,EAAE,gBAAgB;gBACpB,WAAW,EAAE,kCAAkC;gBAC/C,SAAS,EAAE;oBACT,EAAE,EAAE,gBAAgB;oBACpB,WAAW,EAAE,sCAAsC;oBACnD,KAAK,EAAE;wBACL;4BACE,IAAI,EAAE,YAAY;4BAClB,WAA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AED,aAAa,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;gCAElE,IAAI,GAAG,EAAE,CAAC;oCACR,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;wCAC5B,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;wCACxC,UAAU,CAAC,UAAU,CAAC,CAAC;oCACzB,CAAC,EAAE,GAAG,CAAC,CAAC;oCACR,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;gCAChC,CAAC;gCAED,OAAO,eAAe,OAAO,EAAE,CAAC;4BAClC,CAAC;yBACF;qBACF;iBACF;gBACD,OAAO;oBACL,UAAU,CAAC,UAAU,CAAC,CAAC;oBACvB,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC1C,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -470,6 +470,11 @@
|
|
|
470
470
|
"description": "Manage local/air-gapped LLM servers (Ollama, LM Studio, etc.)",
|
|
471
471
|
"category": "configuration"
|
|
472
472
|
},
|
|
473
|
+
{
|
|
474
|
+
"command": "/autocontinue",
|
|
475
|
+
"description": "Toggle auto-continue mode (prompts model when it expresses intent but doesn't act)",
|
|
476
|
+
"category": "configuration"
|
|
477
|
+
},
|
|
473
478
|
{
|
|
474
479
|
"command": "/rewind",
|
|
475
480
|
"description": "Rewind to a previous checkpoint (restore code, conversation, or both)",
|
|
@@ -534,11 +539,6 @@
|
|
|
534
539
|
"command": "/permissions",
|
|
535
540
|
"description": "Configure tool permissions (allow/deny rules)",
|
|
536
541
|
"category": "configuration"
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
"command": "/update",
|
|
540
|
-
"description": "Check for updates and configure auto-update preference",
|
|
541
|
-
"category": "configuration"
|
|
542
542
|
}
|
|
543
543
|
],
|
|
544
544
|
|
package/dist/core/agent.d.ts
CHANGED
|
@@ -12,33 +12,16 @@ export interface AgentCallbacks {
|
|
|
12
12
|
onContextRecovery?(attempt: number, maxAttempts: number, message: string): void;
|
|
13
13
|
/** Called when agent continues after context recovery - useful for updating UI */
|
|
14
14
|
onContinueAfterRecovery?(): void;
|
|
15
|
+
/** Called when auto-continuing because model expressed intent but didn't act */
|
|
16
|
+
onAutoContinue?(attempt: number, maxAttempts: number, message: string): void;
|
|
15
17
|
/** Called when multi-line paste is detected - displays summary instead of full content */
|
|
16
18
|
onMultilinePaste?(summary: string, metadata: PasteSummary): void;
|
|
17
19
|
/** Called when verification should be triggered for a final response */
|
|
18
20
|
onVerificationNeeded?(response: string, context: VerificationCallbackContext): void;
|
|
19
21
|
/** Called when the operation is cancelled by the user */
|
|
20
22
|
onCancelled?(): void;
|
|
21
|
-
/** Called when
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Called IMMEDIATELY when a user request is received, BEFORE any provider call.
|
|
25
|
-
* Useful for updating UI activity without showing filler messages.
|
|
26
|
-
*/
|
|
27
|
-
onRequestReceived?(requestPreview: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Called BEFORE the first tool call in a turn, allowing UI to update activity state.
|
|
30
|
-
* @param toolNames - Names of tools about to be called
|
|
31
|
-
* @param hasModelNarration - Whether the model provided narration/thinking before tools
|
|
32
|
-
* @returns Optional acknowledgement text to display (if model didn't provide narration)
|
|
33
|
-
*/
|
|
34
|
-
onBeforeFirstToolCall?(toolNames: string[], hasModelNarration: boolean): string | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Called when the agent encounters a transient error and will retry.
|
|
37
|
-
* @param attempt - Current retry attempt number
|
|
38
|
-
* @param maxAttempts - Maximum retry attempts
|
|
39
|
-
* @param error - The error that triggered the retry
|
|
40
|
-
*/
|
|
41
|
-
onRetrying?(attempt: number, maxAttempts: number, error: Error): void;
|
|
23
|
+
/** Called when streaming fails and we fall back to non-streaming generation */
|
|
24
|
+
onStreamFallback?(info: StreamFallbackInfo): void;
|
|
42
25
|
}
|
|
43
26
|
export interface VerificationCallbackContext {
|
|
44
27
|
/** Working directory for verification */
|
|
@@ -57,9 +40,14 @@ export interface AssistantMessageMetadata {
|
|
|
57
40
|
contextStats?: Record<string, unknown> | null;
|
|
58
41
|
/** True if content was already displayed via streaming chunks */
|
|
59
42
|
wasStreamed?: boolean;
|
|
60
|
-
/** Hint to UI to suppress rendering of internal/system filler messages */
|
|
61
|
-
suppressDisplay?: boolean;
|
|
62
43
|
}
|
|
44
|
+
export interface StreamFallbackInfo {
|
|
45
|
+
message: string;
|
|
46
|
+
error?: unknown;
|
|
47
|
+
reason?: StreamInterruptionReason;
|
|
48
|
+
partialResponse?: string;
|
|
49
|
+
}
|
|
50
|
+
export type StreamInterruptionReason = 'startup-timeout' | 'idle-timeout';
|
|
63
51
|
interface AgentOptions {
|
|
64
52
|
provider: LLMProvider;
|
|
65
53
|
toolRuntime: IToolRuntime;
|
|
@@ -72,6 +60,8 @@ interface AgentOptions {
|
|
|
72
60
|
modelId?: string;
|
|
73
61
|
/** Working directory for verification */
|
|
74
62
|
workingDirectory?: string;
|
|
63
|
+
/** Enable auto-continuation when model expresses intent but doesn't act (default: false) */
|
|
64
|
+
autoContinue?: boolean;
|
|
75
65
|
}
|
|
76
66
|
export declare class AgentRuntime {
|
|
77
67
|
private readonly messages;
|
|
@@ -85,16 +75,7 @@ export declare class AgentRuntime {
|
|
|
85
75
|
private readonly modelId;
|
|
86
76
|
private readonly workingDirectory;
|
|
87
77
|
private cancellationRequested;
|
|
88
|
-
private
|
|
89
|
-
private repeatedToolCallCount;
|
|
90
|
-
private static readonly MAX_REPEATED_TOOL_CALLS;
|
|
91
|
-
private recentToolCalls;
|
|
92
|
-
private static readonly TOOL_HISTORY_SIZE;
|
|
93
|
-
private static readonly BEHAVIORAL_LOOP_THRESHOLD;
|
|
94
|
-
private static readonly NON_CACHEABLE_TOOL_NAMES;
|
|
95
|
-
private static readonly LOOP_EXEMPT_TOOL_NAMES;
|
|
96
|
-
private toolResultCache;
|
|
97
|
-
private static readonly TOOL_CACHE_MAX_SIZE;
|
|
78
|
+
private _autoContinueEnabled;
|
|
98
79
|
constructor(options: AgentOptions);
|
|
99
80
|
/**
|
|
100
81
|
* Request cancellation of the current operation.
|
|
@@ -109,6 +90,14 @@ export declare class AgentRuntime {
|
|
|
109
90
|
* Check if the agent is currently processing a request.
|
|
110
91
|
*/
|
|
111
92
|
isRunning(): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Check if auto-continuation is enabled.
|
|
95
|
+
*/
|
|
96
|
+
isAutoContinueEnabled(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Enable or disable auto-continuation.
|
|
99
|
+
*/
|
|
100
|
+
setAutoContinue(enabled: boolean): void;
|
|
112
101
|
send(text: string, useStreaming?: boolean): Promise<string>;
|
|
113
102
|
private processConversation;
|
|
114
103
|
private processConversationStreaming;
|
|
@@ -123,8 +112,8 @@ export declare class AgentRuntime {
|
|
|
123
112
|
private resolveToolCalls;
|
|
124
113
|
private get providerTools();
|
|
125
114
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
115
|
+
* OpenAI models frequently add speculative tool narration in the content field.
|
|
116
|
+
* Suppress that text to avoid surfacing hallucinated tool usage in the UI.
|
|
128
117
|
*/
|
|
129
118
|
private shouldSuppressToolNarration;
|
|
130
119
|
private emitAssistantMessage;
|
|
@@ -133,54 +122,6 @@ export declare class AgentRuntime {
|
|
|
133
122
|
* and response contains verifiable claims (implementation, build success, etc.)
|
|
134
123
|
*/
|
|
135
124
|
private triggerVerificationIfNeeded;
|
|
136
|
-
/**
|
|
137
|
-
* Extract a "command hash" from tool arguments for behavioral loop detection.
|
|
138
|
-
* For execute_bash, this is the actual command. For other tools, key identifying args.
|
|
139
|
-
*/
|
|
140
|
-
private extractCmdHash;
|
|
141
|
-
/**
|
|
142
|
-
* Check for behavioral loops - model calling the same tool with similar args repeatedly.
|
|
143
|
-
* Returns an error message if a loop is detected, null otherwise.
|
|
144
|
-
*
|
|
145
|
-
* FUNDAMENTAL PREVENTION: Cached calls are excluded from loop detection since they
|
|
146
|
-
* don't actually execute (the cache provides the result). This means:
|
|
147
|
-
* - First call: executes and caches result
|
|
148
|
-
* - Second identical call: returns cached result, NOT counted toward loop
|
|
149
|
-
* - Only genuinely NEW (non-cached) repetitive calls trigger loop detection
|
|
150
|
-
*
|
|
151
|
-
* Direct execution tools (bash/edit) are also exempt to avoid short-circuiting
|
|
152
|
-
* legitimate repeated user commands.
|
|
153
|
-
*
|
|
154
|
-
* This catches patterns like:
|
|
155
|
-
* - "git status -sb" called 3 times with DIFFERENT outputs (cache miss each time)
|
|
156
|
-
* - Repeated file reads where file content changed
|
|
157
|
-
* - Repeated searches with same pattern but new results
|
|
158
|
-
*/
|
|
159
|
-
private checkBehavioralLoop;
|
|
160
|
-
/**
|
|
161
|
-
* Reset behavioral loop tracking (called when user provides new input or task completes)
|
|
162
|
-
*/
|
|
163
|
-
private resetBehavioralLoopTracking;
|
|
164
|
-
/**
|
|
165
|
-
* Create a stable cache key for a tool call based on name and arguments
|
|
166
|
-
*/
|
|
167
|
-
private getToolCacheKey;
|
|
168
|
-
/**
|
|
169
|
-
* Only cache tools that are safe to reuse; stateful commands must always execute.
|
|
170
|
-
*/
|
|
171
|
-
private isCacheableTool;
|
|
172
|
-
/**
|
|
173
|
-
* Direct execution tools should not trigger behavioral loop short-circuiting.
|
|
174
|
-
*/
|
|
175
|
-
private shouldSkipLoopDetection;
|
|
176
|
-
/**
|
|
177
|
-
* Get cached result for a tool call, or null if not cached
|
|
178
|
-
*/
|
|
179
|
-
private getCachedToolResult;
|
|
180
|
-
/**
|
|
181
|
-
* Cache a tool result for future identical calls
|
|
182
|
-
*/
|
|
183
|
-
private cacheToolResult;
|
|
184
125
|
getHistory(): ConversationMessage[];
|
|
185
126
|
loadHistory(history: ConversationMessage[]): void;
|
|
186
127
|
clearHistory(): void;
|
package/dist/core/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AA2F/F,MAAM,WAAW,cAAc;IAC7B,kBAAkB,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC/E,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC;IACpE,eAAe,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7E,8DAA8D;IAC9D,kBAAkB,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,8DAA8D;IAC9D,iBAAiB,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChF,kFAAkF;IAClF,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