agent-afk 5.282.6 → 5.282.8
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.
- package/dist/agent/facets/schema.d.ts +17 -1
- package/dist/agent/facets/yield-probe.d.ts +2 -1
- package/dist/agent/outcomes/artifacts.d.ts +2 -0
- package/dist/agent/outcomes/terminal-state.d.ts +21 -0
- package/dist/agent/providers/openai-compatible/loop.d.ts +2 -1
- package/dist/agent/providers/openai-compatible/messages.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/translate.d.ts +1 -0
- package/dist/cli/commands/interactive/terminal-state.d.ts +2 -20
- package/dist/cli.mjs +314 -314
- package/dist/improve/schemas.d.ts +2 -2
- package/dist/index.mjs +133 -129
- package/dist/telegram.mjs +156 -152
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const FACET_VERSION =
|
|
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
|
|
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>;
|
|
@@ -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;
|
|
@@ -27,8 +27,9 @@ export interface OpenAIAssistantToolCallMessage {
|
|
|
27
27
|
};
|
|
28
28
|
}>;
|
|
29
29
|
reasoning_content?: string;
|
|
30
|
+
reasoning?: string;
|
|
30
31
|
}
|
|
31
|
-
export declare function assistantMessageWithToolCalls(accumulatedText: string, toolCalls: readonly AccumulatedToolCall[], reasoningText?: string): OpenAIAssistantToolCallMessage;
|
|
32
|
+
export declare function assistantMessageWithToolCalls(accumulatedText: string, toolCalls: readonly AccumulatedToolCall[], reasoningText?: string, reasoningField?: 'reasoning_content' | 'reasoning'): OpenAIAssistantToolCallMessage;
|
|
32
33
|
export interface OpenAIToolResultMessage {
|
|
33
34
|
role: 'tool';
|
|
34
35
|
tool_call_id: string;
|
|
@@ -33,6 +33,7 @@ export interface OpenAIChunk {
|
|
|
33
33
|
export interface StreamState {
|
|
34
34
|
assistantText: string;
|
|
35
35
|
reasoningText: string;
|
|
36
|
+
reasoningField: 'reasoning_content' | 'reasoning';
|
|
36
37
|
toolCallsByIndex: Map<number, AccumulatedToolCall>;
|
|
37
38
|
finishReason: string | null;
|
|
38
39
|
usage: OpenAIChunk['usage'] | null;
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
export type TerminalKind
|
|
2
|
-
export
|
|
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';
|