agent-afk 5.288.0 → 5.288.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ import type { SubagentResult } from './subagent.js';
2
+ import type { BackgroundJobStatus } from './background-registry.types.js';
3
+ import type { BgJobLogWriter } from './bg-job-log.js';
4
+ export declare function persistResultBody(writer: BgJobLogWriter, jobId: string, status: BackgroundJobStatus, result: SubagentResult): void;
5
+ export declare function extractOutputText(result: SubagentResult, status: BackgroundJobStatus): string;
@@ -12,6 +12,12 @@ export interface BgJobMeta {
12
12
  stopReason?: string;
13
13
  schemaVersion: 1;
14
14
  }
15
+ export interface BgJobResult {
16
+ jobId: string;
17
+ status: 'completed' | 'failed';
18
+ outputText: string;
19
+ schemaVersion: 1;
20
+ }
15
21
  export declare class BgJobLogWriter {
16
22
  private readonly jobId;
17
23
  private readonly logPath;
@@ -31,10 +37,12 @@ export declare class BgJobLogWriter {
31
37
  close(): Promise<void>;
32
38
  writeMeta(meta: BgJobMeta): Promise<void>;
33
39
  private _writeMetaInner;
40
+ writeResult(result: BgJobResult): Promise<void>;
34
41
  }
35
42
  export declare class BgJobLogReader {
36
43
  static listJobs(): Promise<BgJobMeta[]>;
37
44
  static readMeta(jobId: string): Promise<BgJobMeta | null>;
45
+ static readResult(jobId: string): Promise<BgJobResult | null>;
38
46
  static readEvents(jobId: string): AsyncGenerator<OutputEvent>;
39
47
  static tailEvents(jobId: string, opts?: {
40
48
  fromStart?: boolean;