Teknium
6ec9d85795
feat: retain a safety-refused turn for display, still hidden from the model
...
Replace the durable ERASE of a content-policy-refused turn with a RETAIN-for-display:
the whole refused turn (user row + any tool rounds + the refusal) still leaves the
MODEL's context exactly as /undo does — so the deterministic safety filter can't
re-trip and lock the chat — but the user's own message now STAYS VISIBLE in the chat
surfaces as a greyed "refused, try a different query" block that survives a close+reopen.
Teknium's directive: wipe the refused turn forward out of the model conversation, but
keep showing it in the surfaces (Desktop primary, then CLI/TUI), collapsing the raw tool
actions + refusal detail into a short notice.
Mechanism (verified via the store's own model vs display reads): the refused turn head
(the user row) is kept in the DISPLAY projection as active=0, compacted=1 — the same way
compaction-archived rows stay visible — and tagged display_kind='content_refused' with a
stored CONTENT_REFUSED_NOTICE; the tool rounds + refusal stay soft-deleted (removed) so
only one greyed notice renders. The model read is active=1, so it sees none of it.
- agent/turn_failure_copy.py: CONTENT_REFUSED_DISPLAY_KIND / _NOTICE / _METADATA_KEY.
- hermes_state_rewind.py: SessionDB.retain_refused_turn_for_display (reuses the /undo
rewind for the model side, then re-surfaces + tags the user row); the owner helper
retain_refused_turn_for_display replaces erase_refused_turn_from_transcript.
- gateway/session_transcript.py + run_turn_persistence.py: async-store retain + owner call.
- hermes_cli/cli_chat_turn_mixin.py, acp_adapter/server.py: call the retain helper.
Tests (red on base — base full-rewind drops the ask from the display read): the refused
turn leaves the model but stays in the display tagged content_refused, survives a
simulated reopen, and the best-effort no-ops. Existing ACP + gateway model-exclusion
tests stay green (active-only reads unchanged).
2026-11-05 22:23:44 -08:00
..
2026-11-04 21:30:14 -08:00
2026-10-30 05:54:35 -07:00
2026-11-04 13:26:30 -08:00
2026-11-01 10:14:58 -08:00
2026-10-30 13:46:07 -04:00
2026-10-25 19:00:01 -07:00
2026-10-25 05:45:51 -07:00
2026-10-29 16:58:09 +05:30
2026-10-22 13:50:10 -07:00
2026-10-26 00:32:19 -07:00
2026-10-18 18:47:43 -07:00
2026-10-25 22:55:11 -07:00
2026-10-25 18:23:40 -07:00
2026-10-25 03:01:26 -07:00
2026-11-05 19:55:33 -06:00
2026-11-05 19:55:33 -06:00
2026-11-05 12:09:34 +01:00
2026-11-02 20:21:36 -05:00
2026-10-28 19:21:51 -07:00
2026-10-31 22:06:50 -07:00
2026-10-18 18:47:43 -07:00
2026-11-01 21:53:36 -08:00
2026-10-28 21:22:10 -07:00
2026-10-24 19:56:21 -07:00
2026-11-02 00:18:00 +05:30
2026-10-16 15:21:07 -04:00
2026-10-28 21:22:10 -07:00
2026-10-16 15:21:07 -04:00
2026-11-05 12:09:34 +01:00
2026-10-17 07:23:06 -07:00
2026-11-05 08:18:19 -05:00
2026-11-04 12:56:04 -05:00
2026-10-20 21:04:30 -04:00
2026-10-20 21:04:30 -04:00
2026-11-04 21:01:10 -08:00
2026-10-28 19:00:07 -07:00
2026-10-28 19:00:07 -07:00
2026-10-23 01:41:24 -07:00
2026-10-23 01:41:24 -07:00
2026-11-01 21:53:36 -08:00
2026-10-21 23:05:11 -04:00
2026-10-25 18:20:23 -07:00
2026-11-05 12:09:34 +01:00
2026-10-16 15:21:07 -04:00
2026-10-31 22:44:47 -07:00
2026-10-28 19:51:15 -07:00
2026-10-25 22:22:47 -07:00
2026-10-27 11:49:40 -07:00
2026-11-02 15:06:27 -05:00
2026-10-17 07:23:06 -07:00
2026-10-18 02:31:09 -07:00
2026-11-04 21:01:10 -08:00
2026-10-20 18:08:50 +05:30
2026-10-25 11:35:06 -04:00
2026-11-04 21:31:47 -08:00
2026-11-05 19:55:33 -06:00
2026-10-31 22:59:20 -07:00
2026-10-16 14:18:50 -07:00
2026-10-28 20:39:24 -07:00
2026-10-25 22:55:11 -07:00
2026-10-28 20:39:24 -07:00
2026-11-05 17:59:21 -05:00
2026-11-04 12:56:04 -05:00
2026-11-04 12:56:04 -05:00
2026-11-05 18:27:13 -05:00
2026-11-05 19:55:33 -06:00
2026-10-16 15:21:07 -04:00
2026-11-05 12:09:34 +01:00
2026-10-20 15:08:00 +05:30
2026-10-25 22:55:11 -07:00
2026-10-18 19:44:32 -04:00
2026-11-05 12:09:34 +01:00
2026-11-05 22:23:44 -08:00
2026-10-25 22:22:43 -07:00
2026-11-02 06:57:53 -08:00
2026-10-21 23:05:11 -04:00
2026-11-02 06:57:53 -08:00
2026-10-17 07:23:06 -07:00
2026-10-25 18:04:13 -07:00
2026-10-22 14:34:55 -07:00
2026-11-05 19:55:33 -06:00
2026-10-17 13:29:00 -04:00
2026-10-27 16:30:14 +05:30
2026-11-05 15:44:58 -05:00
2026-10-25 11:34:11 -04:00
2026-11-05 15:44:58 -05:00
2026-10-23 00:37:14 -07:00
2026-10-31 23:05:03 -07:00
2026-11-04 21:47:30 -08:00
2026-10-30 08:02:40 -07:00
2026-11-02 15:06:27 -05:00
2026-10-29 22:21:46 -04:00
2026-11-04 21:47:30 -08:00
2026-10-25 06:18:48 -07:00
2026-11-01 18:12:56 +05:30
2026-11-01 18:12:56 +05:30
2026-11-01 18:12:56 +05:30
2026-10-16 14:21:39 -07:00
2026-10-20 12:30:50 -07:00
2026-10-16 14:36:03 -07:00
2026-11-04 08:01:12 -08:00
2026-10-19 00:03:16 -07:00
2026-10-23 01:41:24 -07:00
2026-11-02 19:08:46 -05:00
2026-10-25 03:00:43 -07:00
2026-10-16 15:21:07 -04:00
2026-10-25 19:25:17 -04:00
2026-10-17 13:28:18 -04:00
2026-10-17 13:28:18 -04:00
2026-10-19 19:15:44 +05:30
2026-11-05 19:55:33 -06:00
2026-11-05 13:08:14 +05:30
2026-10-31 22:59:20 -07:00
2026-11-04 21:25:44 -08:00
2026-10-18 19:44:32 -04:00
2026-10-27 12:57:09 -07:00
2026-10-28 07:23:10 -07:00
2026-10-16 15:21:07 -04:00
2026-11-01 21:53:36 -08:00
2026-11-01 22:27:58 -08:00
2026-11-04 12:56:04 -05:00
2026-10-28 07:23:10 -07:00
2026-10-25 18:20:23 -07:00
2026-10-28 21:24:43 -07:00
2026-10-22 13:43:01 +05:30
2026-10-22 11:22:12 -07:00
2026-10-24 17:31:52 -07:00
2026-10-27 16:30:14 +05:30
2026-11-01 22:07:56 -08:00
2026-10-22 14:34:55 -07:00
2026-10-22 13:50:10 -07:00
2026-10-26 00:10:23 -07:00
2026-10-17 13:29:00 -04:00
2026-10-18 22:47:12 -04:00
2026-10-27 12:57:09 -07:00
2026-10-17 04:23:13 -07:00
2026-10-28 19:30:48 -07:00
2026-10-26 01:34:59 -07:00
2026-10-20 22:18:49 -04:00
2026-10-25 22:22:47 -07:00
2026-10-25 22:22:48 -07:00
2026-11-05 04:05:45 -08:00
2026-11-05 08:40:28 -08:00
2026-11-01 22:07:56 -08:00
2026-11-05 12:09:34 +01:00
2026-10-20 03:22:11 -07:00
2026-10-18 19:44:32 -04:00
2026-10-31 22:59:20 -07:00
2026-10-28 17:06:43 +05:30
2026-10-25 22:28:34 -07:00
2026-10-16 17:49:54 -04:00
2026-10-27 11:49:40 -07:00
2026-11-02 15:06:27 -05:00
2026-11-02 19:05:11 -05:00
2026-10-26 00:32:14 -07:00
2026-10-24 19:56:21 -07:00
2026-10-24 19:56:21 -07:00
2026-11-01 21:53:36 -08:00
2026-11-02 19:08:46 -05:00
2026-10-24 17:11:13 -07:00
2026-10-16 15:21:07 -04:00
2026-10-18 06:04:35 +05:30
2026-10-26 00:32:14 -07:00
2026-10-25 06:18:48 -07:00
2026-10-31 22:44:47 -07:00
2026-10-31 22:44:47 -07:00
2026-10-24 17:31:52 -07:00
2026-10-17 04:23:31 -07:00
2026-10-22 05:26:10 -07:00
2026-10-22 05:26:10 -07:00
2026-11-04 13:38:09 -08:00
2026-10-31 22:06:50 -07:00
2026-11-02 14:54:42 -08:00
2026-10-22 12:49:48 -07:00
2026-10-20 04:41:58 -07:00
2026-10-22 12:49:48 -07:00
2026-10-27 11:49:40 -07:00
2026-10-25 18:20:23 -07:00
2026-10-26 01:30:54 -07:00
2026-10-26 00:32:11 -07:00
2026-11-04 21:01:10 -08:00
2026-11-04 21:01:10 -08:00
2026-10-28 19:29:23 -07:00
2026-11-02 18:53:39 -08:00
2026-11-05 22:23:44 -08:00
2026-11-05 22:23:44 -08:00
2026-10-28 19:29:23 -07:00
2026-10-31 22:59:20 -07:00
2026-11-04 21:26:16 -08:00
2026-11-05 19:55:33 -06:00
2026-11-05 22:23:44 -08:00
2026-10-16 14:21:39 -07:00
2026-10-27 11:49:40 -07:00
2026-10-25 18:04:13 -07:00
2026-10-25 06:18:48 -07:00
2026-10-25 22:55:11 -07:00
2026-11-05 22:23:44 -08:00
2026-10-21 23:05:11 -04:00
2026-11-04 21:26:48 -08:00
2026-10-25 05:32:43 -07:00
2026-10-25 05:45:51 -07:00
2026-10-28 19:00:07 -07:00
2026-10-25 05:45:51 -07:00
2026-10-24 18:48:01 -07:00
2026-10-24 18:48:01 -07:00
2026-10-17 07:23:06 -07:00
2026-10-23 21:27:08 +02:00