refactor(agent-loop): start waking work directly

This commit is contained in:
_Kerman
2026-08-04 21:02:28 +08:00
parent 674278cb17
commit e50c4aca03
23 files changed
+103 -105

No files matched your search

+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/core-data-structures/core.md
core.md: d31d07556d9cb7fd47d9dd5bd5617821bcb10482
core.zh.md: d1773fd8991e99321149acb727669e8f0cde8d00
core.md: ea5900ba4271869d3fef1c9d1014f26a166b4418
core.zh.md: f6f5295a66633b181b0791f839d3014e245c4eb3
+6 -6
View File
@@ -537,9 +537,9 @@ interface Agent {
/**
* Resolve after the current whole-agent activity reaches quiescence. This
* follows replacement work scheduled before the observed driver retires,
* follows replacement work started before the observed driver retires,
* but does not identify the settlement of any particular message.
* @returns fulfillment after no scheduled or active driver remains.
* @returns fulfillment after no active driver or maintenance task remains.
*/
whenIdle(): Promise<void>
@@ -571,8 +571,8 @@ interface Agent {
followup(message: UserMessage): void
/**
* Submit steering for the nearest step. An idle driver schedules a turn;
* collecting and running drivers consume it at their next step boundary.
* Submit steering for the nearest step. An idle driver starts a turn;
* a running driver consumes it at its next step boundary.
* A rejected step leaves steering parked in the inbox until the next
* wake; cancellation or disposal may discard pending steering.
* @param message - identified steering content and its producer provenance.
@@ -581,8 +581,8 @@ interface Agent {
/**
* Queue model-facing context for the next pre-step without waking the
* driver. Collecting and running drivers claim it at the nearest later
* step boundary; idle drivers leave it pending until follow-up or steering
* driver. A running driver claims it at the nearest later step boundary;
* idle drivers leave it pending until follow-up or steering
* wakes them. It may miss a request whose pre-step already claimed its
* batch. Cancellation or disposal may discard pending context.
* @param message - identified injected context and its producer provenance.
+6 -6
View File
@@ -545,9 +545,9 @@ interface Agent {
/**
* Resolve after the current whole-agent activity reaches quiescence. This
* follows replacement work scheduled before the observed driver retires,
* follows replacement work started before the observed driver retires,
* but does not identify the settlement of any particular message.
* @returns fulfillment after no scheduled or active driver remains.
* @returns fulfillment after no active driver or maintenance task remains.
*/
whenIdle(): Promise<void>
@@ -579,8 +579,8 @@ interface Agent {
followup(message: UserMessage): void
/**
* Submit steering for the nearest step. An idle driver schedules a turn;
* collecting and running drivers consume it at their next step boundary.
* Submit steering for the nearest step. An idle driver starts a turn;
* a running driver consumes it at its next step boundary.
* A rejected step leaves steering parked in the inbox until the next
* wake; cancellation or disposal may discard pending steering.
* @param message - identified steering content and its producer provenance.
@@ -589,8 +589,8 @@ interface Agent {
/**
* Queue model-facing context for the next pre-step without waking the
* driver. Collecting and running drivers claim it at the nearest later
* step boundary; idle drivers leave it pending until follow-up or steering
* driver. A running driver claims it at the nearest later step boundary;
* idle drivers leave it pending until follow-up or steering
* wakes them. It may miss a request whose pre-step already claimed its
* batch. Cancellation or disposal may discard pending context.
* @param message - identified injected context and its producer provenance.