agent-afk 5.302.8 → 5.302.10
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 +12 -1
- package/dist/agent/peer/inbound-mode.d.ts +6 -0
- package/dist/cli/commands/interactive/bg-result-notifier.d.ts +6 -1
- package/dist/cli/commands/interactive/detached-tool-notifier.d.ts +18 -0
- package/dist/cli/commands/interactive/interactive.cleanup.d.ts +2 -18
- package/dist/cli/commands/interactive/interactive.signal-handlers.d.ts +21 -0
- package/dist/cli/commands/interactive/shared.d.ts +1 -0
- package/dist/cli/slash/types.d.ts +1 -0
- package/dist/cli.mjs +351 -345
- package/dist/index.mjs +140 -140
- package/dist/telegram.mjs +163 -163
- 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 = 10;
|
|
3
3
|
export declare const ToolEventInputSchema: z.ZodObject<{
|
|
4
4
|
toolName: z.ZodString;
|
|
5
5
|
toolUseId: z.ZodOptional<z.ZodString>;
|
|
@@ -84,6 +84,12 @@ export declare const FacetOutcomeSourceSchema: z.ZodEnum<{
|
|
|
84
84
|
structural: "structural";
|
|
85
85
|
}>;
|
|
86
86
|
export type FacetOutcomeSource = z.infer<typeof FacetOutcomeSourceSchema>;
|
|
87
|
+
export declare const FacetOutcomeDowngradeReasonSchema: z.ZodEnum<{
|
|
88
|
+
deferred_items: "deferred_items";
|
|
89
|
+
no_corroborating_evidence: "no_corroborating_evidence";
|
|
90
|
+
compose_partial_nodes: "compose_partial_nodes";
|
|
91
|
+
}>;
|
|
92
|
+
export type FacetOutcomeDowngradeReason = z.infer<typeof FacetOutcomeDowngradeReasonSchema>;
|
|
87
93
|
export declare const SubagentPersistenceSchema: z.ZodEnum<{
|
|
88
94
|
unknown: "unknown";
|
|
89
95
|
not_persisted: "not_persisted";
|
|
@@ -188,6 +194,11 @@ export declare const SessionFacetSchema: z.ZodObject<{
|
|
|
188
194
|
terminal_state: "terminal_state";
|
|
189
195
|
structural: "structural";
|
|
190
196
|
}>;
|
|
197
|
+
outcome_downgrade_reason: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
deferred_items: "deferred_items";
|
|
199
|
+
no_corroborating_evidence: "no_corroborating_evidence";
|
|
200
|
+
compose_partial_nodes: "compose_partial_nodes";
|
|
201
|
+
}>>;
|
|
191
202
|
primary_success: z.ZodString;
|
|
192
203
|
world_changes: z.ZodObject<{
|
|
193
204
|
files_written: z.ZodNumber;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export type PeerInboundMode = 'accept' | 'hold' | 'off';
|
|
2
|
+
export interface PeerInboundModeConfig {
|
|
3
|
+
mode: PeerInboundMode;
|
|
4
|
+
invalid: boolean;
|
|
5
|
+
rawTruncated?: string;
|
|
6
|
+
}
|
|
2
7
|
export declare function resolvePeerInboundMode(): PeerInboundMode;
|
|
8
|
+
export declare function getPeerInboundModeConfig(): PeerInboundModeConfig;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { BackgroundAgentRegistry, BackgroundJob } from '../../../agent/background-registry.js';
|
|
2
|
+
import type { DetachableToolRegistry } from '../../../agent/tools/detach-registry.js';
|
|
3
|
+
import type { ToolEvent } from '../../slash/types.js';
|
|
2
4
|
export declare const MAX_INJECTION_BYTES: number;
|
|
3
5
|
export interface PendingBgAgentNotification {
|
|
4
6
|
job: BackgroundJob;
|
|
@@ -13,7 +15,10 @@ export declare class BgResultNotifier {
|
|
|
13
15
|
private pendingNotifications;
|
|
14
16
|
onInjectable: (() => void) | null;
|
|
15
17
|
private readonly onSettled;
|
|
16
|
-
|
|
18
|
+
private readonly detachedTools;
|
|
19
|
+
constructor(registry: BackgroundAgentRegistry, detachRegistry?: DetachableToolRegistry);
|
|
20
|
+
observeToolEvent(event: ToolEvent): void;
|
|
21
|
+
drainToolNotices(): string[];
|
|
17
22
|
drainInjections(): string;
|
|
18
23
|
drainNotifications(): readonly PendingBgAgentNotification[];
|
|
19
24
|
reset(): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DetachableToolRegistry, DetachedToolResult } from '../../../agent/tools/detach-registry.js';
|
|
2
|
+
import type { ToolEvent } from '../../slash/types.js';
|
|
3
|
+
export declare function buildDetachedToolInjection(result: DetachedToolResult): string;
|
|
4
|
+
export declare class DetachedToolNotifier {
|
|
5
|
+
private readonly registry;
|
|
6
|
+
private readonly tracked;
|
|
7
|
+
private injections;
|
|
8
|
+
private notices;
|
|
9
|
+
onInjectable: (() => void) | null;
|
|
10
|
+
private readonly onSettled;
|
|
11
|
+
constructor(registry: DetachableToolRegistry);
|
|
12
|
+
observe(event: ToolEvent): void;
|
|
13
|
+
hasPendingInjections(): boolean;
|
|
14
|
+
drainInjections(): string;
|
|
15
|
+
drainNotices(): string[];
|
|
16
|
+
reset(): void;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
import { type StoredSession } from '../../session-store.js';
|
|
2
1
|
import type { InteractiveCtx } from './shared.js';
|
|
3
|
-
import type { TurnState } from './repl-loop.js';
|
|
4
2
|
import type { WorktreeHandle } from './worktree.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
turnState: TurnState;
|
|
8
|
-
pickerAbort: AbortController;
|
|
9
|
-
exitReasonRef: ExitReasonRef;
|
|
10
|
-
}
|
|
11
|
-
export interface SignalHandlerDisposers {
|
|
12
|
-
removeListeners: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function installSignalHandlers(deps: SignalHandlerDeps): {
|
|
15
|
-
handleSigint: () => void;
|
|
16
|
-
removeListeners: () => void;
|
|
17
|
-
};
|
|
3
|
+
import type { ExitReasonRef } from './interactive.signal-handlers.js';
|
|
4
|
+
export { installSignalHandlers, type ExitReasonRef, type SignalHandlerDeps, type SignalHandlerDisposers, } from './interactive.signal-handlers.js';
|
|
18
5
|
export declare function printExitSummary(ctx: InteractiveCtx, worktreeHandle: WorktreeHandle | undefined, saveCurrentSession: () => string | undefined): void;
|
|
19
6
|
export declare function snapshotGitStateForCancelAll(cwd: string): Promise<void>;
|
|
20
7
|
export declare function cancelSessionBackgroundWork(ctx: InteractiveCtx): Promise<void>;
|
|
21
|
-
export type ExitReasonRef = {
|
|
22
|
-
current: StoredSession['exitReason'];
|
|
23
|
-
};
|
|
24
8
|
export declare function makeSessionSaver(ctx: InteractiveCtx, exitReasonRef?: ExitReasonRef): {
|
|
25
9
|
saveCurrentSession: () => string | undefined;
|
|
26
10
|
isSaved: () => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoredSession } from '../../session-store.js';
|
|
2
|
+
import type { InteractiveCtx } from './shared.js';
|
|
3
|
+
import type { TurnState } from './repl-loop.js';
|
|
4
|
+
export type ExitReasonRef = {
|
|
5
|
+
current: StoredSession['exitReason'];
|
|
6
|
+
};
|
|
7
|
+
export interface SignalHandlerDeps {
|
|
8
|
+
ctx: InteractiveCtx;
|
|
9
|
+
turnState: TurnState;
|
|
10
|
+
pickerAbort: AbortController;
|
|
11
|
+
exitReasonRef: ExitReasonRef;
|
|
12
|
+
}
|
|
13
|
+
export interface SignalHandlerDisposers {
|
|
14
|
+
removeListeners: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function makeSigintHandler(deps: SignalHandlerDeps): () => void;
|
|
17
|
+
export declare function makeTermHupHandler(deps: SignalHandlerDeps, signal: 'sigterm' | 'sighup'): () => void;
|
|
18
|
+
export declare function installSignalHandlers(deps: SignalHandlerDeps): {
|
|
19
|
+
handleSigint: () => void;
|
|
20
|
+
removeListeners: () => void;
|
|
21
|
+
};
|
|
@@ -128,6 +128,7 @@ export interface TurnHandles {
|
|
|
128
128
|
setBackgroundHandler?(handler: (() => void) | null): void;
|
|
129
129
|
subagentControl?: SubagentControl;
|
|
130
130
|
detachRegistry?: DetachableToolRegistry;
|
|
131
|
+
onToolEvent?(event: import('../../slash/types.js').ToolEvent): void;
|
|
131
132
|
setSoftStopHandler?(handler: (() => void) | null): void;
|
|
132
133
|
setTaskViewHandler?(handler: (() => boolean) | null): void;
|
|
133
134
|
setPausedState?(paused: boolean): void;
|