@@ -582,18 +582,44 @@ The runtime responds:
582582 "type" : " job.subscribed" ,
583583 "session_id" : " sess_..." ,
584584 "payload" : {
585- "job_id" : " job_01JABC..." ,
586- "current_status" : " running" ,
587- "agent" : " code-refactor@2.0.0" ,
588- "lease" : { ... },
589- "parent_job_id" : null ,
590- "trace_id" : " 4bf92f..." ,
591- "subscribed_from" : 1830 ,
592- "replayed" : false
585+ "job_id" : " job_01JABC..." ,
586+ "current_status" : " running" ,
587+ "agent" : " code-refactor@2.0.0" ,
588+ "lease" : { ... },
589+ "lease_constraints" : { "expires_at" : " 2026-05-13T23:42:00Z" },
590+ "budget" : { "USD" : 3.58 },
591+ "parent_job_id" : null ,
592+ "trace_id" : " 4bf92f..." ,
593+ "subscribed_from" : 1830 ,
594+ "replayed" : false
593595 }
594596}
595597```
596598
599+ The ` job.subscribed ` payload is the subscriber's ** authority
600+ descriptor** for the job — the same observable, non-secret view a
601+ runtime presents in ` session.list_jobs ` , plus the bounds an observer
602+ needs to render the job's authority surface:
603+
604+ - ` lease ` — the effective capability grants (§9.1).
605+ - ` lease_constraints ` (OPTIONAL) — echoed when present, currently
606+ ` expires_at ` (§9.5). Lets an observer show when the job's authority
607+ ends.
608+ - ` budget ` (OPTIONAL) — the ** current** per-currency counters at
609+ subscription time (§9.6), present when ` cost.budget ` is in the
610+ lease. Combined with the cap parsed from the lease's ` cost.budget `
611+ pattern and subsequent ` cost.budget.remaining ` metric events
612+ (§8.2), this gives an observer a live budget gauge without a
613+ separate read.
614+
615+ These fields are non-secret authority bounds and follow the
616+ ** observing principal** , not the submitter. ` credentials ` , by
617+ contrast, follow the ** submitter only** : per §14 the runtime MUST
618+ include ` credentials ` in ` job.subscribed ` (and ` session.list_jobs ` )
619+ solely when the subscribing principal is the job's original
620+ submitter, and MUST redact the field for every other authorized
621+ observer.
622+
597623After subscription, ` job.event ` messages for the subscribed job
598624appear in the session's stream interleaved with other jobs' events,
599625using the session's normal ` event_seq ` space.
0 commit comments