fix(subagent): publish inherited policy facts to telemetry
Inherited sandbox and approval events were part of the constructor seed. Session.firstLiveSeq classifies every constructor event as replayed history, so telemetry adoption skipped these child-only creation facts even though no parent or prior process had exported them. Capture the parent overrides at the same synchronous delegation boundary, but append the events during the child factory setup while the session is still unpublished. They remain ordered after fork history, persist with the first child batch, and retain last-event-wins behavior while landing on the live side of the telemetry boundary. This uses the existing setup and session append contracts instead of adding another seed category or telemetry special case. Add regression coverage for exporting an unpublished suffix without re-exporting constructor history, assert the spawn and fork firstLiveSeq boundaries, and restore the public seed documentation to replay/fork history only.
This commit is contained in:
@@ -63,12 +63,11 @@ export interface CreateAgentOptions {
|
||||
readonly delegationDepth?: number
|
||||
}
|
||||
/**
|
||||
* Initial session events. A fork starts with a balanced completed-turn
|
||||
* prefix of the parent's log; creation-time log facts may follow that
|
||||
* prefix. The complete seed must be contiguous from seq 0, carry only
|
||||
* lossless-JSON data, and contain no open turn/step or dangling tool call.
|
||||
* The factory passes it to the session's durable validator/snapshot
|
||||
* boundary before publication.
|
||||
* Initial replay/fork history. A fork supplies a balanced completed-turn
|
||||
* prefix of the parent's log. The complete seed must be contiguous from seq
|
||||
* 0, carry only lossless-JSON data, and contain no open turn/step or dangling
|
||||
* tool call. The factory passes it to the session's durable
|
||||
* validator/snapshot boundary before publication.
|
||||
*/
|
||||
readonly seed?: readonly SessionEvent[]
|
||||
/** Per-agent options (model, …). */
|
||||
|
||||
Reference in New Issue
Block a user