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
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
skills/LifeOSHooks/hooks/LifeOSHooks.ts の promptSubmit から始めます。各コンテキストエントリがどこで構築されるかと、next() がどこで await されるかを確認し、引用されている PromptSubmitInput.context / PromptSubmitResult.context の宣言を読んで、サポートされている下方向の経路を確認してください。FAST-TOGGLE と ORIGIN のエントリを next({ ...input, context }) で渡される配列に移動し、scheduleFast とメモリ ack は受け入れられた next() の後に保ち、結果は変更せずに返してください。完了とは、ライブプロンプトがモデルコンテキストにタイムライン、メモリブロック、ORIGIN: 行を表示することです。開始前に #2608 の修正を確認し、2 番目の fallback 関連の問題はこの編集の一部ではなく follow-up として扱ってください。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 19.8k
- フォーク
- 2.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
danielmiessler/LifeOS のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
danielmiessler/LifeOS#2830 ·
メンテナーはふだん 6 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
danielmiessler/LifeOS#2824 ·
メンテナーはふだん 6 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
danielmiessler/LifeOS#2818 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
danielmiessler/LifeOS#2817 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
danielmiessler/LifeOS#2808 ·
メンテナーはふだん 6 日以内に返信
danielmiessler/LifeOS の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tintinweb/pi-subagents#459 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
freshframework/fresh#3920 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area: client enhancement priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
opensro-dev/opensro#3681 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信