agent-afk 5.221.3 → 5.221.4
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 +2 -2
- package/dist/agent/session/agent-session.d.ts +7 -6
- package/dist/agent/session/session-config.d.ts +25 -0
- package/dist/agent/trace/events.d.ts +6 -6
- package/dist/cli.mjs +608 -608
- package/dist/improve/schemas.d.ts +8 -8
- package/dist/index.mjs +225 -225
- package/dist/telegram.mjs +302 -302
- package/package.json +1 -1
|
@@ -25,8 +25,8 @@ export declare const StoredSessionInputSchema: z.ZodObject<{
|
|
|
25
25
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
26
26
|
name: z.ZodOptional<z.ZodString>;
|
|
27
27
|
source: z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
telegram: "telegram";
|
|
29
28
|
cli: "cli";
|
|
29
|
+
telegram: "telegram";
|
|
30
30
|
web: "web";
|
|
31
31
|
}>>;
|
|
32
32
|
telegramChatId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -90,8 +90,8 @@ export declare const SessionFacetSchema: z.ZodObject<{
|
|
|
90
90
|
facet_version: z.ZodNumber;
|
|
91
91
|
session_id: z.ZodString;
|
|
92
92
|
source: z.ZodEnum<{
|
|
93
|
-
telegram: "telegram";
|
|
94
93
|
cli: "cli";
|
|
94
|
+
telegram: "telegram";
|
|
95
95
|
web: "web";
|
|
96
96
|
unknown: "unknown";
|
|
97
97
|
}>;
|
|
@@ -45,20 +45,21 @@ export declare class AgentSession implements IAgentSession {
|
|
|
45
45
|
setBeforeNextRound(cb: (() => string | undefined) | undefined): void;
|
|
46
46
|
reset(): Promise<void>;
|
|
47
47
|
private onAbort;
|
|
48
|
+
private makeConfigDeps;
|
|
48
49
|
setModel(model?: AgentModelInput): Promise<void>;
|
|
49
50
|
setPermissionMode(mode: PermissionMode): Promise<void>;
|
|
50
|
-
getPrePlanMode(): PermissionMode | undefined;
|
|
51
|
-
setPlanExitQueueCheck(fn: () => boolean): void;
|
|
52
|
-
takePendingPlanExitSeed(): Promise<{
|
|
53
|
-
message: string;
|
|
54
|
-
mode: PermissionMode;
|
|
55
|
-
} | undefined>;
|
|
56
51
|
setSystemPrompt(basePrompt: string | undefined): boolean;
|
|
57
52
|
setCwd(cwd: string): void;
|
|
58
53
|
reauth(): Promise<{
|
|
59
54
|
accountId: string;
|
|
60
55
|
swapped: boolean;
|
|
61
56
|
} | null>;
|
|
57
|
+
getPrePlanMode(): PermissionMode | undefined;
|
|
58
|
+
setPlanExitQueueCheck(fn: () => boolean): void;
|
|
59
|
+
takePendingPlanExitSeed(): Promise<{
|
|
60
|
+
message: string;
|
|
61
|
+
mode: PermissionMode;
|
|
62
|
+
} | undefined>;
|
|
62
63
|
waitForInitialization(): Promise<SessionMetadata>;
|
|
63
64
|
getSessionIdentity(): SessionIdentity;
|
|
64
65
|
getSessionMetadata(): SessionMetadata;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AgentModelInput, OutputEvent, PermissionMode } from '../types.js';
|
|
2
|
+
import type { AgentConfig } from '../types.js';
|
|
3
|
+
import type { ProviderQuery } from '../provider.js';
|
|
4
|
+
import type { SessionStateManager } from './session-state.js';
|
|
5
|
+
import type { PlanExitBridge } from './plan-exit-bridge.js';
|
|
6
|
+
export interface ConfigDeps {
|
|
7
|
+
getConfig: () => AgentConfig;
|
|
8
|
+
setConfig: (patch: (prev: AgentConfig) => AgentConfig) => void;
|
|
9
|
+
getProviderQuery: () => ProviderQuery;
|
|
10
|
+
getStateManager: () => SessionStateManager;
|
|
11
|
+
getPlanExit: () => PlanExitBridge;
|
|
12
|
+
pushSidebandEvent: (event: OutputEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function setModel(model: AgentModelInput | undefined, deps: ConfigDeps): Promise<void>;
|
|
15
|
+
export declare function setPermissionMode(mode: PermissionMode, deps: ConfigDeps): Promise<void>;
|
|
16
|
+
export declare function setSystemPrompt(basePrompt: string | undefined, deps: ConfigDeps): boolean;
|
|
17
|
+
export declare function setCwd(cwd: string, deps: ConfigDeps): void;
|
|
18
|
+
export declare function reauth(deps: ConfigDeps): Promise<{
|
|
19
|
+
accountId: string;
|
|
20
|
+
swapped: boolean;
|
|
21
|
+
} | null>;
|
|
22
|
+
export declare function takePendingPlanExitSeed(deps: ConfigDeps): Promise<{
|
|
23
|
+
message: string;
|
|
24
|
+
mode: PermissionMode;
|
|
25
|
+
} | undefined>;
|
|
@@ -468,8 +468,8 @@ export declare const BrowserEventPayloadSchema: z.ZodObject<{
|
|
|
468
468
|
}>>;
|
|
469
469
|
toolUseId: z.ZodString;
|
|
470
470
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
471
|
-
"agent-browser": "agent-browser";
|
|
472
471
|
playwright: "playwright";
|
|
472
|
+
"agent-browser": "agent-browser";
|
|
473
473
|
}>>;
|
|
474
474
|
backendReason: z.ZodOptional<z.ZodString>;
|
|
475
475
|
target: z.ZodOptional<z.ZodObject<{
|
|
@@ -555,9 +555,9 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
555
555
|
model: z.ZodOptional<z.ZodString>;
|
|
556
556
|
resolvedModel: z.ZodOptional<z.ZodString>;
|
|
557
557
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
558
|
+
cli: "cli";
|
|
558
559
|
telegram: "telegram";
|
|
559
560
|
daemon: "daemon";
|
|
560
|
-
cli: "cli";
|
|
561
561
|
web: "web";
|
|
562
562
|
unknown: "unknown";
|
|
563
563
|
}>>;
|
|
@@ -844,8 +844,8 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
844
844
|
}>>;
|
|
845
845
|
toolUseId: z.ZodString;
|
|
846
846
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
847
|
-
"agent-browser": "agent-browser";
|
|
848
847
|
playwright: "playwright";
|
|
848
|
+
"agent-browser": "agent-browser";
|
|
849
849
|
}>>;
|
|
850
850
|
backendReason: z.ZodOptional<z.ZodString>;
|
|
851
851
|
target: z.ZodOptional<z.ZodObject<{
|
|
@@ -915,9 +915,9 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
915
915
|
model: z.ZodOptional<z.ZodString>;
|
|
916
916
|
resolvedModel: z.ZodOptional<z.ZodString>;
|
|
917
917
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
918
|
+
cli: "cli";
|
|
918
919
|
telegram: "telegram";
|
|
919
920
|
daemon: "daemon";
|
|
920
|
-
cli: "cli";
|
|
921
921
|
web: "web";
|
|
922
922
|
unknown: "unknown";
|
|
923
923
|
}>>;
|
|
@@ -1210,8 +1210,8 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1210
1210
|
}>>;
|
|
1211
1211
|
toolUseId: z.ZodString;
|
|
1212
1212
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
1213
|
-
"agent-browser": "agent-browser";
|
|
1214
1213
|
playwright: "playwright";
|
|
1214
|
+
"agent-browser": "agent-browser";
|
|
1215
1215
|
}>>;
|
|
1216
1216
|
backendReason: z.ZodOptional<z.ZodString>;
|
|
1217
1217
|
target: z.ZodOptional<z.ZodObject<{
|
|
@@ -1285,9 +1285,9 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1285
1285
|
model: z.ZodOptional<z.ZodString>;
|
|
1286
1286
|
resolvedModel: z.ZodOptional<z.ZodString>;
|
|
1287
1287
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
1288
|
+
cli: "cli";
|
|
1288
1289
|
telegram: "telegram";
|
|
1289
1290
|
daemon: "daemon";
|
|
1290
|
-
cli: "cli";
|
|
1291
1291
|
web: "web";
|
|
1292
1292
|
unknown: "unknown";
|
|
1293
1293
|
}>>;
|