Levi Neely
67edfdf58b
Code quality fixes from review
...
toolsrv:
- Remove dead 'var _ = os.Args' in sandbox/native_linux.go
- Fix stale comment in server.go (said 'spec.go')
- Fix misleading test comment in proc_test.go
- Add outputLimit constant in exec.go (was magic number)
- Handle error from registry.New() in main.go
- Change startup log from Warn to Info
olliesrv:
- Remove duplicate normalizeWorkflow() call in tool_match.go
- Consolidate duplicate nil checks in runtime.go
- Remove reimplemented stdlib functions in toolclient/toolsrv.go
- Simplify cacheSummary() - remove unused variable capture
-27 lines
2026-08-21 19:16:44 +02:00
Ollie Agent
7ec8583e06
Honor cancellation during compaction streams
2026-08-18 06:59:35 +02:00
Ollie Agent
e01d578303
Bound agent chat and summary caches
2026-08-18 06:57:15 +02:00
Levi Neely
8a1efe0907
session: require cwd, make agent cwd read-only, sanitize message history
...
Session creation now requires cwd= parameter (no fallback to daemon cwd).
Agent cwd is read-only — agents inherit from session, cannot override.
Frontends updated:
- NewSessionDialog: added Directory field with Browse button
- NewAgentDialog: removed Directory field
- createAgent(): removed cwd parameter
- Kate plugin: passes cwd when creating kate session
- Dolphin: removed cwd from agent/new call
Message history sanitization (backend.SanitizeMessages):
- Removes dangling tool calls (assistant with ToolCalls but missing results)
- Removes orphan tool results (tool message without preceding call)
- Applied before sub-agent context inheritance
- Applied before session persistence save
- Applied after compaction (defensive)
Includes unit tests for all sanitization cases.
2026-08-17 14:15:55 +02:00
Ollie Agent
45ff8a2864
Remove legacy backend environment configuration
2026-08-16 19:48:52 +02:00
Ollie Agent
59c4ed23ac
merge paths utilities into util
2026-08-16 18:37:03 +02:00
Ollie Agent
8553bc7283
measure provider prompt cache hits
2026-08-15 14:09:00 +02:00
Ollie Agent
64b76d9bf0
stabilize provider prompt prefix
2026-08-15 13:57:31 +02:00
Ollie Agent
5dbfa3060f
include tool semantics in summary cache
2026-08-15 13:46:29 +02:00
Ollie Agent
82ab9dd2e3
version summary cache keys
2026-08-15 13:43:04 +02:00
Ollie Agent
60c4541fa4
normalize summary cache keys
2026-08-15 13:42:11 +02:00
Ollie Agent
adf7242774
reduce cold results locally
2026-08-15 13:33:26 +02:00
Ollie Agent
32180bee4d
defer cold summaries until needed
2026-08-15 13:27:16 +02:00
Ollie Agent
f167168df3
incrementalize cold summaries
2026-08-15 13:13:22 +02:00
Ollie Agent
25d502cfc2
cache cold result summaries
2026-08-15 13:10:15 +02:00
Ollie Agent
f38b130111
explicit summary state on stripCold
2026-08-15 12:55:04 +02:00
Ollie Agent
f4cb1ea290
validate cold history summaries
2026-08-15 12:42:28 +02:00
Ollie Agent
329edc3218
account for stripCold in cost
2026-08-15 12:37:13 +02:00
Ollie Agent
e4c24e8a5f
fix cancellation and configure compaction model
2026-08-15 12:29:55 +02:00
Ollie Agent
f61a93e426
refactor: move stripCold to executeTurn, replace clone with rollback pointer
...
- Remove per-step stripCold from run(); call once per turn in executeTurn
after accumulator reset and before preamble injection.
- Replace expensive deep-clone snapshot with pre-turn length truncation.
- Delete unused cloneMessages() helper.
2026-08-15 11:30:19 +02:00
Ollie Agent
e0f846bd31
fix: batch preamble injection and stripCold into single LLM calls
...
- Remove per-step preamble prepending in loop.go; inject once at turn start
in turn.go instead of re-sending thousands of tokens every tool step.
- Re-inject preamble after overflow retry compaction where it was lost.
- Replace stripCold() N sequential LLM calls with one batched call that
summarizes all cold-zone tool results via a single JSON response.
2026-08-15 11:16:49 +02:00
Ollie Agent
573c9f4462
cleanup: fix structural inconsistencies, remove dead code
...
- backend/openai: fix DefaultModel() dead 'anthropic' case, default to gpt-4o
- agent: SetCWD no longer sets stale envBlock first, uses runtime.GOOS
- backend/kiro: ContextLength cache now checks ctxModel consistently
- agent: AgentConfigPath uses agentsDir as the only search location
- fs: ctl 'tools' handler delegates to readAgentTools (dedup)
- agent: remove redundant TurnCtx field assignments in executeTurn
- agent: remove spending cap feature entirely (OLLIE_MAX_SESSION_COST)
- agent: inline stripColdResults into stripCold, remove wrapper
- agent: remove orphaned doc comment at end of text_parse.go
- agent: remove dead Prompt.MarshalJSON
- agent: cloneMessages now copies ID, Reasoning, ContentBlocks
- agent: fix newHistory comment (Session → History)
- agent: fix orphaned CompactionModel godoc on ListModels
- agent: toolCalls only captured from Done event (fix contract)
- agent: HandleCommand uses lib9p client instead of shelling out
2026-08-11 10:46:38 +02:00
Levi Neely
1fc051e3bf
refactor: move olliesrv and toolsrv packages to cmd/*/internal/
...
Move server-only packages under their respective cmd directories:
olliesrv:
- agent/ -> cmd/olliesrv/internal/agent/
- backend/ -> cmd/olliesrv/internal/backend/
- bypass/ -> cmd/olliesrv/internal/bypass/
- fs/ -> cmd/olliesrv/internal/fs/
- prompts/ -> cmd/olliesrv/internal/prompts/
- session/ -> cmd/olliesrv/internal/session/
toolsrv:
- Server-only code (exec9p, fs9p, server9p, spec9p, auth9p) -> cmd/toolsrv/
- sandbox/ -> cmd/toolsrv/internal/sandbox/
- Keep shared client code (client9p, spawn, registry, meta) in toolsrv/
- Add toolsrv/types.go for shared types (ToolResult, ToolResultContent)
This enforces package boundaries - code in cmd/*/internal/ cannot be
imported by external packages, while shared code remains importable.
2026-08-10 20:16:44 +02:00