@@ -2629,6 +2629,119 @@ _Notification:_
26292629* method: ` providers/updated `
26302630* params: ` ProviderStatus ` (see ` providers/list ` response above)
26312631
2632+ ## Background Jobs
2633+
2634+ ### List Jobs (↩️)
2635+
2636+ Returns all active (non-evicted) background jobs across all chats.
2637+
2638+ _ Request:_
2639+
2640+ * method: ` jobs/list `
2641+ * params: ` {} ` (none)
2642+
2643+ _ Response:_
2644+
2645+ * result: ` JobsListResult ` defined as follows:
2646+
2647+ ``` typescript
2648+ interface JobsListResult {
2649+ jobs: JobSummary [];
2650+ }
2651+
2652+ interface JobSummary {
2653+ /** Unique job identifier (e.g. "job-1"). */
2654+ id: string ;
2655+ /** Job type (currently always "shell"). */
2656+ type: string ;
2657+ /** Current status. */
2658+ status: " running" | " completed" | " failed" | " killed" ;
2659+ /** Human-readable label (the command string). */
2660+ label: string ;
2661+ /** Brief description of the job purpose (e.g. "dev-server"), or null if not provided. */
2662+ summary: string | null ;
2663+ /** ISO 8601 timestamp of when the job started. */
2664+ startedAt: string ;
2665+ /** Human-readable elapsed time (e.g. "5m23s"). */
2666+ elapsed: string ;
2667+ /** Process exit code, or null if still running. */
2668+ exitCode: number | null ;
2669+ /** The chat that spawned this job. */
2670+ chatId: string ;
2671+ /** Display label for the chat (title or chat-id fallback). */
2672+ chatLabel: string ;
2673+ }
2674+ ```
2675+
2676+ ### Kill Job (↩️)
2677+
2678+ Terminates a running background job.
2679+
2680+ _ Request:_
2681+
2682+ * method: ` jobs/kill `
2683+ * params: ` JobsKillParams ` defined as follows:
2684+
2685+ ``` typescript
2686+ interface JobsKillParams {
2687+ /** The job ID to kill. */
2688+ jobId: string ;
2689+ }
2690+ ```
2691+
2692+ _ Response:_
2693+
2694+ * result: ` { killed: boolean } `
2695+
2696+ ### Read Job Output (↩️)
2697+
2698+ Returns the currently buffered output lines for a background job. This is a snapshot read
2699+ that does not affect the LLM's incremental read cursor.
2700+
2701+ _ Request:_
2702+
2703+ * method: ` jobs/readOutput `
2704+ * params: ` JobsReadOutputParams ` defined as follows:
2705+
2706+ ``` typescript
2707+ interface JobsReadOutputParams {
2708+ /** The job ID to read output from. */
2709+ jobId: string ;
2710+ }
2711+ ```
2712+
2713+ _ Response:_
2714+
2715+ * result: ` JobsReadOutputResult ` defined as follows:
2716+
2717+ ``` typescript
2718+ interface JobsReadOutputResult {
2719+ /** Buffered output lines (up to 2000 most recent), tagged with stream source. */
2720+ lines: OutputLine [];
2721+ /** Current job status. */
2722+ status: " running" | " completed" | " failed" | " killed" ;
2723+ /** Process exit code, or null if still running. */
2724+ exitCode: number | null ;
2725+ }
2726+
2727+ interface OutputLine {
2728+ /** The text content of the line. */
2729+ text: string ;
2730+ /** Which stream produced this line. */
2731+ stream: " stdout" | " stderr" ;
2732+ }
2733+ ```
2734+
2735+ ### Jobs Updated (⬅️)
2736+
2737+ A server notification sent when the background jobs list changes. Sent after a job is
2738+ created, completes, fails, is killed, or is evicted. Contains the full list of active jobs.
2739+
2740+ _ Notification:_
2741+
2742+ * method: ` jobs/updated `
2743+ * params: ` JobsListResult ` (see ` jobs/list ` response above)
2744+
26322745## General features
26332746
26342747### progress (⬅️)
0 commit comments