Commit graph

49 commits

Author SHA1 Message Date
Darkatse
020ac88476 docs(agent): clarify compaction ownership and visible contracts
Address Review-1 §6. Document page availability and assembly restoration, keep
runtime mechanics out of the host contract, and classify visible compaction
fields and events as Project Contract. Link tests to their owning boundaries
and keep the Agent preset values and rationale in ProfilesAndPreset.

Validation: local documentation links; diff check.
2026-10-21 19:10:00 -04:00
Darkatse
2bd2c30230 refactor(assistant): extract the UI engine as @tauritavern/app-use
Tavern Studio needs the same snapshot and interaction engine inside its
preview pages. The engine, its tests and the cursor move to
packages/app-use, an independently versioned AGPL package that imports
no TT modules. The in-app assistant consumes it from the workspace, and
the old ui/ directory is removed.

TT differences arrive as options: the [data-tt-sensitive] marker, the
assistant history area, the control-shell surface and #chat scrolling.
scrollChatSurfaceTo is exposed on the page context, so interact no
longer imports /script.js and runs synchronously. The package exports
the four tool definitions; the assistant appends its own notes and
implements evaluate and read_logs. The cursor follows SmartTheme
colors, and its CSS is bundled with the assistant's styles.

Pushing an app-use-v<VERSION> tag publishes the package through npm
trusted publishing.

Validation: pnpm run check; browser iframe checks; the packed tarball
works outside the repository.
2026-10-18 18:44:16 -04:00
Darkatse
32bd1cbb05 feat(macros): unify contextual evaluation and parameter templates
Capture Agent inputs after extension hooks and share MacroEnv across prompt and request templates. Remove frozen macro emulation while preserving live extension behavior.

Simplify live data reads and browser test discovery; document the public context APIs.

Validation: pnpm run check.
2026-09-27 18:25:44 -04:00
Darkatse
2ae703aa08 feat(assistant): integrate the in-app assistant drawer
Mount a default-enabled assistant in the existing A drawer with streaming conversation, tool details, settings and Skill import. Preserve drawer theme and navigation behavior, and persist desktop content width separately from the Agent profile.
2026-09-22 04:25:22 -04:00
Darkatse
3c4d7db117 feat(agent): add persistent session runtime
Add standalone sessions with a shared profile, continuous JSONL history, and persistent work/tmp directories. Reuse frontend preset assembly and the existing model/tool loop with explicit Chat and Session targets.

Validation: pnpm run check
2026-09-21 22:18:25 -04:00
Darkatse
8d12ac646c docs(agent): describe unified workspace capabilities
Document skill mounts, prompt catalogs and migration boundaries. Retain the JavaScript capability and kit references while removing obsolete executor details.
2026-09-20 19:59:31 -04:00
Darkatse
8b7cf0c721 feat(agent): add JavaScript to the shared workspace shell
Unify Bashkit and QuickJS behind WorkspaceFs, retain the existing skill entry point during migration, and clarify Agent tool descriptions and errors.

Validation: pnpm run check.
2026-09-20 17:46:04 -04:00
Darkatse
5dc7d265cc feat(agent): add Bashkit workspace shell
Run shell commands and jq against the shared, scoped workspace. Integrate per-round automatic commits and cancellation that finishes active file writes before returning.
2026-09-19 21:44:54 -04:00
Darkatse
346befff32 refactor(agent): unify workspace file semantics
Route tools, Skill scripts and runtime files through WorkspaceFs with run-level locking, CAS and native append.

Persist complete directory state, including deletions, moves and empty directories. Simplify tests and workspace documentation.

