LifeOSHooks: `promptSubmit` puts its composed context on the result after `next()`, which the engine does not attach, so memory, nudges and the ORIGIN warning never reach the model
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- ai-infra-agents, tooling
Direzione di ricerca
Inizia in skills/LifeOSHooks/hooks/LifeOSHooks.ts a promptSubmit: nota dove viene costruita ogni voce di contesto rispetto a dove viene atteso next(), e leggi le dichiarazioni PromptSubmitInput.context / PromptSubmitResult.context che cita per confermare il percorso discendente supportato. Sposta le voci FAST-TOGGLE e ORIGIN nell’array passato tramite next({ ...input, context }), mantieni scheduleFast e l’ack di memoria dopo un next() accettato, e restituisci il risultato invariato. Fatto significa che un prompt live mostra la linea temporale, il blocco di memoria e la riga ORIGIN: nel contesto del modello. Controlla la correzione di #2608 prima di iniziare e tratta il secondo problema, legato al fallback, come follow-up anziché come parte di questa modifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What. skills/LifeOSHooks/hooks/LifeOSHooks.ts promptSubmit builds its per-turn entries before next() (the time line, then the prompt-context bridge reply: the memory hot layer, AlgorithmNudge, VersionDrift, DriftReminder, ModelDriftGuard, PresenceContext). After next(input) resolves, it appends the FAST-TOGGLE and ORIGIN lines and returns { ...r, context }.
The client's own plugin declarations (PromptSubmitResult.context, as written by 2.1.322) say:
A hook attaches context on the way down; one put here after
nextresolved is not attached (the prompt had entered), and is logged.
PromptSubmitInput.context gives the supported form: next({ ...e, context: [...(e.context ?? []), mine] }).
What happens. None of the plugin's prompt context reaches the model. In one live session, no time line, memory block or ORIGIN: line appeared in the model's context on any prompt, including prompts the plugin logged with origin task-notification. Context from native command hooks (a PostToolUse additionalContext) did arrive in the same session. Because native MemoryTurnStart exits early in an armed session, an armed session gets no hot memory at all.
The ORIGIN line is the warning that a prompt did not come from the principal and carries no authority. It is lost the same way.
Suggested fix. Build every entry before next() and pass it down, then return the result unchanged. Keep the side effects that need an accepted prompt (scheduleFast, the memory ack) after next():
const context = [...mine];
const bare = e.origin.kind === "composer" && !e.command && !e.isMeta ? bareFast(input.text) : null;
if (bare) context.push(`FAST-TOGGLE: ...`);
if (!PRINCIPAL_ORIGINS.has(e.origin.kind)) context.push(`ORIGIN: ...`);
const r = await next(context.length ? { ...input, context: [...(input.context ?? []), ...context] } : input);
if (r.drop !== undefined) return r;
if (bare) scheduleFast($, s, bare, "bare");
// memory ack, unchanged
return r;
Related. The memory ack in the same hook depends on this. It marks chunks consumed after next(), but those chunks were never attached, so the ack confirmed deliveries that hadn't happened. #2608 (closed, fixed for the next release) moves the ack after an accepted next() and carries the emission id back from prompt-context; its note does not say whether the context itself moved before next(). If that fix already passes the entries down through next(), this issue is covered and can be closed.
A second issue that shows up once context is delivered. When one composer inside prompt-context throws, the bridge withdraws the prompt-context cap and the native command hooks run for that prompt as well, so that turn carries some entries twice. Dropping the plugin's entries in that case doesn't fix it cleanly. Native TimeContext and VersionDrift are registered async: true, so their output arrives a turn late (and TimeContext falls back to UTC when no timezone is configured). VersionDrift has also already started its cooldown during the bridge's run, so its warning would be lost. PromptProcessing and SatisfactionCapture run in the bridge before coverage is decided, so their model request and rating pulse repeat natively either way. A fallback that is equivalent to the bridge would let the bridge report which composers failed, so that only those fall back to their native hooks.
- Lingua principale
- TypeScript
- Stelle
- 19.8k
- Fork
- 2.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di danielmiessler/LifeOS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
danielmiessler/LifeOS#2830 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
danielmiessler/LifeOS#2824 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
danielmiessler/LifeOS#2818 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#2817 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
danielmiessler/LifeOS#2808 ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di danielmiessler/LifeOS
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tintinweb/pi-subagents#459 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
freshframework/fresh#3920 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area: client enhancement priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
opensro-dev/opensro#3681 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno