This commit is contained in:
ZacharyZhang-NY committed 2026-04-22 13:19:43 -04:00
1 parent aba2dac3c5
commit dffeccf3e2
17 files changed
+1296 -120

No files matched your search

+18
View File
@@ -45,6 +45,20 @@ export interface PromptContext {
companySkillCatalog?: Array<{ name: string; slug: string; description: string | null }>;
/** Company workspaces visible to the current run. */
companyWorkspaces?: Array<{ name: string; localPath: string }>;
/**
* Pending-skip context from the heartbeat scheduler. Present only
* when the scheduler most recently refused to dispatch this agent
* (e.g. worker not ready, cooldown). Surfacing it into the system
* prompt is the reader half of the scheduler-side write — without
* it, a multi-day skip streak would be invisible to the agent even
* though `runtime_state_json.heartbeatSkip` tracks it precisely.
*/
heartbeatSkip?: {
reason: string;
streak: number;
since: string;
lastTickAt: string;
} | null;
}
export function buildTaskPrompt(ctx: PromptContext): string {
@@ -69,6 +83,10 @@ export function buildTaskPrompt(ctx: PromptContext): string {
parts.push(`\n${m.wakeReasonHeading}\n${explanation}\n`);
}
if (ctx.heartbeatSkip) {
parts.push(`\n${m.heartbeatSkipSection(ctx.heartbeatSkip)}`);
}
parts.push(`\n${m.timeAwarenessSection}`);
// Taskless runs used to emit a "respond with a brief status summary"