Validation: pnpm run check
2026-09-19 19:43:19 -04:00
Darkatse
a996402de7 docs(agent): simplify and consolidate framework documentation 2026-09-06 20:53:05 -04:00
Darkatse
4392163532 docs(testing): codify behavior-first test constraints 2026-08-21 21:41:17 -04:00
Darkatse
605ae1b7fd refactor(agent): commit live workspace without checkpoints 2026-08-18 16:20:05 -04:00
Darkatse
99f675a556 feat(llm): add opt-in Responses WebSocket and hosted web search 2026-08-15 11:10:09 -04:00
Darkatse
3a6c93a203 refactor(agent): standardize recoverable line-based reads 2026-08-12 17:49:30 -04:00
Darkatse
b78237c058 fix(search): preserve punctuation-only queries 2026-08-12 01:37:57 -04:00
Darkatse
206acdeaa7 feat(mcp): add tool execution to legacy generation 2026-08-10 00:19:16 -04:00
Darkatse
40159b499e refactor(agent): make canonical tool descriptors the source of truth 2026-08-04 20:07:20 -04:00
Darkatse
550916da57 feat(agent): gate canonical tool calls before dispatch 2026-08-04 15:37:36 -04:00
Darkatse
75b1e4129b feat(agent): bind tools to immutable invocation snapshots 2026-08-03 22:09:24 -04:00
Darkatse
a16f1d2f56 refactor(chat): remove windowed mode and restore full-history semantics 2026-07-19 20:57:41 -04:00
Darkatse
caffc70f85 refactor(rust): extract user data storage adapter crate 2026-07-02 21:34:54 -04:00
Darkatse
b529506534 refactor(agent): remove delegate-controlled subagent budgets #113 2026-06-29 13:41:25 -04:00
Darkatse
c2d23fc2f7 feat(agent): add mobile swipe navigation to run timeline 2026-06-17 02:32:03 +08:00
Darkatse
dcad6d14bf fix(agent): stabilize run timeline detail view switching 2026-06-17 01:05:18 +08:00
Darkatse
17c263f67f feat(agent): add run history listing summaries 2026-06-13 23:56:40 +08:00
Darkatse
5b7b20418b fix(agent): preserve prompt history order during Agent assembly 2026-05-31 18:02:19 +08:00
Darkatse
3f59ceb792 refactor(agent): replace subagent workspace views with shared paths 2026-05-31 17:35:06 +08:00
Darkatse
3424bb6509 feat(agent): add append mode for workspace file writes 2026-05-30 21:27:09 +08:00
Darkatse
c369a64d5f feat(agent): add concurrent background worker scheduling for SubAgents 2026-05-29 00:57:19 +08:00
Darkatse
4d9e210bb6 feat(agent): add first-stage return-mode SubAgent runtime 2026-05-28 02:30:29 +08:00
Darkatse
ab726462d0 fix(agent): use text metrics and typed tool result payloads 2026-05-22 23:15:54 +08:00
Darkatse
84eaadc337 fix(agent): materialize Agent system prompts through PromptManager 2026-05-20 23:38:33 +08:00
Darkatse
77f15e2196 fix(agent): publish persistent state IDs only after durable finish 2026-05-20 21:27:05 +08:00
Darkatse
bb9b1d7c38 fix(agent): shorten tool audit file names 2026-05-05 18:34:40 -04:00
Darkatse
9118073819 feat(agent): surface reasoning in model turns and logs
- Add a sanitized model turn display DTO and readModelTurn host API
- Enrich agent run events with model round and reasoning summaries
- Render model reasoning, assistant output, and tool calls in the timeline detail panel
- Normalize visible provider reasoning while keeping native continuation state opaque
- Show visible reasoning in LLM API log readable output, including streaming logs
- Update docs and contract/runtime tests
2026-05-05 18:26:38 -04:00
Darkatse
cdedf4154c fix(agent): hash tool audit file names 2026-05-05 16:42:16 -04:00
Darkatse
fe75e880d1 feat(agent): resolve system prompts from preset anchors 2026-05-05 01:43:08 -04:00
Darkatse
a7d3181d37 feat(agent): clean up chat workspaces on chat deletion
- Add Agent workspace lifecycle cleanup for character and group chat deletion paths.
Reject deletion while a matching Agent workspace has active runs, and remove stale run indexes when deleting chat workspaces.

- Also centralize Agent workspace identity derivation and document the deletion semantics.
2026-05-04 01:12:30 -04:00
Darkatse
90e612b1a4 feat(agent): add file search and ranged reads
- Add workspace.search_files and skill.search so agents can discover relevant
content in visible workspace files and installed Skills before reading.

- Extend workspace.read_file and skill.read with line and character range reads
for large files, and wire the new capabilities through tool specs, dispatcher,
profile defaults, prompt hints, host Skill APIs, docs, and tests.
2026-05-04 00:44:01 -04:00
Darkatse
8838af1f99 feat(agent): split workspace commit from run finish
Introduce workspace.commit as the explicit chat publication step while
keeping workspace.finish scoped to run completion.

