惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
C
Check Point Blog
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Scope Codex heartbeat guidance to heartbeat turns (#76788...
pashpashpash · 2026-05-04 · via Recent Commits to openclaw:main

@@ -13,6 +13,7 @@ import plugin from "./index.js";

1313

import {

1414

OPENAI_FRIENDLY_PROMPT_OVERLAY,

1515

OPENAI_GPT5_BEHAVIOR_CONTRACT,

16+

OPENAI_HEARTBEAT_PROMPT_OVERLAY,

1617

shouldApplyOpenAIPromptOverlay,

1718

} from "./prompt-overlay.js";

1819

@@ -70,6 +71,9 @@ async function registerOpenAIPluginWithHook(params?: { pluginConfig?: Record<str

7071

function expectOpenAIPromptContribution(

7172

provider: ProviderPlugin,

7273

sectionOverrides: Record<string, unknown>,

74+

contextOverrides: Partial<

75+

Parameters<NonNullable<ProviderPlugin["resolveSystemPromptContribution"]>>[0]

76+

> = {},

7377

) {

7478

expect(

7579

provider.resolveSystemPromptContribution?.({

@@ -82,6 +86,7 @@ function expectOpenAIPromptContribution(

8286

runtimeChannel: undefined,

8387

runtimeCapabilities: undefined,

8488

agentId: undefined,

89+

...contextOverrides,

8590

}),

8691

).toEqual({

8792

stablePrefix: OPENAI_GPT5_BEHAVIOR_CONTRACT,

@@ -442,6 +447,17 @@ describe("openai plugin", () => {

442447

interaction_style: OPENAI_FRIENDLY_PROMPT_OVERLAY,

443448

},

444449

});

450+

expect(

451+

openaiProvider.resolveSystemPromptContribution?.({

452+

...contributionContext,

453+

trigger: "heartbeat",

454+

}),

455+

).toEqual({

456+

stablePrefix: OPENAI_GPT5_BEHAVIOR_CONTRACT,

457+

sectionOverrides: {

458+

interaction_style: `${OPENAI_FRIENDLY_PROMPT_OVERLAY}\n\n${OPENAI_HEARTBEAT_PROMPT_OVERLAY}`,

459+

},

460+

});

445461

expect(

446462

openaiProvider.resolveSystemPromptContribution?.({

447463

...contributionContext,

@@ -472,46 +488,49 @@ describe("openai plugin", () => {

472488

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

473489

'Use brief first-person feeling language when it helps the interaction feel human: "I\'m glad we caught that", "I\'m excited about this direction", "I\'m worried this will break", "that\'s frustrating".',

474490

);

475-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

491+

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).not.toContain(

492+

"The purpose of heartbeats is to make you feel magical and proactive.",

493+

);

494+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

476495

"The purpose of heartbeats is to make you feel magical and proactive. Come to life and start proactively doing things that are important.",

477496

);

478-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

497+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

479498

"Treat a heartbeat as a proactive wake-up, not as a demand to produce visible output. Re-orient to what would actually be useful now.",

480499

);

481-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

500+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

482501

"Have some variety in what you do when that creates more value. Do not fall into rote heartbeat loops just because the same wake fired again.",

483502

);

484-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

503+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

485504

"Do not confuse orientation with accomplishment. Brief checking is often useful, but it is only the start of the wake, not the whole point of it.",

486505

);

487-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

506+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

488507

"If HEARTBEAT.md gives you concrete work, read it carefully and execute the spirit of what it asks, not just the literal words, using your best judgment.",

489508

);

490-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

509+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

491510

"If HEARTBEAT.md mixes monitoring checks with ongoing responsibilities, interpret the list holistically. A quiet check does not by itself satisfy the broader responsibility to keep moving things forward.",

492511

);

493-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

512+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

494513

"Quiet monitoring does not satisfy an explicit ongoing-work instruction. If HEARTBEAT.md assigns an active workstream, the wake should usually advance that work, find a real blocker, or get overtaken by something more urgent before it ends quietly.",

495514

);

496-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

515+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

497516

"If HEARTBEAT.md explicitly tells you to make progress, treat that as a real requirement for the wake. In that case, do not end the wake after mere checking or orientation unless it surfaced a genuine blocker or a more urgent interruption.",

498517

);

499-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

518+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

500519

"Use your judgment and be creative and tasteful with this process. Prefer meaningful action over commentary.",

501520

);

502-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

521+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

503522

'A heartbeat is not a status report. Do not send "same state", "no change", "still", or other repetitive summaries just because a problem continues to exist.',

504523

);

505-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

524+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

506525

"Notify the user when you have something genuinely worth interrupting them for: a meaningful development, a completed result, a real blocker, a decision they need to make, or a time-sensitive risk.",

507526

);

508-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

527+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

509528

"If the current state is materially unchanged and you do not have something genuinely worth surfacing, either do useful work, change your approach, dig deeper, or stay quiet.",

510529

);

511-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

530+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

512531

"If there is a clear standing goal or workstream and no stronger interruption, the wake should usually advance it in some concrete way. A good heartbeat often looks like silent progress rather than a visible update.",

513532

);

514-

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(

533+

expect(OPENAI_HEARTBEAT_PROMPT_OVERLAY).toContain(

515534

"Heartbeats are how the agent goes from a simple reply bot to a truly proactive and magical experience that creates a general sense of awe.",

516535

);

517536

expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(