[GH-ISSUE #2482] 13. Agents, tools, regex, and knowledge #1225

Closed
opened 2026-10-21 05:29:18 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2482

Originally assigned to: @Promansis on GitHub.

Target 13: Agents, Tools, Regex, And Knowledge

target: 13
name: Agents, tools, regex, and knowledge
scan_status: in_progress
parity_verdict: gap
proof_level: static_trace
scan_refactor: inventory 7a09bef8
legacy_ref: inventory 7c6190aa
report: batch_13_static_trace
last_refreshed: 2026-06-06

Scope

Included:

  • Agent catalog/runtime settings and activation behavior.
  • Custom tool supported and unsupported execution contracts.
  • Regex script persisted contract.
  • Knowledge agent surfaces where they depend on agent/tool contracts.

Not checked:

  • Full generation/runtime parityscan.
  • Native app behavior.
  • Profile/import preservation; Target 20 owns that proof.

Surface Inventory

Surface ID Surface Bucket Source Legacy owner Refactor owner In scope Notes
13-AGENT-CONTRACT-catalog-defaults-tools Built-in agent IDs, phases, result types, default settings, and default tools. CONTRACT both packages/shared/src/types/agent.ts; packages/shared/src/schemas/agent.schema.ts; packages/server/src/services/storage/agents.storage.ts src/engine/contracts/types/agent.ts; src/engine/contracts/schemas/agent.schema.ts; src/engine/generation/agent-runner.ts yes Target 1 owns schema inventory; Target 13 owns runtime parity.
13-AGENT-STORAGE-config-runs-memory Agent config CRUD, enablement, custom run rows, cadence status, and per-chat agent memory. STORAGE both packages/server/src/routes/agents.routes.ts; packages/server/src/services/storage/agents.storage.ts; packages/client/src/hooks/use-agents.ts src-tauri/src/commands/storage/agents.rs; src/shared/api/agent-api.ts; src/features/catalog/agents/hooks/use-agents.ts yes Separates persisted owner paths from runtime activation behavior.
13-AGENT-UI-catalog-editor Agents catalog lists built-ins/custom agents, supports create/update/delete/toggle, and edits prompt, phase, result type, connection, cadence, tools, and source settings. UI both packages/client/src/components/panels/AgentsPanel.tsx; packages/client/src/components/agents/AgentEditor.tsx; packages/client/src/components/modals/EditAgentModal.tsx src/features/catalog/agents/components/AgentsPanel.tsx; src/features/catalog/agents/components/AgentEditor.tsx; src/features/catalog/agents/components/EditAgentModal.tsx yes Includes status/category views and built-in vs custom edit affordances.
13-AGENT-UI-chat-activation Chat settings per-chat agent activation, default built-in fallback, custom agent selection, cadence preview, and remove/toggle behavior. UI both packages/client/src/components/chat/ChatSettingsDrawer.tsx; packages/shared/src/types/chat.ts src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx; src/engine/contracts/types/chat.ts yes Covers activeAgentIds, enableAgents, default active agents, and chat-scoped selection.
13-AGENT-RUNTIME-settings-bag Agent runtime settings consumed by runner, pipeline, knowledge, tool, image, and context-sharing paths. RUNTIME both legacy agent routes and runtime services src/engine/generation/agent-runner.ts; src/engine/agents-runtime/pipeline/agent-pipeline.ts; src/engine/agents-runtime/knowledge/*; src/features/catalog/agents/components/AgentEditor.tsx yes Includes runInterval, enabledTools, file/lorebook sources, context sharing, and visual options.
13-AGENT-RUNTIME-activation-cadence-run-memory Built-in/custom activation, cadence, failures, run rows, and memory shape. RUNTIME both legacy agent runtime/storage services src/engine/agents-runtime/activation.ts; src-tauri/src/commands/storage/agents.rs; src/engine/generation/agent-memory-runtime.ts yes Target 1 only covered activation settings schema.
13-AGENT-RUNTIME-retry-agent-results Manual retry/backfill of selected agents for a message, including SSE agent_result events and result persistence/effects. RUNTIME both packages/server/src/routes/generate/retry-agents-route.ts; packages/client/src/hooks/use-generate.ts src/engine/generation/start-generation.ts; src/features/runtime/generation/hooks/use-generate.ts; src/features/modes/*/hooks yes Includes lorebook-keeper backfill, illustrator rerun, secret plot rerun modes, and result side effects.
13-AGENT-UI-activity-debug-failures Agent activity UI, thought bubbles, continuity issue checklist, debug panel, tool call/result logs, and failure toasts. UI both packages/client/src/components/agents/AgentThoughtBubbles.tsx; packages/client/src/components/agents/AgentDebugPanel.tsx; packages/client/src/lib/agent-failures.ts; packages/client/src/hooks/use-generate.ts src/features/catalog/agents/components/AgentThoughtBubbles.tsx; src/features/catalog/agents/components/AgentDebugPanel.tsx; src/shared/lib/agent-failures.ts; src/features/runtime/generation/hooks/use-generate.ts yes Needed so parityscan checks visibility, not only runner output.
13-AGENT-UI-injection-review-edit-reroll Roleplay cached prompt injections can be reviewed, edited, saved to message extra, rerolled where allowed, and exposed through the Agents HUD tab. UI both packages/client/src/components/agents/ContextInjectionPanel.tsx; packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx; packages/client/src/components/agents/AgentInjectionReviewModal.tsx src/features/modes/roleplay/components/ContextInjectionPanel.tsx; src/features/modes/roleplay/components/RoleplayHUDActionsMenu.tsx; src/features/modes/roleplay/components/AgentInjectionReviewModal.tsx yes knowledge-retrieval and knowledge-router are non-rerollable in this UI.
13-AGENT-RUNTIME-context-injection-cache Generated pre-generation injections persist to message.extra.contextInjections, are reused on regeneration, and keep secret-plot data out of user-visible cached injections. RUNTIME both packages/shared/src/types/chat.ts; packages/server/src/routes/generate.routes.ts; packages/server/src/routes/generate/retry-agents-route.ts src/engine/contracts/types/chat.ts; src/engine/generation/start-generation.ts; src/engine/agents-runtime/pipeline/agent-pipeline.ts yes Important because review UI and prompt assembly both depend on this contract.
13-AGENT-RUNTIME-secret-plot-memory Secret Plot Driver loads, injects, rerolls, and persists hidden arc/direction memory plus panel edits. RUNTIME both packages/server/src/routes/generate.routes.ts; packages/server/src/routes/generate/retry-agents-route.ts; packages/client/src/components/agents/SecretPlotPanel.tsx src/engine/generation/agent-memory-runtime.ts; src/engine/generation/start-generation.ts; src/features/modes/roleplay/components/SecretPlotPanel.tsx; src-tauri/src/commands/storage/agents.rs yes Existing follow-ups closed; parityscan still needs fresh current-branch proof.
13-TOOLS-CONTRACT-custom-tool-positive-shape Supported custom tool static/webhook contract and enabled filtering. CONTRACT both packages/shared/src/schemas/custom-tool.schema.ts; legacy tool execution routes src/engine/contracts/schemas/custom-tool.schema.ts; src/engine/generation/tools-runtime.ts; src-tauri/src/commands/storage/custom_tools.rs; src/shared/api/custom-tool-api.ts yes Target 1 owns shape; Target 13 owns callable/runtime behavior.
13-TOOLS-STORAGE-custom-tool-crud Custom tool CRUD persists enabled flag, name/description, JSON schema parameters, execution type, webhook URL, static result, and legacy script fields when present. STORAGE both packages/server/src/routes/custom-tools.routes.ts; packages/server/src/services/storage/custom-tools.storage.ts; packages/server/src/db/schema/custom-tools.ts src/features/catalog/agents/hooks/use-custom-tools.ts; src-tauri/src/commands/storage/custom_tools.rs; generic storage collection contract yes Target 20 owns bulk profile preservation; Target 13 owns normal catalog/runtime use.
13-TOOLS-UI-tool-editor-selectability Tool editor and agent editor expose static/webhook tools, mark script rows unsupported, and filter selectable tools by capabilities. UI both packages/client/src/components/agents/ToolEditor.tsx; packages/client/src/hooks/use-custom-tools.ts; packages/client/src/components/agents/AgentEditor.tsx src/features/catalog/agents/components/ToolEditor.tsx; src/features/catalog/agents/hooks/use-custom-tools.ts; src/features/catalog/agents/components/AgentEditor.tsx yes Refactor intentionally removes script creation from the editor but still shows legacy script rows.
13-TOOLS-RUNTIME-static-webhook-execution Static and webhook custom tool calls are advertised to LLMs, executed, and returned into the agent/tool-call loop. RUNTIME both packages/server/src/services/tools/tool-executor.ts; packages/server/src/routes/generate.routes.ts; packages/server/src/services/agents/agent-executor.ts src/engine/generation/tools-runtime.ts; src/engine/generation/agent-runner.ts; src/engine/generation/start-generation.ts; src/shared/api/integration-gateway.ts yes Separate from schema: parityscan must prove model-visible tool defs and execution result flow.
13-TOOLS-RUNTIME-script-execution-boundary Disabled legacy script/scriptBody execution boundary. RUNTIME both legacy script custom tools docs/REFACTOR_PARITY_PIPELINE.md; src-tauri/src/commands/storage/custom_tools.rs; src/features/catalog/agents/components/ToolEditor.tsx yes Intentional divergence tracked in #1907.
13-TOOLS-REMOTE-command-dispatch Custom tool capabilities and execution are available through embedded Tauri and hostable HTTP command dispatch. REMOTE refactor_only none; legacy uses Express routes src/shared/api/custom-tool-api.ts; src/shared/api/remote-runtime.ts; src-tauri/src/http_dispatch.rs; src-tauri/src/commands/storage/commands/agents.rs; src-tauri/src/commands/storage/custom_tools.rs yes Refactor-only architecture surface; parityscan should check no embedded/remote drift.
13-TOOLS-ERROR-execution-failures Custom tool execution errors are visible and typed for unsupported script, unknown execution type, missing/blocked webhook URL, client failure, response parse failure, and non-2xx webhook response. ERROR both packages/server/src/services/tools/tool-executor.ts; packages/server/src/routes/custom-tools.routes.ts src-tauri/src/commands/storage/custom_tools.rs; src/features/runtime/generation/hooks/use-generate.ts; src/features/catalog/agents/components/AgentDebugPanel.tsx yes Negative controls should include one should-not-execute script row.
13-REGEX-CONTRACT-regex-script Regex script persisted schema: placement, prompt-only, depth, trim strings, flags, and reorder. CONTRACT both packages/shared/src/schemas/regex.schema.ts; packages/server/src/db/schema/regex-scripts.ts; packages/server/src/services/storage/regex-scripts.storage.ts src/engine/contracts/schemas/regex.schema.ts; src/features/catalog/agents; src/engine/generation/regex-runtime.ts yes Behavior belongs to agents/tools/regex target, not Target 1.
13-REGEX-STORAGE-crud-reorder Regex script CRUD and reorder persist stable ordering and enabled/disabled rows. STORAGE both packages/server/src/routes/regex-scripts.routes.ts; packages/server/src/services/storage/regex-scripts.storage.ts; packages/client/src/hooks/use-regex-scripts.ts src/features/catalog/agents/hooks/use-regex-scripts.ts; generic storage collection contract; src/features/catalog/agents/components/AgentsPanel.tsx yes Refactor has generic storage-backed hooks instead of legacy dedicated Express route.
13-REGEX-UI-editor-import-test Regex UI lists, creates, edits, deletes, reorders, imports JSON/SillyTavern-style rows, validates regex, and tests sample replacements. UI both packages/client/src/components/panels/AgentsPanel.tsx; packages/client/src/components/agents/RegexScriptEditor.tsx src/features/catalog/agents/components/AgentsPanel.tsx; src/features/catalog/agents/components/RegexScriptEditor.tsx; src/shared/lib/regex-script-import.ts yes Includes full-page detail route state through regexDetailId.
13-REGEX-COMPAT-st-json-import SillyTavern-style regex JSON import maps delimited /pattern/flags, numeric placements, trim strings, depth, and prompt-only fields into native rows. COMPAT both packages/client/src/components/panels/AgentsPanel.tsx src/features/catalog/agents/components/AgentsPanel.tsx; src/shared/lib/regex-script-import.ts yes Profile/bulk preservation remains Target 20; direct regex import belongs here.
13-REGEX-RUNTIME-message-application Regex scripts apply in order to user input and/or AI output, honor prompt-only and depth, run macros/replacements, trim strings, and avoid changing out-of-scope messages. RUNTIME both packages/server/src/services/regex/regex-application.ts; packages/server/src/routes/generate.routes.ts; packages/client/src/hooks/use-apply-regex.ts src/engine/generation/regex-runtime.ts; src/engine/generation-core/regex/regex-application.ts; src/features/catalog/agents/regex-application.ts; src/features/runtime/generation/hooks/use-generate.ts yes Target 12 may check prompt assembly; Target 13 checks regex behavior itself.
13-REGEX-ERROR-safety-invalid-timeout Unsafe, invalid, or expensive regex patterns are rejected or bounded, with visible editor/runtime failure behavior. ERROR both packages/shared/src/utils/regex-safety.ts; packages/shared/src/utils/regex-replacement.ts; packages/server/src/services/lorebook/regex-timeout.ts src/engine/shared/regex/regex-safety.ts; src/engine/shared/regex/regex-replacement.ts; src/engine/generation-core/lorebooks/regex-timeout.ts; src/features/catalog/agents/components/RegexScriptEditor.tsx yes Needs positive and should-not-match rows during parityscan.
13-KNOWLEDGE-STORAGE-source-files Knowledge source upload/list/delete/text read stores file metadata and extracted text for agent use. STORAGE both packages/server/src/routes/knowledge-sources.routes.ts; packages/client/src/hooks/use-knowledge-sources.ts src-tauri/src/commands/storage/knowledge.rs; src/features/catalog/knowledge/hooks/use-knowledge-sources.ts; src/features/catalog/agents/components/AgentEditor.tsx yes Import/export preservation stays Target 20; source CRUD/use is Target 13.
13-KNOWLEDGE-UI-source-selection Knowledge agents expose lorebook/file source selection, upload/delete controls, source coverage hints, semantic top-K, and overlap warning when both knowledge agents are configured. UI both packages/client/src/components/agents/AgentEditor.tsx; packages/client/src/hooks/use-knowledge-sources.ts src/features/catalog/agents/components/AgentEditor.tsx; src/features/catalog/knowledge/hooks/use-knowledge-sources.ts yes Includes file source IDs, lorebook source IDs, active chat lorebook toggle, and router entry description coverage.
13-KNOWLEDGE-RUNTIME-router-retrieval Knowledge Retrieval and Knowledge Router build source material/catalogs, select relevant lorebook/file content, and inject results into generation context. RUNTIME both packages/server/src/services/agents/knowledge-retrieval.ts; packages/server/src/services/agents/knowledge-router.ts; packages/server/src/routes/generate.routes.ts src/engine/agents-runtime/knowledge/knowledge-retrieval.ts; src/engine/agents-runtime/knowledge/knowledge-router.ts; src/engine/agents-runtime/pipeline/agent-pipeline.ts; src/engine/generation/start-generation.ts yes Needs separate checks for file-backed retrieval vs lorebook-router selection.
13-KNOWLEDGE-REMOTE-source-dispatch Knowledge source list/upload/delete/text commands are exposed through embedded Tauri and hostable HTTP dispatch. REMOTE refactor_only none; legacy uses Express /api/knowledge-sources routes src-tauri/src/commands/storage/knowledge.rs; src-tauri/src/http_dispatch.rs; src-tauri/src/lib.rs; src/features/catalog/knowledge/hooks/use-knowledge-sources.ts yes Remote upload/text parity can drift because browser FormData and Tauri payloads differ.
13-KNOWLEDGE-PERF-source-budget Knowledge agents respect source size, token budget, top-K/router options, and avoid eager large-source injection when no relevant material exists. PERF both packages/server/src/services/agents/knowledge-retrieval.ts; packages/server/src/services/agents/knowledge-router.ts; packages/server/scripts/benchmark-knowledge-router.ts src/engine/agents-runtime/knowledge/knowledge-retrieval.ts; src/engine/agents-runtime/knowledge/knowledge-router.ts; docs/token-budget-estimates.md yes Static inventory only; parityscan can use focused synthetic sources before native QA.
13-AGENT-ERROR-empty-response-failures Empty agent responses, skipped agents, disabled custom agents, missing connections, and runtime failures surface as agent failures rather than silent success. ERROR both packages/server/src/services/agents/agent-executor.ts; packages/server/src/routes/generate.routes.ts; packages/client/src/lib/agent-failures.ts src/engine/generation/agent-runner.ts; src/engine/agents-runtime/executor/agent-executor.ts; src/shared/lib/agent-failures.ts; src/features/runtime/generation/hooks/use-generate.ts yes Needed because #1904 notes empty response failures were restored.

Coverage Matrix

Surface ID Status Proof Follow-up
13-AGENT-CONTRACT-catalog-defaults-tools gap Batch 1 static trace: legacy disables Immersive HTML by default; refactor enables it by default. #2488
13-AGENT-STORAGE-config-runs-memory scanned_no_gap_found Batch 2 static trace: legacy route/storage behavior matched by refactor storage commands, shared API, hooks, run rows, cadence status, and per-chat memory; no issue created.
13-AGENT-UI-catalog-editor gap Batch 3 static trace: legacy has By Status enabled/disabled view; refactor category-only. #2484
13-AGENT-UI-chat-activation unscanned not checked
13-AGENT-RUNTIME-settings-bag gap Batch 1 static trace: legacy enables Illustrator avatar references only when explicitly set; refactor defaults missing setting to enabled. Other checked settings-bag fields matched direct consumers. #2489
13-AGENT-RUNTIME-activation-cadence-run-memory scanned_no_gap_found Batch 2 static trace: custom activation, run-interval gates, run-row persistence, and Secret Plot memory persistence matched direct legacy behavior; no issue created. #1889
13-AGENT-RUNTIME-retry-agent-results gap Batch 5 static trace: legacy retry streams agent_result and applies/persists retry side effects server-side; refactor retry returns batched results to UI and Lorebook Keeper retry/backfill routes through review/apply handling. #2487
13-AGENT-UI-activity-debug-failures no_gap Batch 6 static trace: thought bubbles, continuity checklist surface, debug panel result rows, tool call/result logs, failure state, retry toast path, and failure mapper are present; no issue created.
13-AGENT-UI-injection-review-edit-reroll no_gap Batch 7 static trace: review modal, HUD Injections tab, edit/save to message extra, reroll for allowed agents, and KR/Router non-rerollable behavior are present.
13-AGENT-RUNTIME-context-injection-cache gap Batch 7 static trace: fresh generation persists message.extra.contextInjections, but regeneration does not reload/reuse target cached injections and instead reruns pre-generation agents; edited cache can be ignored or overwritten. #2491
13-AGENT-RUNTIME-secret-plot-memory gap Batch 8 static trace: refactor only exposes Secret Plot memory inside agent prompt state, does not inject legacy hidden arc/directions into the main reply prompt, merges memory across all agents before deriving Secret Plot state, and full reroll cannot clear an explicit null arc. #2492
13-TOOLS-CONTRACT-custom-tool-positive-shape no_gap Batch 9 static trace: supported static/webhook contract, enabled filtering, and model-visible custom tool definitions match legacy positive behavior; script execution remains intentional divergence.
13-TOOLS-STORAGE-custom-tool-crud no_gap Batch 9 static trace: CRUD persists enabled flag, name/description, JSON parameters, execution type, webhook URL, static result, and legacy script rows remain preserved enough for review under the documented script boundary.
13-TOOLS-UI-tool-editor-selectability no_gap Batch 3 static trace: static/webhook editor present; script rows unsupported per intentional divergence; selectable tools filtered by enabled/capability. #1907
13-TOOLS-RUNTIME-static-webhook-execution unscanned not checked
13-TOOLS-RUNTIME-script-execution-boundary intentional_divergence Batch 11 static trace rechecked documented boundary: legacy script rows may persist, but refactor create/update excludes script execution and native execution returns custom_tool_script_unsupported. #1907
13-TOOLS-REMOTE-command-dispatch unscanned not checked
13-TOOLS-ERROR-execution-failures refactor_better Batch 11 static trace: refactor has typed/actionable errors for unsupported script, unknown type, missing/blocked webhook URL, client/send failure, non-2xx webhook response, response read failure, and oversized response; tool failures are emitted as failed debug tool results.
13-REGEX-CONTRACT-regex-script no_gap Batch 13 static trace: legacy persisted regex schema fields matched by refactor schema and generic storage-backed rows; refactor adds scoped characterId default without removing legacy placement, prompt-only, depth, trim strings, flags, or order behavior.
13-REGEX-STORAGE-crud-reorder no_gap Batch 13 static trace: legacy dedicated CRUD and reorder route behavior matched by refactor generic regex-scripts storage hooks, stable order sorting, enabled/disabled row handling, and reorder patches to order/sortOrder; no issue created.
13-REGEX-UI-editor-import-test no_gap Batch 14 static trace: regex panel lists, creates, edits, deletes, reorders, imports JSON/ST-style rows, validates regex, and live-tests sample replacements; refactor matches legacy direct UI behavior.
13-REGEX-COMPAT-st-json-import no_gap Batch 14 static trace: direct JSON import maps ST/native name, delimited /pattern/flags, numeric placements, disabled/enabled, trim strings, prompt-only, order, and depth fields like legacy.
13-REGEX-RUNTIME-message-application gap Batch 15 static trace: legacy applies non-prompt regex once through UI send/display while server prompt application is prompt-only; refactor still uses UI send/display regex and also applies non-prompt regex in generation before persistence, so non-idempotent rows can double-apply. #2494
13-REGEX-ERROR-safety-invalid-timeout no_gap Batch 15 static trace: invalid regex editor/runtime behavior and lorebook regex safety/timeout behavior match legacy; no issue created.
13-KNOWLEDGE-STORAGE-source-files no_gap Batch 16 static trace: legacy knowledge-source upload/list/delete/text read matched by refactor Rust storage commands, shared API hook, metadata/file storage, extension validation, newest-first listing, delete, and text extraction; no issue created.
13-KNOWLEDGE-UI-source-selection no_gap Batch 16 static trace: legacy AgentEditor source selection matched by refactor chat-active lorebook toggle, fixed lorebook/file selections, upload/delete controls, router description coverage hint, and overlap warning; no issue created.
13-KNOWLEDGE-RUNTIME-router-retrieval refactor_better Batch 17 static trace: refactor directly loads scoped lorebook/file source material, runs Knowledge Retrieval/Router outside generic batching, and injects non-empty results; legacy main left helpers unwired through generic pipeline. No issue created.
13-KNOWLEDGE-REMOTE-source-dispatch no_gap Batch 18 static trace: knowledge source list/upload/delete/text commands are exposed through shared API, remote allowlist, embedded Tauri command registration, and hostable HTTP dispatch; upload JSON/base64 payload reaches the same Rust knowledge handler as embedded commands. No issue created.
13-KNOWLEDGE-PERF-source-budget refactor_better Batch 17 static trace: retrieval trims/short-circuits empty sources, chunks by sourceContextBudget with consolidation preservation; router uses semanticTopK, keyword fallback, no-input short-circuit, selected-only injection, and 400-candidate cap. No issue created.
13-AGENT-ERROR-empty-response-failures gap Batch 6 static trace: empty responses and dangling connections surface as failures, but active/requested disabled custom agents are filtered before a failed AgentResult is emitted. #2490

Follow-Ups

Issue State Why it matters
#1889 CLOSED Restored custom agent activation settings schema contract.
#1899 CLOSED Accepted unset agent temperature default divergence.
#1907 CLOSED Documented and enforced disabled script custom tool execution.
#2491 OPEN Restores regeneration reuse of cached prompt injections from message.extra.contextInjections.
#2494 OPEN Restores single-pass non-prompt regex application for 13-REGEX-RUNTIME-message-application.

Refactor-Better Or Intentional Divergence

  • Legacy script / scriptBody custom tool execution is intentionally disabled.
  • Unset agent temperature default divergence is documented and accepted.

Rescan Criteria

  • Run agents/tools/regex/knowledge parityscan on current refactor.
  • Include enabled/disabled agents, custom agents, built-in defaults, chat activation UI, retry/rerun flows, injection review/editing, tool calls, static/webhook/script-boundary custom tools, regex CRUD/import/reorder/application/safety, agent memory/runs/debug/failures, knowledge source CRUD, knowledge router/retrieval, remote dispatch, and intentional divergences.
Originally created by @Promansis on GitHub (Jun 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2482 Originally assigned to: @Promansis on GitHub. # Target 13: Agents, Tools, Regex, And Knowledge ```yaml target: 13 name: Agents, tools, regex, and knowledge scan_status: in_progress parity_verdict: gap proof_level: static_trace scan_refactor: inventory 7a09bef8 legacy_ref: inventory 7c6190aa report: batch_13_static_trace last_refreshed: 2026-06-06 ``` ## Scope Included: - Agent catalog/runtime settings and activation behavior. - Custom tool supported and unsupported execution contracts. - Regex script persisted contract. - Knowledge agent surfaces where they depend on agent/tool contracts. Not checked: - Full generation/runtime parityscan. - Native app behavior. - Profile/import preservation; Target 20 owns that proof. ## Surface Inventory | Surface ID | Surface | Bucket | Source | Legacy owner | Refactor owner | In scope | Notes | | --- | --- | --- | --- | --- | --- | --- | --- | | 13-AGENT-CONTRACT-catalog-defaults-tools | Built-in agent IDs, phases, result types, default settings, and default tools. | CONTRACT | both | `packages/shared/src/types/agent.ts`; `packages/shared/src/schemas/agent.schema.ts`; `packages/server/src/services/storage/agents.storage.ts` | `src/engine/contracts/types/agent.ts`; `src/engine/contracts/schemas/agent.schema.ts`; `src/engine/generation/agent-runner.ts` | yes | Target 1 owns schema inventory; Target 13 owns runtime parity. | | 13-AGENT-STORAGE-config-runs-memory | Agent config CRUD, enablement, custom run rows, cadence status, and per-chat agent memory. | STORAGE | both | `packages/server/src/routes/agents.routes.ts`; `packages/server/src/services/storage/agents.storage.ts`; `packages/client/src/hooks/use-agents.ts` | `src-tauri/src/commands/storage/agents.rs`; `src/shared/api/agent-api.ts`; `src/features/catalog/agents/hooks/use-agents.ts` | yes | Separates persisted owner paths from runtime activation behavior. | | 13-AGENT-UI-catalog-editor | Agents catalog lists built-ins/custom agents, supports create/update/delete/toggle, and edits prompt, phase, result type, connection, cadence, tools, and source settings. | UI | both | `packages/client/src/components/panels/AgentsPanel.tsx`; `packages/client/src/components/agents/AgentEditor.tsx`; `packages/client/src/components/modals/EditAgentModal.tsx` | `src/features/catalog/agents/components/AgentsPanel.tsx`; `src/features/catalog/agents/components/AgentEditor.tsx`; `src/features/catalog/agents/components/EditAgentModal.tsx` | yes | Includes status/category views and built-in vs custom edit affordances. | | 13-AGENT-UI-chat-activation | Chat settings per-chat agent activation, default built-in fallback, custom agent selection, cadence preview, and remove/toggle behavior. | UI | both | `packages/client/src/components/chat/ChatSettingsDrawer.tsx`; `packages/shared/src/types/chat.ts` | `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx`; `src/engine/contracts/types/chat.ts` | yes | Covers `activeAgentIds`, `enableAgents`, default active agents, and chat-scoped selection. | | 13-AGENT-RUNTIME-settings-bag | Agent runtime settings consumed by runner, pipeline, knowledge, tool, image, and context-sharing paths. | RUNTIME | both | legacy agent routes and runtime services | `src/engine/generation/agent-runner.ts`; `src/engine/agents-runtime/pipeline/agent-pipeline.ts`; `src/engine/agents-runtime/knowledge/*`; `src/features/catalog/agents/components/AgentEditor.tsx` | yes | Includes `runInterval`, `enabledTools`, file/lorebook sources, context sharing, and visual options. | | 13-AGENT-RUNTIME-activation-cadence-run-memory | Built-in/custom activation, cadence, failures, run rows, and memory shape. | RUNTIME | both | legacy agent runtime/storage services | `src/engine/agents-runtime/activation.ts`; `src-tauri/src/commands/storage/agents.rs`; `src/engine/generation/agent-memory-runtime.ts` | yes | Target 1 only covered activation settings schema. | | 13-AGENT-RUNTIME-retry-agent-results | Manual retry/backfill of selected agents for a message, including SSE `agent_result` events and result persistence/effects. | RUNTIME | both | `packages/server/src/routes/generate/retry-agents-route.ts`; `packages/client/src/hooks/use-generate.ts` | `src/engine/generation/start-generation.ts`; `src/features/runtime/generation/hooks/use-generate.ts`; `src/features/modes/*/hooks` | yes | Includes lorebook-keeper backfill, illustrator rerun, secret plot rerun modes, and result side effects. | | 13-AGENT-UI-activity-debug-failures | Agent activity UI, thought bubbles, continuity issue checklist, debug panel, tool call/result logs, and failure toasts. | UI | both | `packages/client/src/components/agents/AgentThoughtBubbles.tsx`; `packages/client/src/components/agents/AgentDebugPanel.tsx`; `packages/client/src/lib/agent-failures.ts`; `packages/client/src/hooks/use-generate.ts` | `src/features/catalog/agents/components/AgentThoughtBubbles.tsx`; `src/features/catalog/agents/components/AgentDebugPanel.tsx`; `src/shared/lib/agent-failures.ts`; `src/features/runtime/generation/hooks/use-generate.ts` | yes | Needed so parityscan checks visibility, not only runner output. | | 13-AGENT-UI-injection-review-edit-reroll | Roleplay cached prompt injections can be reviewed, edited, saved to message extra, rerolled where allowed, and exposed through the Agents HUD tab. | UI | both | `packages/client/src/components/agents/ContextInjectionPanel.tsx`; `packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx`; `packages/client/src/components/agents/AgentInjectionReviewModal.tsx` | `src/features/modes/roleplay/components/ContextInjectionPanel.tsx`; `src/features/modes/roleplay/components/RoleplayHUDActionsMenu.tsx`; `src/features/modes/roleplay/components/AgentInjectionReviewModal.tsx` | yes | `knowledge-retrieval` and `knowledge-router` are non-rerollable in this UI. | | 13-AGENT-RUNTIME-context-injection-cache | Generated pre-generation injections persist to `message.extra.contextInjections`, are reused on regeneration, and keep secret-plot data out of user-visible cached injections. | RUNTIME | both | `packages/shared/src/types/chat.ts`; `packages/server/src/routes/generate.routes.ts`; `packages/server/src/routes/generate/retry-agents-route.ts` | `src/engine/contracts/types/chat.ts`; `src/engine/generation/start-generation.ts`; `src/engine/agents-runtime/pipeline/agent-pipeline.ts` | yes | Important because review UI and prompt assembly both depend on this contract. | | 13-AGENT-RUNTIME-secret-plot-memory | Secret Plot Driver loads, injects, rerolls, and persists hidden arc/direction memory plus panel edits. | RUNTIME | both | `packages/server/src/routes/generate.routes.ts`; `packages/server/src/routes/generate/retry-agents-route.ts`; `packages/client/src/components/agents/SecretPlotPanel.tsx` | `src/engine/generation/agent-memory-runtime.ts`; `src/engine/generation/start-generation.ts`; `src/features/modes/roleplay/components/SecretPlotPanel.tsx`; `src-tauri/src/commands/storage/agents.rs` | yes | Existing follow-ups closed; parityscan still needs fresh current-branch proof. | | 13-TOOLS-CONTRACT-custom-tool-positive-shape | Supported custom tool static/webhook contract and enabled filtering. | CONTRACT | both | `packages/shared/src/schemas/custom-tool.schema.ts`; legacy tool execution routes | `src/engine/contracts/schemas/custom-tool.schema.ts`; `src/engine/generation/tools-runtime.ts`; `src-tauri/src/commands/storage/custom_tools.rs`; `src/shared/api/custom-tool-api.ts` | yes | Target 1 owns shape; Target 13 owns callable/runtime behavior. | | 13-TOOLS-STORAGE-custom-tool-crud | Custom tool CRUD persists enabled flag, name/description, JSON schema parameters, execution type, webhook URL, static result, and legacy script fields when present. | STORAGE | both | `packages/server/src/routes/custom-tools.routes.ts`; `packages/server/src/services/storage/custom-tools.storage.ts`; `packages/server/src/db/schema/custom-tools.ts` | `src/features/catalog/agents/hooks/use-custom-tools.ts`; `src-tauri/src/commands/storage/custom_tools.rs`; generic `storage` collection contract | yes | Target 20 owns bulk profile preservation; Target 13 owns normal catalog/runtime use. | | 13-TOOLS-UI-tool-editor-selectability | Tool editor and agent editor expose static/webhook tools, mark script rows unsupported, and filter selectable tools by capabilities. | UI | both | `packages/client/src/components/agents/ToolEditor.tsx`; `packages/client/src/hooks/use-custom-tools.ts`; `packages/client/src/components/agents/AgentEditor.tsx` | `src/features/catalog/agents/components/ToolEditor.tsx`; `src/features/catalog/agents/hooks/use-custom-tools.ts`; `src/features/catalog/agents/components/AgentEditor.tsx` | yes | Refactor intentionally removes script creation from the editor but still shows legacy script rows. | | 13-TOOLS-RUNTIME-static-webhook-execution | Static and webhook custom tool calls are advertised to LLMs, executed, and returned into the agent/tool-call loop. | RUNTIME | both | `packages/server/src/services/tools/tool-executor.ts`; `packages/server/src/routes/generate.routes.ts`; `packages/server/src/services/agents/agent-executor.ts` | `src/engine/generation/tools-runtime.ts`; `src/engine/generation/agent-runner.ts`; `src/engine/generation/start-generation.ts`; `src/shared/api/integration-gateway.ts` | yes | Separate from schema: parityscan must prove model-visible tool defs and execution result flow. | | 13-TOOLS-RUNTIME-script-execution-boundary | Disabled legacy `script`/`scriptBody` execution boundary. | RUNTIME | both | legacy script custom tools | `docs/REFACTOR_PARITY_PIPELINE.md`; `src-tauri/src/commands/storage/custom_tools.rs`; `src/features/catalog/agents/components/ToolEditor.tsx` | yes | Intentional divergence tracked in #1907. | | 13-TOOLS-REMOTE-command-dispatch | Custom tool capabilities and execution are available through embedded Tauri and hostable HTTP command dispatch. | REMOTE | refactor_only | none; legacy uses Express routes | `src/shared/api/custom-tool-api.ts`; `src/shared/api/remote-runtime.ts`; `src-tauri/src/http_dispatch.rs`; `src-tauri/src/commands/storage/commands/agents.rs`; `src-tauri/src/commands/storage/custom_tools.rs` | yes | Refactor-only architecture surface; parityscan should check no embedded/remote drift. | | 13-TOOLS-ERROR-execution-failures | Custom tool execution errors are visible and typed for unsupported script, unknown execution type, missing/blocked webhook URL, client failure, response parse failure, and non-2xx webhook response. | ERROR | both | `packages/server/src/services/tools/tool-executor.ts`; `packages/server/src/routes/custom-tools.routes.ts` | `src-tauri/src/commands/storage/custom_tools.rs`; `src/features/runtime/generation/hooks/use-generate.ts`; `src/features/catalog/agents/components/AgentDebugPanel.tsx` | yes | Negative controls should include one should-not-execute script row. | | 13-REGEX-CONTRACT-regex-script | Regex script persisted schema: placement, prompt-only, depth, trim strings, flags, and reorder. | CONTRACT | both | `packages/shared/src/schemas/regex.schema.ts`; `packages/server/src/db/schema/regex-scripts.ts`; `packages/server/src/services/storage/regex-scripts.storage.ts` | `src/engine/contracts/schemas/regex.schema.ts`; `src/features/catalog/agents`; `src/engine/generation/regex-runtime.ts` | yes | Behavior belongs to agents/tools/regex target, not Target 1. | | 13-REGEX-STORAGE-crud-reorder | Regex script CRUD and reorder persist stable ordering and enabled/disabled rows. | STORAGE | both | `packages/server/src/routes/regex-scripts.routes.ts`; `packages/server/src/services/storage/regex-scripts.storage.ts`; `packages/client/src/hooks/use-regex-scripts.ts` | `src/features/catalog/agents/hooks/use-regex-scripts.ts`; generic `storage` collection contract; `src/features/catalog/agents/components/AgentsPanel.tsx` | yes | Refactor has generic storage-backed hooks instead of legacy dedicated Express route. | | 13-REGEX-UI-editor-import-test | Regex UI lists, creates, edits, deletes, reorders, imports JSON/SillyTavern-style rows, validates regex, and tests sample replacements. | UI | both | `packages/client/src/components/panels/AgentsPanel.tsx`; `packages/client/src/components/agents/RegexScriptEditor.tsx` | `src/features/catalog/agents/components/AgentsPanel.tsx`; `src/features/catalog/agents/components/RegexScriptEditor.tsx`; `src/shared/lib/regex-script-import.ts` | yes | Includes full-page detail route state through `regexDetailId`. | | 13-REGEX-COMPAT-st-json-import | SillyTavern-style regex JSON import maps delimited `/pattern/flags`, numeric placements, trim strings, depth, and prompt-only fields into native rows. | COMPAT | both | `packages/client/src/components/panels/AgentsPanel.tsx` | `src/features/catalog/agents/components/AgentsPanel.tsx`; `src/shared/lib/regex-script-import.ts` | yes | Profile/bulk preservation remains Target 20; direct regex import belongs here. | | 13-REGEX-RUNTIME-message-application | Regex scripts apply in order to user input and/or AI output, honor prompt-only and depth, run macros/replacements, trim strings, and avoid changing out-of-scope messages. | RUNTIME | both | `packages/server/src/services/regex/regex-application.ts`; `packages/server/src/routes/generate.routes.ts`; `packages/client/src/hooks/use-apply-regex.ts` | `src/engine/generation/regex-runtime.ts`; `src/engine/generation-core/regex/regex-application.ts`; `src/features/catalog/agents/regex-application.ts`; `src/features/runtime/generation/hooks/use-generate.ts` | yes | Target 12 may check prompt assembly; Target 13 checks regex behavior itself. | | 13-REGEX-ERROR-safety-invalid-timeout | Unsafe, invalid, or expensive regex patterns are rejected or bounded, with visible editor/runtime failure behavior. | ERROR | both | `packages/shared/src/utils/regex-safety.ts`; `packages/shared/src/utils/regex-replacement.ts`; `packages/server/src/services/lorebook/regex-timeout.ts` | `src/engine/shared/regex/regex-safety.ts`; `src/engine/shared/regex/regex-replacement.ts`; `src/engine/generation-core/lorebooks/regex-timeout.ts`; `src/features/catalog/agents/components/RegexScriptEditor.tsx` | yes | Needs positive and should-not-match rows during parityscan. | | 13-KNOWLEDGE-STORAGE-source-files | Knowledge source upload/list/delete/text read stores file metadata and extracted text for agent use. | STORAGE | both | `packages/server/src/routes/knowledge-sources.routes.ts`; `packages/client/src/hooks/use-knowledge-sources.ts` | `src-tauri/src/commands/storage/knowledge.rs`; `src/features/catalog/knowledge/hooks/use-knowledge-sources.ts`; `src/features/catalog/agents/components/AgentEditor.tsx` | yes | Import/export preservation stays Target 20; source CRUD/use is Target 13. | | 13-KNOWLEDGE-UI-source-selection | Knowledge agents expose lorebook/file source selection, upload/delete controls, source coverage hints, semantic top-K, and overlap warning when both knowledge agents are configured. | UI | both | `packages/client/src/components/agents/AgentEditor.tsx`; `packages/client/src/hooks/use-knowledge-sources.ts` | `src/features/catalog/agents/components/AgentEditor.tsx`; `src/features/catalog/knowledge/hooks/use-knowledge-sources.ts` | yes | Includes file source IDs, lorebook source IDs, active chat lorebook toggle, and router entry description coverage. | | 13-KNOWLEDGE-RUNTIME-router-retrieval | Knowledge Retrieval and Knowledge Router build source material/catalogs, select relevant lorebook/file content, and inject results into generation context. | RUNTIME | both | `packages/server/src/services/agents/knowledge-retrieval.ts`; `packages/server/src/services/agents/knowledge-router.ts`; `packages/server/src/routes/generate.routes.ts` | `src/engine/agents-runtime/knowledge/knowledge-retrieval.ts`; `src/engine/agents-runtime/knowledge/knowledge-router.ts`; `src/engine/agents-runtime/pipeline/agent-pipeline.ts`; `src/engine/generation/start-generation.ts` | yes | Needs separate checks for file-backed retrieval vs lorebook-router selection. | | 13-KNOWLEDGE-REMOTE-source-dispatch | Knowledge source list/upload/delete/text commands are exposed through embedded Tauri and hostable HTTP dispatch. | REMOTE | refactor_only | none; legacy uses Express `/api/knowledge-sources` routes | `src-tauri/src/commands/storage/knowledge.rs`; `src-tauri/src/http_dispatch.rs`; `src-tauri/src/lib.rs`; `src/features/catalog/knowledge/hooks/use-knowledge-sources.ts` | yes | Remote upload/text parity can drift because browser `FormData` and Tauri payloads differ. | | 13-KNOWLEDGE-PERF-source-budget | Knowledge agents respect source size, token budget, top-K/router options, and avoid eager large-source injection when no relevant material exists. | PERF | both | `packages/server/src/services/agents/knowledge-retrieval.ts`; `packages/server/src/services/agents/knowledge-router.ts`; `packages/server/scripts/benchmark-knowledge-router.ts` | `src/engine/agents-runtime/knowledge/knowledge-retrieval.ts`; `src/engine/agents-runtime/knowledge/knowledge-router.ts`; `docs/token-budget-estimates.md` | yes | Static inventory only; parityscan can use focused synthetic sources before native QA. | | 13-AGENT-ERROR-empty-response-failures | Empty agent responses, skipped agents, disabled custom agents, missing connections, and runtime failures surface as agent failures rather than silent success. | ERROR | both | `packages/server/src/services/agents/agent-executor.ts`; `packages/server/src/routes/generate.routes.ts`; `packages/client/src/lib/agent-failures.ts` | `src/engine/generation/agent-runner.ts`; `src/engine/agents-runtime/executor/agent-executor.ts`; `src/shared/lib/agent-failures.ts`; `src/features/runtime/generation/hooks/use-generate.ts` | yes | Needed because #1904 notes empty response failures were restored. | ## Coverage Matrix | Surface ID | Status | Proof | Follow-up | | --- | --- | --- | --- | | 13-AGENT-CONTRACT-catalog-defaults-tools | gap | Batch 1 static trace: legacy disables Immersive HTML by default; refactor enables it by default. | #2488 | | 13-AGENT-STORAGE-config-runs-memory | scanned_no_gap_found | Batch 2 static trace: legacy route/storage behavior matched by refactor storage commands, shared API, hooks, run rows, cadence status, and per-chat memory; no issue created. | | | 13-AGENT-UI-catalog-editor | gap | Batch 3 static trace: legacy has By Status enabled/disabled view; refactor category-only. | #2484 | | 13-AGENT-UI-chat-activation | unscanned | not checked | | | 13-AGENT-RUNTIME-settings-bag | gap | Batch 1 static trace: legacy enables Illustrator avatar references only when explicitly set; refactor defaults missing setting to enabled. Other checked settings-bag fields matched direct consumers. | #2489 | | 13-AGENT-RUNTIME-activation-cadence-run-memory | scanned_no_gap_found | Batch 2 static trace: custom activation, run-interval gates, run-row persistence, and Secret Plot memory persistence matched direct legacy behavior; no issue created. | #1889 | | 13-AGENT-RUNTIME-retry-agent-results | gap | Batch 5 static trace: legacy retry streams `agent_result` and applies/persists retry side effects server-side; refactor retry returns batched results to UI and Lorebook Keeper retry/backfill routes through review/apply handling. | #2487 | | 13-AGENT-UI-activity-debug-failures | no_gap | Batch 6 static trace: thought bubbles, continuity checklist surface, debug panel result rows, tool call/result logs, failure state, retry toast path, and failure mapper are present; no issue created. | | | 13-AGENT-UI-injection-review-edit-reroll | no_gap | Batch 7 static trace: review modal, HUD Injections tab, edit/save to message extra, reroll for allowed agents, and KR/Router non-rerollable behavior are present. | | | 13-AGENT-RUNTIME-context-injection-cache | gap | Batch 7 static trace: fresh generation persists `message.extra.contextInjections`, but regeneration does not reload/reuse target cached injections and instead reruns pre-generation agents; edited cache can be ignored or overwritten. | #2491 | | 13-AGENT-RUNTIME-secret-plot-memory | gap | Batch 8 static trace: refactor only exposes Secret Plot memory inside agent prompt state, does not inject legacy hidden arc/directions into the main reply prompt, merges memory across all agents before deriving Secret Plot state, and full reroll cannot clear an explicit null arc. | #2492 | | 13-TOOLS-CONTRACT-custom-tool-positive-shape | no_gap | Batch 9 static trace: supported static/webhook contract, enabled filtering, and model-visible custom tool definitions match legacy positive behavior; script execution remains intentional divergence. | | | 13-TOOLS-STORAGE-custom-tool-crud | no_gap | Batch 9 static trace: CRUD persists enabled flag, name/description, JSON parameters, execution type, webhook URL, static result, and legacy script rows remain preserved enough for review under the documented script boundary. | | | 13-TOOLS-UI-tool-editor-selectability | no_gap | Batch 3 static trace: static/webhook editor present; script rows unsupported per intentional divergence; selectable tools filtered by enabled/capability. | #1907 | | 13-TOOLS-RUNTIME-static-webhook-execution | unscanned | not checked | | | 13-TOOLS-RUNTIME-script-execution-boundary | intentional_divergence | Batch 11 static trace rechecked documented boundary: legacy script rows may persist, but refactor create/update excludes script execution and native execution returns `custom_tool_script_unsupported`. | #1907 | | 13-TOOLS-REMOTE-command-dispatch | unscanned | not checked | | | 13-TOOLS-ERROR-execution-failures | refactor_better | Batch 11 static trace: refactor has typed/actionable errors for unsupported script, unknown type, missing/blocked webhook URL, client/send failure, non-2xx webhook response, response read failure, and oversized response; tool failures are emitted as failed debug tool results. | | | 13-REGEX-CONTRACT-regex-script | no_gap | Batch 13 static trace: legacy persisted regex schema fields matched by refactor schema and generic storage-backed rows; refactor adds scoped `characterId` default without removing legacy placement, prompt-only, depth, trim strings, flags, or order behavior. | | | 13-REGEX-STORAGE-crud-reorder | no_gap | Batch 13 static trace: legacy dedicated CRUD and reorder route behavior matched by refactor generic `regex-scripts` storage hooks, stable order sorting, enabled/disabled row handling, and reorder patches to `order`/`sortOrder`; no issue created. | | | 13-REGEX-UI-editor-import-test | no_gap | Batch 14 static trace: regex panel lists, creates, edits, deletes, reorders, imports JSON/ST-style rows, validates regex, and live-tests sample replacements; refactor matches legacy direct UI behavior. | | | 13-REGEX-COMPAT-st-json-import | no_gap | Batch 14 static trace: direct JSON import maps ST/native name, delimited `/pattern/flags`, numeric placements, disabled/enabled, trim strings, prompt-only, order, and depth fields like legacy. | | | 13-REGEX-RUNTIME-message-application | gap | Batch 15 static trace: legacy applies non-prompt regex once through UI send/display while server prompt application is prompt-only; refactor still uses UI send/display regex and also applies non-prompt regex in generation before persistence, so non-idempotent rows can double-apply. | #2494 | | 13-REGEX-ERROR-safety-invalid-timeout | no_gap | Batch 15 static trace: invalid regex editor/runtime behavior and lorebook regex safety/timeout behavior match legacy; no issue created. | | | 13-KNOWLEDGE-STORAGE-source-files | no_gap | Batch 16 static trace: legacy knowledge-source upload/list/delete/text read matched by refactor Rust storage commands, shared API hook, metadata/file storage, extension validation, newest-first listing, delete, and text extraction; no issue created. | | | 13-KNOWLEDGE-UI-source-selection | no_gap | Batch 16 static trace: legacy AgentEditor source selection matched by refactor chat-active lorebook toggle, fixed lorebook/file selections, upload/delete controls, router description coverage hint, and overlap warning; no issue created. | | | 13-KNOWLEDGE-RUNTIME-router-retrieval | refactor_better | Batch 17 static trace: refactor directly loads scoped lorebook/file source material, runs Knowledge Retrieval/Router outside generic batching, and injects non-empty results; legacy main left helpers unwired through generic pipeline. No issue created. | | | 13-KNOWLEDGE-REMOTE-source-dispatch | no_gap | Batch 18 static trace: knowledge source list/upload/delete/text commands are exposed through shared API, remote allowlist, embedded Tauri command registration, and hostable HTTP dispatch; upload JSON/base64 payload reaches the same Rust knowledge handler as embedded commands. No issue created. | | | 13-KNOWLEDGE-PERF-source-budget | refactor_better | Batch 17 static trace: retrieval trims/short-circuits empty sources, chunks by sourceContextBudget with consolidation preservation; router uses semanticTopK, keyword fallback, no-input short-circuit, selected-only injection, and 400-candidate cap. No issue created. | | | 13-AGENT-ERROR-empty-response-failures | gap | Batch 6 static trace: empty responses and dangling connections surface as failures, but active/requested disabled custom agents are filtered before a failed AgentResult is emitted. | #2490 | ## Follow-Ups | Issue | State | Why it matters | | --- | --- | --- | | #1889 | CLOSED | Restored custom agent activation settings schema contract. | | #1899 | CLOSED | Accepted unset agent temperature default divergence. | | #1907 | CLOSED | Documented and enforced disabled script custom tool execution. | | #2491 | OPEN | Restores regeneration reuse of cached prompt injections from `message.extra.contextInjections`. | | #2494 | OPEN | Restores single-pass non-prompt regex application for `13-REGEX-RUNTIME-message-application`. | ## Refactor-Better Or Intentional Divergence - Legacy `script` / `scriptBody` custom tool execution is intentionally disabled. - Unset agent temperature default divergence is documented and accepted. ## Rescan Criteria - Run agents/tools/regex/knowledge parityscan on current `refactor`. - Include enabled/disabled agents, custom agents, built-in defaults, chat activation UI, retry/rerun flows, injection review/editing, tool calls, static/webhook/script-boundary custom tools, regex CRUD/import/reorder/application/safety, agent memory/runs/debug/failures, knowledge source CRUD, knowledge router/retrieval, remote dispatch, and intentional divergences.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1225
No description provided.