- add foreground/background run presentation semantics
- route chat commits through a host bridge backed by saveReply()
- support default replace commits and append commits on one message floor
- require foreground runs to commit before finish
- remove the old prepare/finalize commit API path
- update Agent docs, types, and runtime tests
2026-05-03 23:07:07 -04:00
Darkatse
4fde5e4981 feat(agent): Add Agent Profile foundation
- add Agent Profile domain models, file repository, resolver, and management commands
- resolve profiles before run creation and persist resolved_profile.json in run inputs
- drive tools, skills, workspace roots, output artifacts, rounds, and budgets from profiles
- support agentSystemPrompt replacement and model-facing tool description overrides
- enforce profile tool policy and skill read budgets at runtime
2026-05-03 21:57:21 -04:00
Darkatse
f4e41588b6 refactor(agent): Split model gateway into provider modules
- preserve the canonical AgentModelRequest/AgentModelResponse boundary
- isolate OpenAI Responses continuation and provider schema sanitization
- expand gateway tests for native metadata loss and cross-provider state
- update Agent docs to reflect the completed Phase 2D gateway baseline
- remove the obsolete SkillImportExport draft
- add the Agent design plan as historical background
2026-05-02 23:10:38 -04:00
Darkatse
f990f778c9 feat(agent): Add Agent Skill management and read tools
- Add file-backed Skill storage with import preview, install, export, source refs, and safe file reads
- Expose the Skill Host API and embedded Preset/Character Skill import prompts
- Register skill.list and skill.read in the Agent tool loop
- Cover archive roundtrips, source cleanup, symlink safety, and API contracts
- Refresh Agent docs around the current Skill capability boundary
2026-05-02 22:10:49 -04:00
Darkatse
30fb766f44 feat(agent): Add Responses provider state continuation
- Add run-scoped provider_state for Agent model calls, including
session tracking, message cursors, native continuation metadata, and
OpenAI Responses previous_response_id handling.

- Route OpenAI Responses through WebSocket sessions with incremental
Agent inputs, strip internal provider state from upstream/log payloads,
and persist per-round model responses for diagnostics.

- Document the current Custom OpenAI Responses and Agent provider_state
contracts, replacing stale phase-oriented notes with current behavior.
2026-05-02 02:42:38 -04:00
Darkatse
06cfe0115a feat(agent): Add Phase 2D canonical model gateway
- Route Agent model calls through canonical request and response IR
- Add ChatCompletionExchange for typed normalized responses without splitting legacy generation
- Preserve provider-native metadata for Claude, Gemini, Responses, and Interactions
- Harden tool call ID handling and provider-specific schema adaptation
- Update Agent architecture docs for Phase 2D contracts and follow-up work
2026-05-01 23:10:05 -04:00
Darkatse
d2420cc180 feat(agent): Add Phase 2C context read tools
Add read-only Agent tools for inspecting current chat context and
run-scoped World Info activation.

- Register chat_search, chat_read_messages, and worldinfo_read_activated
- Add message-indexed JSONL readers for character and group chats
- Return chat search snippets with stable message refs instead of full text
- Capture dry-run World Info activation in Agent prompt snapshots
- Keep World Info tool output focused on entry name, lorebook, and content
- Wire context tools through the existing registry, dispatcher, journal, and tool result flow
- Add coverage for chat message reads, chat search dispatch, and activated World Info reads
2026-04-28 23:41:21 -04:00
Darkatse
ba57373318 feat(agent): Add Phase 2B workspace read/write tools
- Add workspace list, read, write, patch, and finish tool support
- Track full-read state before applying precise workspace patches
- Persist tool arguments/results and checkpoint workspace mutations
- Return recoverable tool errors to the model for self-correction
- Raise agent tool loop limit to support longer multi-step runs
- Update Agent docs and Host ABI notes for the Phase 2B baseline
2026-04-26 23:34:42 -04:00
Darkatse
528b3b51c5 feat(agent): Add Phase 2A tool loop foundation
- Implement the minimal Rust-owned agent tool loop with workspace write and
finish tools, prompt snapshot execution, checkpoints, run events, and commit
preparation/finalization.

- Add the frontend dry-run prompt snapshot adapter and explicit agent start
entrypoints for legacy Generate integration and manual prompt snapshots. Keep
legacy Generate and ToolManager behavior unchanged outside agent mode.

- Document the Phase 2A contract, current limitations, workspace layout, event
flow, and manual smoke-test workflow.
2026-04-26 19:58:26 -04:00
Darkatse
f76139f961 feat(agent): Agent Phase 1 runtime foundation
- Introduce the Agent domain model, run/workspace/checkpoint repositories,
and a file-backed workspace store with event journaling.

- Wire the runtime service into Tauri commands and expose the frontend Agent
API for starting, observing, cancelling, reading, and committing runs.

- Derive workspaces from stable chat identity while keeping each run isolated,
and make unsupported Phase 1 paths fail fast.

- Document the Agent architecture, API contract, workspace model, LLM gateway,
tool/MCP boundaries, and implementation plan.
2026-04-26 14:28:08 -04:00