per-turn reminder: turn-composition protocol as its own system chunk after every GM turn, one live copy elided like the papers; handbook cut follows (short turns)
This commit is contained in:
+20
-2
@@ -234,6 +234,19 @@ function renderTranscript(entries) {
|
||||
continue;
|
||||
}
|
||||
flushBundle();
|
||||
if (e.t === 'msg' && e.reminder) {
|
||||
// the turn reminder: the transcript mirrors the live-context
|
||||
// policy — one collapsed card for the newest copy, superseded
|
||||
// ones elide (the log keeps every as-sent chunk)
|
||||
const newest = [...entries].reverse().find((x) => x.reminder);
|
||||
if (e === newest) {
|
||||
const d = el('details', 'bundle');
|
||||
d.appendChild(el('summary', null, 'turn reminder — rides every GM turn'));
|
||||
d.appendChild(el('pre', null, e.m.content));
|
||||
t.appendChild(d);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (e.t === 'msg') {
|
||||
if (e.m.role === 'user' && e.conflictOnly) {
|
||||
// the self-heal message: error traffic on its own, never GM prose
|
||||
@@ -653,6 +666,7 @@ async function saveModels(playerSel, housekeeperSel, stateEl) {
|
||||
const EDIT_LIST = [
|
||||
{ name: 'system.md', mode: 'ro', source: 'repo' },
|
||||
{ name: 'invariants.md', mode: 'ro', source: 'repo' },
|
||||
{ name: 'reminder.md', mode: 'ro', source: 'repo' }, // rides every turn as its own system chunk
|
||||
{ name: 'handbook.md', mode: 'rw', source: 'run' },
|
||||
{ name: 'backdrop.md', mode: 'rw', source: 'run' },
|
||||
{ name: 'character.md', mode: 'rw', source: 'run' },
|
||||
@@ -666,7 +680,7 @@ const EDIT_LIST = [
|
||||
// file (repo-fed or run copy) becomes a fillable input in setup
|
||||
function scanVars(prompts, files) {
|
||||
const texts = [
|
||||
prompts.system, prompts.invariants,
|
||||
prompts.system, prompts.invariants, prompts.reminder,
|
||||
files['handbook.md']?.content,
|
||||
files['backdrop.md']?.content, files['character.md']?.content, files['turn-0.md']?.content,
|
||||
];
|
||||
@@ -717,7 +731,11 @@ async function viewSetup(id, seq) {
|
||||
if (detail.run.owner !== state.me.id) return navigate(`/runs/${id}`); // not yours: read-only — fork to edit
|
||||
|
||||
state.files = files.files;
|
||||
state.repoPrompts = { 'system.md': prompts.system, 'invariants.md': prompts.invariants };
|
||||
state.repoPrompts = {
|
||||
'system.md': prompts.system ?? '',
|
||||
'invariants.md': prompts.invariants ?? '',
|
||||
'reminder.md': prompts.reminder ?? '',
|
||||
};
|
||||
$('setup-title').textContent = detail.display;
|
||||
$('setup-state').textContent = `${detail.run.package} · ${id} — draft; edits land when the window opens`;
|
||||
$('setup-start').disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user