agent-afk 5.262.1 → 5.263.0
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/outcomes/child-attribution.d.ts +2 -0
- package/dist/agent/outcomes/index.d.ts +5 -0
- package/dist/agent/outcomes/lf-reask.d.ts +4 -0
- package/dist/agent/outcomes/schema.d.ts +2 -0
- package/dist/agent/outcomes/session-end-hook.d.ts +2 -0
- package/dist/agent/outcomes/store.d.ts +13 -0
- package/dist/agent/tools/handlers/bash-env-scrub.d.ts +1 -0
- package/dist/cli/slash/commands/feedback.d.ts +3 -0
- package/dist/cli.mjs +376 -369
- package/dist/index.mjs +129 -128
- package/dist/paths.d.ts +2 -0
- package/dist/telegram/bot.command-descriptors.d.ts +4 -0
- package/dist/telegram/bot.delegating-commands.d.ts +5 -0
- package/dist/telegram/bot.feedback-commands.d.ts +12 -0
- package/dist/telegram/handlers/feedback.d.ts +6 -0
- package/dist/telegram/session-manager.d.ts +1 -0
- package/dist/telegram/session-manager.hydrate-stats.d.ts +9 -0
- package/dist/telegram.mjs +164 -162
- package/package.json +1 -1
package/dist/paths.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare function getRoutingDecisionsPath(): string;
|
|
|
6
6
|
export declare function getSdkSchemaViolationsPath(): string;
|
|
7
7
|
export declare function getBriefsDir(): string;
|
|
8
8
|
export declare function getFacetCacheDir(): string;
|
|
9
|
+
export declare function getOutcomesDir(): string;
|
|
10
|
+
export declare function getOutcomeRecordPath(sessionId: string): string;
|
|
9
11
|
export declare function getSkillsDir(): string;
|
|
10
12
|
export declare function getPluginsDir(): string;
|
|
11
13
|
export declare function getProjectAfkDir(cwd?: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Telegraf } from 'telegraf';
|
|
2
|
+
import type { SessionManager } from './session-manager.js';
|
|
3
|
+
type LogFn = (...args: unknown[]) => void;
|
|
4
|
+
export declare function registerDelegatingCommands(bot: Telegraf<any>, sessionManager: SessionManager, log: LogFn): void;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Telegraf } from 'telegraf';
|
|
2
|
+
import type { SessionManager } from './session-manager.js';
|
|
3
|
+
type LogFn = (...args: unknown[]) => void;
|
|
4
|
+
export declare const FEEDBACK_COMMAND_DESCRIPTORS: readonly [{
|
|
5
|
+
readonly command: "good";
|
|
6
|
+
readonly description: "Rate this session as succeeded";
|
|
7
|
+
}, {
|
|
8
|
+
readonly command: "bad";
|
|
9
|
+
readonly description: "Rate this session as failed";
|
|
10
|
+
}];
|
|
11
|
+
export declare function registerFeedbackCommands(bot: Telegraf<any>, sessionManager: SessionManager, log: LogFn): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Context } from 'telegraf';
|
|
2
|
+
import type { SessionManager } from '../session-manager.js';
|
|
3
|
+
type LogFn = (...args: unknown[]) => void;
|
|
4
|
+
export declare function handleGood(ctx: Context, sessionManager: SessionManager, log: LogFn): Promise<void>;
|
|
5
|
+
export declare function handleBad(ctx: Context, sessionManager: SessionManager, log: LogFn): Promise<void>;
|
|
6
|
+
export {};
|
|
@@ -50,6 +50,7 @@ export declare class SessionManager {
|
|
|
50
50
|
recordTelegramTurn(target: RouteTarget, userText: string, assistantText: string, metadata?: ResponseMetadata): void;
|
|
51
51
|
private _hydrateStatsFromStore;
|
|
52
52
|
getSessionName(target: RouteTarget): string | undefined;
|
|
53
|
+
getSessionId(target: RouteTarget): string | undefined;
|
|
53
54
|
setSessionName(target: RouteTarget, slug: string): {
|
|
54
55
|
persisted: boolean;
|
|
55
56
|
};
|
|
@@ -2,3 +2,12 @@ import type { SessionStats } from '../cli/slash/types.js';
|
|
|
2
2
|
import { type TelegramRoute } from './route.js';
|
|
3
3
|
import type { SessionData } from './session-manager.js';
|
|
4
4
|
export declare function hydrateStatsFromStore(sessionStats: Map<string, SessionStats>, sessionData: Map<string, SessionData>, route: TelegramRoute): void;
|
|
5
|
+
export declare function getRouteSessionId(sessionStats: Map<string, SessionStats>, sessions: Map<string, {
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
}>, route: TelegramRoute): string | undefined;
|
|
8
|
+
export declare function getRouteSessionName(sessionStats: Map<string, SessionStats>, route: TelegramRoute): string | undefined;
|
|
9
|
+
export declare function persistSessionName(sessionStats: Map<string, SessionStats>, sessionData: Map<string, SessionData>, sessions: Map<string, {
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
}>, route: TelegramRoute, slug: string): {
|
|
12
|
+
persisted: boolean;
|
|
13
|
+
};
|