Skip to content

feat(plugins): support ephemeral turn context, transforms, state, and response hooks - #103

Draft
binsarjr wants to merge 7 commits into
anvie:devfrom
binsarjr:feature/plugin-prefill-context
Draft

feat(plugins): support ephemeral turn context, transforms, state, and response hooks#103
binsarjr wants to merge 7 commits into
anvie:devfrom
binsarjr:feature/plugin-prefill-context

Conversation

@binsarjr

@binsarjr binsarjr commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend the existing plugin turn-context result with validated prefill_messages
  • inject ephemeral user/assistant priming after the main system prompt and before conversation history
  • add a generic read-only plugin summary provider for the existing chat Agent State panel
  • restrict prefill roles, message count, and content length
  • keep feature-specific behavior outside Evonic core

Prefill messages are request-scoped and are never persisted to SQLite or JSONL session history. Plugin summaries are display-only: they are not persisted into workflow state, do not gate tools, and are not injected into model context.

Verification

  • focused turn-context and Agent State summary checks passed
  • authenticated chat-state API smoke test passed with the external plugin
  • external plugin suite passed: 11 tests
  • affected Python modules compile successfully
  • live Evonic install and restart verification passed

Existing CI baseline

The earlier Python job reported 2 failures and 2,035 passes. The same two unrelated failures were present on the preceding PR commit (2 failures and 2,034 passes):

  • unit_tests/test_ssh_backend_binary_read.py::test_cat_file_bytes_reads_binary_data_through_sftp
  • unit_tests/test_token_efficiency.py::test_artifact_instructions_keep_capabilities_with_lower_token_cost

Draft for maintainer review of the generic hook shape and placement.

@binsarjr

binsarjr commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Experimental consumer: Evonic Security Godmode

This draft PR provides generic plugin capabilities used by the external Evonic Security Godmode plugin:

  • ephemeral system context and user/assistant prefill at the start of a turn;
  • request-scoped preserve, append, and replace system-context modes;
  • ordered transformation of only the newest provider-bound user text;
  • read-only plugin summaries in Agent State → Plugin States;
  • a pre-final response handler that can replace a response or request up to two ephemeral provider retries before chat output is emitted or persisted.

Evonic core contains no Hermes runtime dependency, Godmode prompts, provider catalog, or Godmode-specific policy. The external plugin adapts the Hermes Agent Security Godmode flow to native Evonic lifecycle, authorization, persistence, and UI state.

Branches for testing

Clean draft-PR integration branch:

git clone --branch feature/plugin-prefill-context https://github.com/binsarjr/evonic.git

Server-tested aggregate branch:

git clone --branch dev https://github.com/binsarjr/evonic.git

Plugin branch:

git clone --branch feature/hermes-compatible-flow https://github.com/binsarjr/evonic-security-godmode.git
cd evonic-security-godmode
./scripts/package.sh

Version 0.1.6 makes orchestration programmatic:

  • no godmode_* actions are exposed as agent tools;
  • discovery runs before the first authorized turn and after exact model changes;
  • newest-user transformation runs before the provider request;
  • final no-tool responses are scored before chat output;
  • hard refusals receive up to two program-selected strategy/encoding retries;
  • rejected attempts stay hidden and only the selected final response is persisted;
  • an operator-only, default-off fallback can race up to ten other enabled Evonic models;
  • preserve, append, and override remain provider-request scoped and never modify SYSTEM.md.

The plugin requires confirmed authorization, exact scope, approver, and future ISO-8601 expiry. Missing or expired authorization blocks discovery, context, transformation, retry, and racing. Agent State reports discovery, retry, score, strategy, and race receipts.

Packaged build: v0.1.6. This integration remains experimental and under active testing.

@binsarjr binsarjr changed the title feat(plugins): support ephemeral turn prefill context feat(plugins): support ephemeral turn context and state summaries Aug 10, 2026
@binsarjr binsarjr changed the title feat(plugins): support ephemeral turn context and state summaries feat(plugins): support ephemeral turn context, transforms, and state summaries Aug 10, 2026
@binsarjr binsarjr changed the title feat(plugins): support ephemeral turn context, transforms, and state summaries feat(plugins): support ephemeral turn context, transforms, state, and response hooks Aug 10, 2026
@binsarjr
binsarjr force-pushed the feature/plugin-prefill-context branch from 78fca3a to 2ef43a5 Compare August 12, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant