agent-afk 5.282.6 → 5.282.7

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const FACET_VERSION = 6;
2
+ export declare const FACET_VERSION = 7;
3
3
  export declare const ToolEventInputSchema: z.ZodObject<{
4
4
  toolName: z.ZodString;
5
5
  toolUseId: z.ZodOptional<z.ZodString>;
@@ -57,12 +57,19 @@ export declare const StoredSessionInputSchema: z.ZodObject<{
57
57
  export type StoredSessionInput = z.infer<typeof StoredSessionInputSchema>;
58
58
  export type ToolEventInput = z.infer<typeof ToolEventInputSchema>;
59
59
  export declare const FacetOutcomeSchema: z.ZodEnum<{
60
+ unknown: "unknown";
60
61
  aborted: "aborted";
61
62
  fully_achieved: "fully_achieved";
62
63
  partially_achieved: "partially_achieved";
63
64
  not_achieved: "not_achieved";
64
65
  }>;
65
66
  export type FacetOutcome = z.infer<typeof FacetOutcomeSchema>;
67
+ export declare const FacetOutcomeSourceSchema: z.ZodEnum<{
68
+ none: "none";
69
+ terminal_state: "terminal_state";
70
+ structural: "structural";
71
+ }>;
72
+ export type FacetOutcomeSource = z.infer<typeof FacetOutcomeSourceSchema>;
66
73
  export declare const SubagentPersistenceSchema: z.ZodEnum<{
67
74
  unknown: "unknown";
68
75
  not_persisted: "not_persisted";
@@ -99,6 +106,7 @@ export declare const YieldTrackingSchema: z.ZodObject<{
99
106
  is_scheduled_session: z.ZodBoolean;
100
107
  produced_pr: z.ZodNullable<z.ZodBoolean>;
101
108
  pr_merged: z.ZodNullable<z.ZodBoolean>;
109
+ pr_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
110
  }, z.core.$strip>;
103
111
  export type YieldTracking = z.infer<typeof YieldTrackingSchema>;
104
112
  export declare const SubagentToolSummarySchema: z.ZodObject<{
@@ -147,15 +155,22 @@ export declare const SessionFacetSchema: z.ZodObject<{
147
155
  label: z.ZodOptional<z.ZodString>;
148
156
  }, z.core.$strip>>;
149
157
  tool_errors: z.ZodNumber;
158
+ tool_errors_total: z.ZodNumber;
150
159
  tool_error_categories: z.ZodRecord<z.ZodString, z.ZodNumber>;
151
160
  friction_counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
152
161
  friction_detail: z.ZodString;
153
162
  outcome: z.ZodEnum<{
163
+ unknown: "unknown";
154
164
  aborted: "aborted";
155
165
  fully_achieved: "fully_achieved";
156
166
  partially_achieved: "partially_achieved";
157
167
  not_achieved: "not_achieved";
158
168
  }>;
169
+ outcome_source: z.ZodEnum<{
170
+ none: "none";
171
+ terminal_state: "terminal_state";
172
+ structural: "structural";
173
+ }>;
159
174
  primary_success: z.ZodString;
160
175
  world_changes: z.ZodObject<{
161
176
  files_written: z.ZodNumber;
@@ -182,6 +197,7 @@ export declare const SessionFacetSchema: z.ZodObject<{
182
197
  is_scheduled_session: z.ZodBoolean;
183
198
  produced_pr: z.ZodNullable<z.ZodBoolean>;
184
199
  pr_merged: z.ZodNullable<z.ZodBoolean>;
200
+ pr_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
201
  }, z.core.$strip>;
186
202
  decisions: z.ZodArray<z.ZodString>;
187
203
  evidence_pointers: z.ZodArray<z.ZodString>;
@@ -7,5 +7,6 @@ export type ExecFnYield = (file: string, args: string[], opts?: {
7
7
  }>;
8
8
  export declare function getCurrentBranch(execFn: ExecFnYield, cwd?: string): Promise<string | null>;
9
9
  export declare function queryPrState(execFn: ExecFnYield, branch: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'none' | 'error'>;
10
- export declare function patchYieldFields(sessionId: string, produced_pr: boolean, pr_merged: boolean | null, cacheDir?: string): void;
10
+ export declare function queryPrStateByUrl(execFn: ExecFnYield, prUrl: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'error'>;
11
+ export declare function patchYieldFields(sessionId: string, produced_pr: boolean, pr_merged: boolean | null, cacheDir?: string, pr_url?: string | null): void;
11
12
  export declare function writeFacetYield(sessionId: string, execFn: ExecFnYield, cwd?: string): Promise<void>;
@@ -1,4 +1,6 @@
1
1
  import type { Artifacts } from './schema.js';
2
+ export declare const BARE_PR_URL_RESULT: RegExp;
3
+ export declare const PR_QUERY_INPUT: RegExp;
2
4
  export interface ToolEvent {
3
5
  toolName: string;
4
6
  input?: string;
@@ -0,0 +1,21 @@
1
+ export type TerminalKind = 'done' | 'blocked' | 'asking' | 'interrupted';
2
+ export interface TerminalState {
3
+ kind: TerminalKind;
4
+ whatWasDone?: string;
5
+ evidence?: string;
6
+ whatChanged?: string;
7
+ deferred?: string;
8
+ whatBlocks?: string;
9
+ unblockCondition?: string;
10
+ alreadyDone?: string;
11
+ question?: string;
12
+ assumption?: string;
13
+ followup?: string;
14
+ whatWasInProgress?: string;
15
+ stateLocation?: string;
16
+ resumeRequires?: string;
17
+ rawBody: string;
18
+ }
19
+ export declare const TAIL_LINES = 40;
20
+ export declare function findTerminalStateHeadingOffset(text: string): number;
21
+ export declare function parseTerminalState(text: string): TerminalState | null;
@@ -1,20 +1,2 @@
1
- export type TerminalKind = 'done' | 'blocked' | 'asking' | 'interrupted';
2
- export interface TerminalState {
3
- kind: TerminalKind;
4
- whatWasDone?: string;
5
- evidence?: string;
6
- whatChanged?: string;
7
- deferred?: string;
8
- whatBlocks?: string;
9
- unblockCondition?: string;
10
- alreadyDone?: string;
11
- question?: string;
12
- assumption?: string;
13
- followup?: string;
14
- whatWasInProgress?: string;
15
- stateLocation?: string;
16
- resumeRequires?: string;
17
- rawBody: string;
18
- }
19
- export declare function findTerminalStateHeadingOffset(text: string): number;
20
- export declare function parseTerminalState(text: string): TerminalState | null;
1
+ export type { TerminalKind, TerminalState } from '../../../agent/outcomes/terminal-state.js';
2
+ export { parseTerminalState, findTerminalStateHeadingOffset, } from '../../../agent/outcomes/terminal-state.js';