open-agents-ai 0.187.35 → 0.187.37
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 +118 -15
- package/dist/index.js +59 -100
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,8 +38,9 @@ An autonomous multi-turn tool-calling agent that reads your code, makes changes,
|
|
|
38
38
|
- [Architecture](#architecture)
|
|
39
39
|
- [Context Engineering](#context-engineering)
|
|
40
40
|
- [Model-Tier Awareness](#model-tier-awareness)
|
|
41
|
+
- [Live Code Knowledge Graph](#live-code-knowledge-graph)
|
|
41
42
|
- [Auto-Expanding Context Window](#auto-expanding-context-window)
|
|
42
|
-
- [Tools (
|
|
43
|
+
- [Tools (67+)](#tools-67)
|
|
43
44
|
- [Ralph Loop — Iteration-First Design](#ralph-loop--iteration-first-design)
|
|
44
45
|
- [Task Control](#task-control)
|
|
45
46
|
- [COHERE Cognitive Framework](#cohere-cognitive-framework)
|
|
@@ -54,6 +55,7 @@ An autonomous multi-turn tool-calling agent that reads your code, makes changes,
|
|
|
54
55
|
- [x402 Payment Rails & Nexus P2P](#x402-payment-rails--nexus-p2p)
|
|
55
56
|
- [Sponsored Inference — Share Your GPU With the World](#sponsored-inference--share-your-gpu-with-the-world)
|
|
56
57
|
- [COHERE Distributed Mind](#cohere-distributed-mind)
|
|
58
|
+
- [Self-Improvement & Learning](#self-improvement--learning)
|
|
57
59
|
- [Dream Mode — Creative Idle Exploration](#dream-mode--creative-idle-exploration)
|
|
58
60
|
- [Blessed Mode — Infinite Warm Loop](#blessed-mode--infinite-warm-loop)
|
|
59
61
|
- [Docker Sandbox & Collective Intelligence](#docker-sandbox--collective-intelligence)
|
|
@@ -778,16 +780,22 @@ C = A(c_instr, c_know, c_tools, c_mem, c_state, c_query)
|
|
|
778
780
|
| `c_instr` | P0 (highest) | Core system instructions — immutable, cannot be overridden |
|
|
779
781
|
| `c_state` | P10 | Personality profile, session state |
|
|
780
782
|
| `c_know` | P20 | Dynamic project context, retrieved knowledge |
|
|
783
|
+
| `c_retrieval` | P20 | Task-specific retrieval (RRF-fused lexical + semantic + graph expansion) |
|
|
784
|
+
| `c_graph` | P20 | Live code knowledge graph (PageRank-ranked symbols, community summaries) |
|
|
785
|
+
| `c_plan` | P20 | Plan skeleton (completed/current/pending steps, re-injected every turn) |
|
|
781
786
|
| `c_tools` | P30 (lowest) | Tool outputs — may contain untrusted content |
|
|
782
787
|
|
|
783
788
|
Key design decisions grounded in research:
|
|
784
789
|
|
|
785
790
|
- **Instruction hierarchy** — 4-tier priority system (P0/P10/P20/P30) prevents prompt injection from tool outputs overriding system rules. Implemented across all 3 prompt tiers (large/medium/small) with model-appropriate verbosity
|
|
791
|
+
- **Live code knowledge graph** — SQLite-backed graph (files/symbols/edges) auto-updates via filesystem watcher and post-edit hooks. PageRank-ranked symbols injected into every prompt. Louvain community detection compresses 1M+ LOC repos into ~200 navigable clusters. Research: [Codebase-Memory](https://arxiv.org/abs/2603.27277), [FastCode](https://arxiv.org/abs/2603.01012), [Stack Graphs](https://arxiv.org/abs/2211.01224)
|
|
792
|
+
- **Plan-skeleton re-injection** — every turn includes a compact `[done/current/pending]` plan derived from task state, preventing goal drift in multi-step tasks. Research: [ReCAP](https://arxiv.org/abs/2510.23822) (+32% on multi-step tasks)
|
|
793
|
+
- **Retrieval-augmented context** — Reciprocal Rank Fusion merges lexical search, semantic search, and graph expansion into a single ranked result set. Token-budgeted snippet packing ensures relevant code reaches the model without overflow
|
|
786
794
|
- **Proactive quality guidance** — instead of banning tools after repeated use, the agent receives contextual next-step suggestions appended to tool output, preserving tool availability while steering toward productive actions
|
|
787
|
-
- **Tiered system prompts** — large (
|
|
795
|
+
- **Tiered system prompts** — large (>=30B), medium (8-29B), and small (<=7B) models get appropriately sized instruction sets, balancing capability with context budget
|
|
788
796
|
- **Context composition tracing** — every context assembly emits a structured event showing section labels and token estimates for eval observability
|
|
789
797
|
|
|
790
|
-
Research provenance: grounded in "A Survey of Context Engineering for LLMs" (context assembly equation), "Modular Prompt Optimization" (section-local textual gradients), "Reasoning Up the Instruction Ladder" (priority hierarchy), "GEPA" (reflective prompt evolution),
|
|
798
|
+
Research provenance: grounded in "A Survey of Context Engineering for LLMs" (context assembly equation), "Modular Prompt Optimization" (section-local textual gradients), "Reasoning Up the Instruction Ladder" (priority hierarchy), "GEPA" (reflective prompt evolution), "Prompt Flow Integrity" (least-privilege context passing), [RepoMaster](https://arxiv.org/abs/2505.21577) (8K token budget validation), and [RIG](https://arxiv.org/abs/2601.10112) (flat graph format).
|
|
791
799
|
|
|
792
800
|
|
|
793
801
|
|
|
@@ -800,22 +808,32 @@ Open Agents classifies models into three tiers and adapts its behavior according
|
|
|
800
808
|
|
|
801
809
|
| Tier | Parameters | Base Tools | System Prompt | Compaction |
|
|
802
810
|
|------|-----------|------------|---------------|------------|
|
|
803
|
-
| **Large** (
|
|
804
|
-
| **Medium** (8-29B) | 9B, 27B | 15 core
|
|
805
|
-
| **Small** (
|
|
811
|
+
| **Large** (>=30B) | 70B, 122B | All 67 tools | Full | 75% of context window |
|
|
812
|
+
| **Medium** (8-29B) | 9B, 27B | 15 core + task-relevant | Condensed | 70% of context window |
|
|
813
|
+
| **Small** (<=7B) | 4B, 1.5B | 6 base + explore_tools | Minimal + scaffolding | 65% of context window |
|
|
806
814
|
|
|
807
|
-
###
|
|
815
|
+
### Small Model Optimization (Research-Backed)
|
|
816
|
+
|
|
817
|
+
Small models (4B-7B) receive 10+ optimizations that larger models don't need, each backed by published research:
|
|
808
818
|
|
|
809
|
-
|
|
819
|
+
| Optimization | Research Basis | Impact |
|
|
820
|
+
|-------------|---------------|--------|
|
|
821
|
+
| **Plan-skeleton re-injection** | [ReCAP](https://arxiv.org/abs/2510.23822) (NeurIPS 2025) | +32% multi-step task completion |
|
|
822
|
+
| **Goal re-injection after compaction** | [Lost in the Middle](https://arxiv.org/abs/2307.03172) | Prevents #1 cause of drift |
|
|
823
|
+
| **Decomposition guidance** | [ReCode](https://arxiv.org/abs/2510.23564) | +20.9% for 7B, zero training cost |
|
|
824
|
+
| **Structured error recovery** | [Polaris](https://arxiv.org/abs/2603.23129) | Actionable [RECOVERY] guidance per error type |
|
|
825
|
+
| **LATS pivot directive** | [LATS](https://arxiv.org/abs/2310.04406) (ICML 2024) | Forces approach change after consecutive failures |
|
|
826
|
+
| **Self-consistency voting** | [SRLM](https://arxiv.org/abs/2603.15653) | +22% via K-alternative majority voting (opt-in) |
|
|
827
|
+
| **Tier-adaptive compaction** | [Codebase-Memory](https://arxiv.org/abs/2603.27277) | Context budget scales per tier, not hardcoded |
|
|
828
|
+
| **Tool deferral** | [EASYTOOL](https://arxiv.org/abs/2401.06201), [Gorilla](https://arxiv.org/abs/2305.15334) | 60-80% tool token reduction via search |
|
|
829
|
+
| **Best-of-N execution** | [SWE-RM](https://arxiv.org/abs/2512.21919) | +7-10 pts via N independent attempts (opt-in) |
|
|
830
|
+
| **Recursive sub-agents** | [RLM](https://arxiv.org/abs/2512.24601), [Yang/Srebro](https://arxiv.org/abs/2603.02112) | Depth-tracked delegation (max 3), 100x effective context |
|
|
810
831
|
|
|
811
|
-
-
|
|
832
|
+
**Eval-verified result:** A 4B model completes a hard multi-file refactoring task in 20 turns (down from 25 before these optimizations) and passes 92% of core eval tasks.
|
|
812
833
|
|
|
813
|
-
|
|
834
|
+
### Tool Nesting for Small Models
|
|
814
835
|
|
|
815
|
-
This
|
|
816
|
-
- **Gorilla** ([arXiv:2305.15334](https://arxiv.org/abs/2305.15334)) — 7B model with retrieval outperforms GPT-4 on tool-calling hallucination rate
|
|
817
|
-
- **DFSDT** ([arXiv:2307.16789](https://arxiv.org/abs/2307.16789)) — ToolLLaMA-7B with depth-first search scored 66.7%, approaching GPT-4's 70.4%
|
|
818
|
-
- **Octopus v2** ([arXiv:2404.01744](https://arxiv.org/abs/2404.01744)) — 2B model achieved 99.5% function-calling accuracy with context-efficient tool encoding
|
|
836
|
+
Small models use an **explore_tools** meta-tool pattern inspired by hierarchical API retrieval research ([ToolLLM](https://arxiv.org/abs/2307.16789)). Instead of presenting all 67 tools (which overwhelms small context windows), only core tools are loaded initially. The agent calls `explore_tools()` to discover additional capabilities, then activates specific tools as needed. This reduces tool schema tokens by ~80% while preserving access to the full toolset.
|
|
819
837
|
|
|
820
838
|
### Dynamic Context Limits
|
|
821
839
|
|
|
@@ -832,6 +850,61 @@ All context-dependent values scale automatically with the actual context window
|
|
|
832
850
|
|
|
833
851
|
|
|
834
852
|
|
|
853
|
+
## Live Code Knowledge Graph
|
|
854
|
+
|
|
855
|
+
<div align="right"><a href="#top">back to top</a></div>
|
|
856
|
+
|
|
857
|
+
Open Agents builds and maintains a **persistent, auto-updating knowledge graph** of the codebase that scales from small projects to repositories with 1M+ lines of code.
|
|
858
|
+
|
|
859
|
+
### How It Works
|
|
860
|
+
|
|
861
|
+
```
|
|
862
|
+
Source files ──> Regex symbol extraction ──> SQLite graph DB (.oa/index/code-graph.db)
|
|
863
|
+
| |
|
|
864
|
+
| fs.watch() + debounce ──> File hash check ──> Incremental re-index (per file)
|
|
865
|
+
| |
|
|
866
|
+
└── post-edit hook (file_write/edit) ─────────────> Instant re-index of modified files
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
1. **Symbol extraction** parses every source file for functions, classes, types, interfaces, exports, and constants
|
|
870
|
+
2. **Import graph** traces dependency relationships (which file imports which)
|
|
871
|
+
3. **PageRank scoring** ranks files by how many other files depend on them
|
|
872
|
+
4. **Community detection** (Louvain-inspired) groups related files into logical modules with summaries
|
|
873
|
+
5. **Auto-update** via filesystem watcher and post-tool-edit hooks keeps the graph fresh as code changes
|
|
874
|
+
|
|
875
|
+
### What the Agent Sees
|
|
876
|
+
|
|
877
|
+
Each turn, the agent receives a compact graph summary (500-1500 tokens depending on model tier) showing:
|
|
878
|
+
- The most important files ranked by cross-reference count
|
|
879
|
+
- Their exported symbols (functions, classes, types)
|
|
880
|
+
- Import relationships (what depends on what)
|
|
881
|
+
|
|
882
|
+
For 1M+ LOC codebases, the Louvain community compression reduces 50K+ symbols into ~200 navigable module summaries, each with a name and key exports.
|
|
883
|
+
|
|
884
|
+
### Graph Tools
|
|
885
|
+
|
|
886
|
+
| Tool | What It Does |
|
|
887
|
+
|------|-------------|
|
|
888
|
+
| `repo_map` | PageRank-sorted codebase skeleton with token budget control |
|
|
889
|
+
| `import_graph` | Show dependencies, dependents, and 1-hop transitive connections for any file |
|
|
890
|
+
| `semantic_map` | Agent-curated notes, hotspot tracking, and file relationships across sessions |
|
|
891
|
+
| `codebase_map` | High-level structural overview (directories, language breakdown) |
|
|
892
|
+
| `file_explore` | Chunked exploration with overview/outline/search/chunk strategies |
|
|
893
|
+
|
|
894
|
+
### Storage
|
|
895
|
+
|
|
896
|
+
The graph persists in `.oa/index/code-graph.db` (SQLite with WAL mode) across sessions. Incremental updates mean editing a single file costs <50ms regardless of codebase size.
|
|
897
|
+
|
|
898
|
+
### Research Basis
|
|
899
|
+
|
|
900
|
+
- [Codebase-Memory](https://arxiv.org/abs/2603.27277) (2026) — Tree-Sitter + Louvain communities, Linux kernel 2.1M nodes in 3 minutes, incremental via XXH3 hashing
|
|
901
|
+
- [FastCode](https://arxiv.org/abs/2603.01012) (2026) — 3-layer graph schema (dependency/inheritance/call), cleanest decomposition
|
|
902
|
+
- [Stack Graphs](https://arxiv.org/abs/2211.01224) (GitHub production) — File-level isolation for incremental updates at millions-of-repos scale
|
|
903
|
+
- [RepoMaster](https://arxiv.org/abs/2505.21577) (2025) — 8K token budget validated, +62.96% task-pass rate
|
|
904
|
+
- [Code-Craft/HCGS](https://arxiv.org/abs/2504.08975) (2025) — Hierarchical code graph summaries, 82% retrieval precision improvement
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
835
908
|
## Auto-Expanding Context Window
|
|
836
909
|
|
|
837
910
|
<div align="right"><a href="#top">back to top</a></div>
|
|
@@ -2334,6 +2407,36 @@ Inbound queries are scanned for prompt injection attempts before processing:
|
|
|
2334
2407
|
|
|
2335
2408
|
|
|
2336
2409
|
|
|
2410
|
+
## Self-Improvement & Learning
|
|
2411
|
+
|
|
2412
|
+
<div align="right"><a href="#top">back to top</a></div>
|
|
2413
|
+
|
|
2414
|
+
Open Agents includes infrastructure for the agent to learn from its own execution, improving over time without manual intervention.
|
|
2415
|
+
|
|
2416
|
+
### Trajectory Logging
|
|
2417
|
+
|
|
2418
|
+
Every completed task is logged to `.oa/trajectories/trajectories.jsonl` with full metadata: task description, outcome (pass/fail), tool calls made, files modified, failed approaches, and timing. This data feeds the rejection fine-tuning pipeline. Research: [Golubev et al.](https://arxiv.org/abs/2508.03501) showed RFT on passing trajectories alone improved Qwen-72B from 11% to 25% on SWE-bench.
|
|
2419
|
+
|
|
2420
|
+
### Rejection Fine-Tuning Pipeline
|
|
2421
|
+
|
|
2422
|
+
`scripts/rejection-ft.mjs` processes trajectory logs into training data:
|
|
2423
|
+
1. Filters to passing trajectories
|
|
2424
|
+
2. Grades on 5-level staged criteria (from [RL Recipe](https://arxiv.org/abs/2603.21972)): syntactically valid tool calls, productive exploration, task completion, files modified, efficiency
|
|
2425
|
+
3. Exports Ollama-compatible JSONL for fine-tuning
|
|
2426
|
+
|
|
2427
|
+
### Inference-Time Self-Improvement
|
|
2428
|
+
|
|
2429
|
+
| Technique | When | Research |
|
|
2430
|
+
|-----------|------|----------|
|
|
2431
|
+
| **Self-consistency voting** | High-stakes tool calls (opt-in K=3) | [SRLM](https://arxiv.org/abs/2603.15653) +22% |
|
|
2432
|
+
| **Best-of-N execution** | Eval/high-stakes tasks (opt-in N=3-5) | [SWE-RM](https://arxiv.org/abs/2512.21919) +7-10 pts |
|
|
2433
|
+
| **LATS pivot** | After 2+ consecutive failures | [LATS](https://arxiv.org/abs/2310.04406) +10-20% |
|
|
2434
|
+
| **Structured error recovery** | On tool failure (small/medium only) | [Polaris](https://arxiv.org/abs/2603.23129) +9% |
|
|
2435
|
+
| **Failed approach tracking** | Every task | Prevents repeating mistakes after compaction |
|
|
2436
|
+
| **Skill extraction** | Post-task via `/skillify` | Converts corrections into reusable SKILL.md |
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
|
|
2337
2440
|
## Dream Mode — Creative Idle Exploration
|
|
2338
2441
|
|
|
2339
2442
|
<div align="right"><a href="#top">back to top</a></div>
|
|
@@ -3100,7 +3203,7 @@ Research papers applied: [AgentOccam](https://arxiv.org/abs/2410.13825) (ICLR 20
|
|
|
3100
3203
|
|
|
3101
3204
|
### Multi-Agent Architecture Evaluation (v0.187.4)
|
|
3102
3205
|
|
|
3103
|
-
43 tasks across 8 categories testing the
|
|
3206
|
+
43 tasks across 8 categories testing the multi-agent spawning system: typed agents (general/explore/plan/coordinator), parallel delegation, inter-agent messaging, worktree isolation, and multi-step orchestration pipelines.
|
|
3104
3207
|
|
|
3105
3208
|
```bash
|
|
3106
3209
|
node eval/run-agentic.mjs ma-explore-01 # Single agent task
|
package/dist/index.js
CHANGED
|
@@ -292356,101 +292356,47 @@ function createDefaultBanner(version4 = "0.120.0") {
|
|
|
292356
292356
|
const width = process.stdout.columns ?? 80;
|
|
292357
292357
|
const rows = 3;
|
|
292358
292358
|
const yellow = 178;
|
|
292359
|
-
const
|
|
292360
|
-
const
|
|
292361
|
-
|
|
292362
|
-
|
|
292363
|
-
|
|
292364
|
-
|
|
292365
|
-
|
|
292366
|
-
|
|
292367
|
-
|
|
292368
|
-
|
|
292369
|
-
|
|
292370
|
-
|
|
292371
|
-
|
|
292372
|
-
|
|
292373
|
-
|
|
292374
|
-
|
|
292375
|
-
|
|
292376
|
-
|
|
292377
|
-
|
|
292378
|
-
|
|
292379
|
-
"
|
|
292380
|
-
|
|
292381
|
-
|
|
292382
|
-
|
|
292383
|
-
|
|
292384
|
-
"
|
|
292385
|
-
|
|
292386
|
-
|
|
292387
|
-
|
|
292388
|
-
|
|
292389
|
-
|
|
292390
|
-
|
|
292391
|
-
|
|
292392
|
-
|
|
292393
|
-
|
|
292394
|
-
};
|
|
292395
|
-
const frameCount = 8;
|
|
292396
|
-
const frames = [];
|
|
292397
|
-
for (let f2 = 0; f2 < frameCount; f2++) {
|
|
292398
|
-
const grid = [];
|
|
292399
|
-
for (let r2 = 0; r2 < rows; r2++) {
|
|
292400
|
-
const row = [];
|
|
292401
|
-
for (let c4 = 0; c4 < width; c4++) {
|
|
292402
|
-
const fadeStart = Math.floor(width * 0.45);
|
|
292403
|
-
const solidStart = Math.floor(width * 0.85);
|
|
292404
|
-
if (c4 >= fadeStart) {
|
|
292405
|
-
const progress = Math.min(1, (c4 - fadeStart) / Math.max(1, solidStart - fadeStart));
|
|
292406
|
-
const wave = Math.sin(c4 * 0.15 + f2 * 0.5 + r2 * 1.2) * 0.15;
|
|
292407
|
-
const density = progress * progress + wave;
|
|
292408
|
-
const noise2 = hash(r2, c4, f2);
|
|
292409
|
-
if (noise2 < density) {
|
|
292410
|
-
const charIdx = Math.min(particles.length - 1, Math.floor(Math.max(0, density) * particles.length));
|
|
292411
|
-
row.push({ char: particles[charIdx], fg: yellow, bg: bgDark, bold: false });
|
|
292412
|
-
} else {
|
|
292413
|
-
row.push({ char: " ", fg: 0, bg: bgDark, bold: false });
|
|
292414
|
-
}
|
|
292415
|
-
} else {
|
|
292416
|
-
row.push({ char: " ", fg: 0, bg: bgDark, bold: false });
|
|
292417
|
-
}
|
|
292418
|
-
}
|
|
292419
|
-
grid.push(row);
|
|
292420
|
-
}
|
|
292421
|
-
const mnemonic = getNodeMnemonic();
|
|
292422
|
-
const versionText = ` OA v${version4}`;
|
|
292423
|
-
const mnemonicSuffix = ` \xB7 ${mnemonic}`;
|
|
292424
|
-
for (let i2 = 0; i2 < versionText.length && i2 < width; i2++) {
|
|
292425
|
-
grid[0][i2] = { char: versionText[i2], fg: yellow, bg: bgDark, bold: true };
|
|
292426
|
-
}
|
|
292427
|
-
const mnemonicStart = versionText.length;
|
|
292428
|
-
for (let i2 = 0; i2 < mnemonicSuffix.length && mnemonicStart + i2 < Math.floor(width * 0.44); i2++) {
|
|
292429
|
-
grid[0][mnemonicStart + i2] = { char: mnemonicSuffix[i2], fg: 240, bg: bgDark, bold: false };
|
|
292430
|
-
}
|
|
292431
|
-
const cwd4 = process.cwd();
|
|
292432
|
-
const shortCwd = cwd4.length > 40 ? "..." + cwd4.slice(-37) : cwd4;
|
|
292433
|
-
const infoText = ` ${shortCwd}`;
|
|
292434
|
-
for (let i2 = 0; i2 < infoText.length && i2 < Math.floor(width * 0.44); i2++) {
|
|
292435
|
-
grid[1][i2] = { char: infoText[i2], fg: 245, bg: bgDark, bold: false };
|
|
292436
|
-
}
|
|
292437
|
-
const btnLabels = ["help", "voice", "cohere", "model"];
|
|
292438
|
-
const btnBg = 236;
|
|
292439
|
-
let bCol = 2;
|
|
292440
|
-
for (const lbl of btnLabels) {
|
|
292441
|
-
const padded = ` ${lbl} `;
|
|
292442
|
-
for (let ci = 0; ci < padded.length && bCol + ci < Math.floor(width * 0.44); ci++) {
|
|
292443
|
-
grid[2][bCol + ci] = { char: padded[ci], fg: 245, bg: btnBg, bold: false };
|
|
292444
|
-
}
|
|
292445
|
-
bCol += padded.length + 1;
|
|
292446
|
-
}
|
|
292447
|
-
frames.push({ grid, durationMs: 200 });
|
|
292448
|
-
}
|
|
292359
|
+
const bgBlack = 0;
|
|
292360
|
+
const grid = [];
|
|
292361
|
+
const innerW = width - 2;
|
|
292362
|
+
const topRow = [];
|
|
292363
|
+
topRow.push({ char: "\u256D", fg: yellow, bg: bgBlack, bold: false });
|
|
292364
|
+
for (let c4 = 0; c4 < innerW; c4++) {
|
|
292365
|
+
topRow.push({ char: "\u2500", fg: yellow, bg: bgBlack, bold: false });
|
|
292366
|
+
}
|
|
292367
|
+
topRow.push({ char: "\u256E", fg: yellow, bg: bgBlack, bold: false });
|
|
292368
|
+
grid.push(topRow);
|
|
292369
|
+
const mnemonic = getNodeMnemonic();
|
|
292370
|
+
const cwd4 = process.cwd();
|
|
292371
|
+
const shortCwd = cwd4.length > 30 ? "..." + cwd4.slice(-27) : cwd4;
|
|
292372
|
+
const centerText = `Open Agents v${version4} \xB7 ${mnemonic} \xB7 ${shortCwd}`;
|
|
292373
|
+
const textLen = centerText.length;
|
|
292374
|
+
const leftPad = Math.max(0, Math.floor((innerW - textLen) / 2));
|
|
292375
|
+
const rightPad = Math.max(0, innerW - textLen - leftPad);
|
|
292376
|
+
const midRow = [];
|
|
292377
|
+
midRow.push({ char: "\u2502", fg: yellow, bg: bgBlack, bold: false });
|
|
292378
|
+
for (let i2 = 0; i2 < leftPad; i2++)
|
|
292379
|
+
midRow.push({ char: " ", fg: 0, bg: bgBlack, bold: false });
|
|
292380
|
+
for (let i2 = 0; i2 < centerText.length && i2 < innerW; i2++) {
|
|
292381
|
+
midRow.push({ char: centerText[i2], fg: yellow, bg: bgBlack, bold: true });
|
|
292382
|
+
}
|
|
292383
|
+
for (let i2 = 0; i2 < rightPad; i2++)
|
|
292384
|
+
midRow.push({ char: " ", fg: 0, bg: bgBlack, bold: false });
|
|
292385
|
+
midRow.push({ char: "\u2502", fg: yellow, bg: bgBlack, bold: false });
|
|
292386
|
+
grid.push(midRow);
|
|
292387
|
+
const botRow = [];
|
|
292388
|
+
botRow.push({ char: "\u2570", fg: yellow, bg: bgBlack, bold: false });
|
|
292389
|
+
for (let c4 = 0; c4 < innerW; c4++) {
|
|
292390
|
+
botRow.push({ char: "\u2500", fg: yellow, bg: bgBlack, bold: false });
|
|
292391
|
+
}
|
|
292392
|
+
botRow.push({ char: "\u256F", fg: yellow, bg: bgBlack, bold: false });
|
|
292393
|
+
grid.push(botRow);
|
|
292449
292394
|
return {
|
|
292450
292395
|
id: "default-header",
|
|
292451
292396
|
name: "OA Default Header",
|
|
292452
292397
|
type: "default",
|
|
292453
|
-
frames,
|
|
292398
|
+
frames: [{ grid, durationMs: 0 }],
|
|
292399
|
+
// Single static frame, no animation
|
|
292454
292400
|
alignment: ["left", "center", "left"],
|
|
292455
292401
|
flowSpeed: [0, 0, 0],
|
|
292456
292402
|
author: "system",
|
|
@@ -299401,7 +299347,7 @@ function setTerminalTitle(task, version4) {
|
|
|
299401
299347
|
const title = task ? `${task.slice(0, 60)} \xB7 ${ver}` : ver;
|
|
299402
299348
|
process.stdout.write(`\x1B]2;${title}\x07`);
|
|
299403
299349
|
}
|
|
299404
|
-
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, _isWindows, StatusBar;
|
|
299350
|
+
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, BOX_COLOR, PANEL_BG_SEQ, CONTENT_BG_SEQ, BOX_TL, BOX_TR, BOX_BL, BOX_BR, BOX_H, BOX_V, BOX_FG, RESET, _isWindows, StatusBar;
|
|
299405
299351
|
var init_status_bar = __esm({
|
|
299406
299352
|
"packages/cli/dist/tui/status-bar.js"() {
|
|
299407
299353
|
"use strict";
|
|
@@ -299567,12 +299513,20 @@ var init_status_bar = __esm({
|
|
|
299567
299513
|
return this.toolCalls > 0;
|
|
299568
299514
|
}
|
|
299569
299515
|
};
|
|
299570
|
-
PANEL_BG =
|
|
299571
|
-
CONTENT_BG =
|
|
299516
|
+
PANEL_BG = 0;
|
|
299517
|
+
CONTENT_BG = 0;
|
|
299572
299518
|
TEXT_PRIMARY = 178;
|
|
299573
299519
|
TEXT_DIM = 240;
|
|
299520
|
+
BOX_COLOR = 178;
|
|
299574
299521
|
PANEL_BG_SEQ = `\x1B[48;5;${PANEL_BG}m`;
|
|
299575
299522
|
CONTENT_BG_SEQ = `\x1B[48;5;${CONTENT_BG}m`;
|
|
299523
|
+
BOX_TL = "\u256D";
|
|
299524
|
+
BOX_TR = "\u256E";
|
|
299525
|
+
BOX_BL = "\u2570";
|
|
299526
|
+
BOX_BR = "\u256F";
|
|
299527
|
+
BOX_H = "\u2500";
|
|
299528
|
+
BOX_V = "\u2502";
|
|
299529
|
+
BOX_FG = `\x1B[38;5;${BOX_COLOR}m`;
|
|
299576
299530
|
RESET = "\x1B[0m";
|
|
299577
299531
|
_isWindows = process.platform === "win32";
|
|
299578
299532
|
StatusBar = class _StatusBar {
|
|
@@ -301378,7 +301332,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301378
301332
|
this._updateSuggestions();
|
|
301379
301333
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
301380
301334
|
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
301381
|
-
const newHeight = 1 + inputLines + suggestionRows;
|
|
301335
|
+
const newHeight = 1 + 1 + inputLines + suggestionRows;
|
|
301382
301336
|
if (newHeight !== this._currentFooterHeight) {
|
|
301383
301337
|
this._currentFooterHeight = newHeight;
|
|
301384
301338
|
return true;
|
|
@@ -301390,7 +301344,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301390
301344
|
this._updateSuggestions();
|
|
301391
301345
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
301392
301346
|
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
301393
|
-
return 1 + inputLines + suggestionRows !== this._currentFooterHeight;
|
|
301347
|
+
return 1 + 1 + inputLines + suggestionRows !== this._currentFooterHeight;
|
|
301394
301348
|
}
|
|
301395
301349
|
/** Compute absolute row positions for all footer elements.
|
|
301396
301350
|
* Layout (top to bottom): input → suggestions/braille → metrics.
|
|
@@ -301516,12 +301470,17 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301516
301470
|
}
|
|
301517
301471
|
const inputWrap = this.wrapInput(w);
|
|
301518
301472
|
let buf = "\x1B[?7l";
|
|
301473
|
+
const boxInner = w - 2;
|
|
301474
|
+
buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_TR}${RESET}`;
|
|
301519
301475
|
for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
|
|
301520
|
-
const row = pos.inputStartRow + i2;
|
|
301476
|
+
const row = pos.inputStartRow + 1 + i2;
|
|
301521
301477
|
const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
|
|
301522
|
-
|
|
301478
|
+
const lineContent = `${prefix}${inputWrap.lines[i2]}`;
|
|
301479
|
+
const visLen = this.promptWidth + (inputWrap.lines[i2]?.length ?? 0);
|
|
301480
|
+
const pad = Math.max(0, boxInner - visLen);
|
|
301481
|
+
buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V}${RESET}${PANEL_BG_SEQ}${lineContent}${" ".repeat(pad)}${BOX_FG}${BOX_V}${RESET}`;
|
|
301523
301482
|
}
|
|
301524
|
-
const cursorTermRow = pos.inputStartRow + inputWrap.cursorRow;
|
|
301483
|
+
const cursorTermRow = pos.inputStartRow + 1 + inputWrap.cursorRow;
|
|
301525
301484
|
if (pos.tabBarRow > 0) {
|
|
301526
301485
|
buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET}`;
|
|
301527
301486
|
}
|
|
@@ -301539,7 +301498,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301539
301498
|
buf += `${RESET}`;
|
|
301540
301499
|
}
|
|
301541
301500
|
} else {
|
|
301542
|
-
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${
|
|
301501
|
+
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_BR}${RESET}`;
|
|
301543
301502
|
}
|
|
301544
301503
|
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}`;
|
|
301545
301504
|
const focusChar = this._getFocusQuadrant();
|
package/package.json
CHANGED