agent-afk 5.261.3 → 5.261.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/hooks/hook-utils.d.ts +1 -0
- package/dist/agent/session/plan-exit-bridge.d.ts +2 -0
- package/dist/agent/session/plan-text-tracker.d.ts +13 -0
- package/dist/agent/session/turn-stream-runner.d.ts +1 -0
- package/dist/agent/tools/handlers/exit-plan-mode.d.ts +1 -0
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli/commands/interactive/bg-result-notifier.d.ts +1 -0
- package/dist/cli.mjs +277 -275
- package/dist/index.mjs +118 -116
- package/dist/telegram/bg-injection.d.ts +8 -0
- package/dist/telegram/bg-result-notifier.d.ts +3 -0
- package/dist/telegram/handlers/message.addressed-to-bot.d.ts +2 -0
- package/dist/telegram/handlers/message.d.ts +2 -3
- package/dist/telegram.mjs +150 -139
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { HookContext } from '../hooks.js';
|
|
2
2
|
import type { ForkSignals } from '../memory/memory-hot-guard.js';
|
|
3
3
|
export declare function isSubagentContext(context: HookContext, extraSignals?: ForkSignals): boolean;
|
|
4
|
+
export declare function resolveContextSessionId(context: HookContext, registrationSessionId: string | undefined): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ProviderEvent } from '../provider.js';
|
|
2
|
+
export declare const MIN_PLAN_TEXT_CHARS = 80;
|
|
3
|
+
export declare const MAX_PLAN_TEXT_REFUSALS = 2;
|
|
4
|
+
export type PlanTextVerdict = 'ok' | 'refuse' | 'warn';
|
|
5
|
+
export declare class PlanTextTracker {
|
|
6
|
+
private roundChars;
|
|
7
|
+
private resetArmed;
|
|
8
|
+
private refusals;
|
|
9
|
+
beginTurn(): void;
|
|
10
|
+
observe(event: ProviderEvent): void;
|
|
11
|
+
check(): PlanTextVerdict;
|
|
12
|
+
private applyArmedReset;
|
|
13
|
+
}
|
|
@@ -33,6 +33,7 @@ export interface TurnRunnerDeps {
|
|
|
33
33
|
setSubagentOutputRecorder: (r: SubagentOutputRecorder | null) => void;
|
|
34
34
|
getProviderQuery: () => ProviderQuery;
|
|
35
35
|
getLedgerMetadata: () => ReturnType<SessionStateManager['getSessionMetadata']>;
|
|
36
|
+
observeProviderEvent?: (event: ProviderEvent) => void;
|
|
36
37
|
}
|
|
37
38
|
export declare class TurnStreamRunner {
|
|
38
39
|
private readonly deps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AnthropicToolDef, ToolHandler } from '../types.js';
|
|
2
2
|
import type { PlanExitControls } from '../../types/config-types.js';
|
|
3
3
|
export declare const EXIT_PLAN_MODE_TOOL_NAME = "exit_plan_mode";
|
|
4
|
+
export declare const PLAN_TEXT_REFUSAL: string;
|
|
4
5
|
export declare const exitPlanModeTool: AnthropicToolDef;
|
|
5
6
|
export declare function createExitPlanModeHandler(controls: PlanExitControls): ToolHandler;
|
|
@@ -22,6 +22,7 @@ export interface PlanExitControls {
|
|
|
22
22
|
requestImplementSeed(message: string, mode: PermissionMode): void;
|
|
23
23
|
getPrePlanMode(): PermissionMode | undefined;
|
|
24
24
|
hasPendingUserMessage?: () => boolean;
|
|
25
|
+
checkPlanText?: () => 'ok' | 'refuse' | 'warn';
|
|
25
26
|
}
|
|
26
27
|
export interface AgentConfig {
|
|
27
28
|
model: AgentModelInput;
|
|
@@ -3,6 +3,7 @@ export declare const MAX_INJECTION_BYTES: number;
|
|
|
3
3
|
export interface PendingBgAgentNotification {
|
|
4
4
|
job: BackgroundJob;
|
|
5
5
|
}
|
|
6
|
+
export declare function formatBgResultBody(job: BackgroundJob): string;
|
|
6
7
|
export declare function buildBgResultInjection(job: BackgroundJob): string;
|
|
7
8
|
export declare function isAutoDeliverEnabled(raw: string | undefined): boolean;
|
|
8
9
|
export declare class BgResultNotifier {
|