agent-afk 5.306.4 → 5.307.1
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/awareness/types.d.ts +4 -0
- package/dist/agent/daemon/scheduler.d.ts +1 -0
- package/dist/agent/daemon/scheduler.overlap-guard.d.ts +7 -0
- package/dist/agent/daemon/telemetry-reader.d.ts +8 -0
- package/dist/agent/providers/anthropic-direct/auth.d.ts +1 -1
- package/dist/agent/providers/anthropic-direct/query-system.d.ts +5 -0
- package/dist/agent/providers/openai-compatible/complete-wire.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/oneshot.d.ts +1 -0
- package/dist/agent/providers/shared/h1-fetch.d.ts +1 -0
- package/dist/agent/tools/operator-denied.d.ts +0 -1
- package/dist/cli/input/emit-keypress.d.ts +1 -0
- package/dist/cli/input/reader.keypress.d.ts +1 -0
- package/dist/cli/slash/plugin-skills/flags.d.ts +1 -0
- package/dist/cli/terminal-compositor.lifecycle.cpr.d.ts +1 -0
- package/dist/cli.mjs +463 -458
- package/dist/index.mjs +172 -168
- package/dist/insights/aggregators/index.d.ts +2 -1
- package/dist/insights/aggregators/subagent-outcomes.d.ts +27 -0
- package/dist/insights/types.d.ts +1 -0
- package/dist/telegram.mjs +219 -215
- package/dist/utils/jsonl.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CompactUsageEntry } from '../usage/usage-formatter.js';
|
|
2
|
+
import type { SubagentOutcomeSummaryEntry } from '../../insights/aggregators/subagent-outcomes.js';
|
|
2
3
|
export type Surface = 'cli' | 'repl' | 'daemon' | 'telegram' | 'subagent' | 'web' | 'unknown';
|
|
3
4
|
export type PhaseRole = 'read-only' | 'read-write';
|
|
4
5
|
export type SubagentStatusLiteValue = 'idle' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
@@ -58,7 +59,9 @@ export interface RuntimeSnapshot {
|
|
|
58
59
|
subagents: RuntimeSubagents;
|
|
59
60
|
workspace: RuntimeWorkspace;
|
|
60
61
|
usage?: RuntimeUsageEntry[];
|
|
62
|
+
subagentOutcomeSummary?: SubagentOutcomeSummaryEntry[];
|
|
61
63
|
}
|
|
64
|
+
export type { SubagentOutcomeSummaryEntry } from '../../insights/aggregators/subagent-outcomes.js';
|
|
62
65
|
export type RuntimeView = 'self' | 'tools' | 'subagents' | 'workspace' | 'all';
|
|
63
66
|
export interface RuntimeStateSource {
|
|
64
67
|
getSelf(): RuntimeSelf;
|
|
@@ -66,4 +69,5 @@ export interface RuntimeStateSource {
|
|
|
66
69
|
getSubagents(): RuntimeSubagents;
|
|
67
70
|
getWorkspace(): RuntimeWorkspace;
|
|
68
71
|
getUsage(): RuntimeUsageEntry[];
|
|
72
|
+
getSubagentOutcomeSummary(): SubagentOutcomeSummaryEntry[];
|
|
69
73
|
}
|
|
@@ -58,6 +58,7 @@ export declare class CronScheduler {
|
|
|
58
58
|
private readonly queueDir;
|
|
59
59
|
private readonly inFlightTaskIds;
|
|
60
60
|
private readonly budgetAlerts;
|
|
61
|
+
private readonly overlapAlerts;
|
|
61
62
|
private readonly telemetryAlerts;
|
|
62
63
|
constructor(options?: SchedulerOptions);
|
|
63
64
|
register(task: ScheduledTask): void;
|
|
@@ -6,3 +6,10 @@ export declare function makeOverlapSkipRecord(task: ScheduledTask, trigger: Tele
|
|
|
6
6
|
export declare function makeBudgetSkipRecord(task: ScheduledTask, trigger: TelemetryTrigger, nowMs: number, skip: BudgetGateSkip): TelemetryRecord;
|
|
7
7
|
export declare function makeTelemetryUnwritableSkipRecord(task: ScheduledTask, nowMs: number, errorDescription: string): TelemetryRecord;
|
|
8
8
|
export declare function makeSessionStartSkipRecord(task: ScheduledTask, decision: GateDecision, nowMs: number): TelemetryRecord;
|
|
9
|
+
export declare class OverlapAlertLatch {
|
|
10
|
+
private readonly alerted;
|
|
11
|
+
shouldAlert(taskId: string): boolean;
|
|
12
|
+
clear(taskId: string): void;
|
|
13
|
+
_reset(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function formatOverlapAlertMessage(taskId: string, command: string, cron: string | undefined): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_TAIL_BYTES = 1048576;
|
|
2
|
+
export declare const DEFAULT_HISTORY_LIMIT = 10;
|
|
3
|
+
export interface ReadTelemetryHistoryOptions {
|
|
4
|
+
taskId: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
tailBytes?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function readTelemetryHistory(telemetryPath: string, options: ReadTelemetryHistoryOptions): Promise<unknown[]>;
|
|
@@ -13,7 +13,7 @@ export declare function buildClientOptions(token: string, mode: AuthMode, baseUr
|
|
|
13
13
|
apiKey: string;
|
|
14
14
|
}) & {
|
|
15
15
|
baseURL?: string;
|
|
16
|
-
fetch
|
|
16
|
+
fetch: typeof fetch;
|
|
17
17
|
maxRetries: 0;
|
|
18
18
|
};
|
|
19
19
|
export declare function buildRequestHeaders(mode: AuthMode, sessionId: string, requestId: string, withEffort?: boolean, extendedCacheTtl?: boolean, withFast?: boolean, withThinkingBindingControls?: boolean): Record<string, string>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { SessionState } from './query/session-state.js';
|
|
3
|
+
export declare const ENV_SPLIT_MARKER = "\n\n# Environment\n";
|
|
4
|
+
export declare function splitAtEnvironmentBoundary(assembled: string): {
|
|
5
|
+
stablePrefix: string;
|
|
6
|
+
volatileTail: string;
|
|
7
|
+
} | null;
|
|
3
8
|
export declare function composeQuerySystem(options: {
|
|
4
9
|
state: SessionState;
|
|
5
10
|
systemPrefix: ContentBlockParam[] | null;
|
|
@@ -6,6 +6,7 @@ export interface CompleteWireClientOptions {
|
|
|
6
6
|
baseURL?: string;
|
|
7
7
|
defaultHeaders?: Record<string, string>;
|
|
8
8
|
maxRetries: number;
|
|
9
|
+
fetch: typeof globalThis.fetch;
|
|
9
10
|
}
|
|
10
11
|
export type CompleteWireClientFactory = (opts: CompleteWireClientOptions) => OpenAI;
|
|
11
12
|
export declare function completeWithWire(input: OpenAIOneShotInput, clientFactory?: CompleteWireClientFactory): Promise<string>;
|
|
@@ -9,6 +9,7 @@ export type OneShotOpenAIClientFactory = (opts: {
|
|
|
9
9
|
baseURL?: string;
|
|
10
10
|
defaultHeaders?: Record<string, string>;
|
|
11
11
|
maxRetries: number;
|
|
12
|
+
fetch: typeof globalThis.fetch;
|
|
12
13
|
}) => OpenAI;
|
|
13
14
|
export declare function __setOpenAIOneShotClientFactory(factory: OneShotOpenAIClientFactory | null): void;
|
|
14
15
|
export interface OpenAIOneShotInput {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const h1ModelFetch: typeof fetch;
|
|
@@ -3,7 +3,6 @@ export { isMcpDenyEntry, isToolDenied } from './operator-denied.match.js';
|
|
|
3
3
|
export declare const LOCKED_TOOLS: ReadonlySet<string>;
|
|
4
4
|
export declare const TOOL_GROUP_NAMES: readonly ["browser", "image", "clipboard", "peer", "schedules"];
|
|
5
5
|
export declare function toolGroups(): Readonly<Record<string, readonly string[]>>;
|
|
6
|
-
export declare function resetWarnings(): void;
|
|
7
6
|
export declare function parseDisabledTools(value: unknown, source: string, customNames?: readonly string[]): string[];
|
|
8
7
|
export declare function resolveOperatorDeniedTools(customNames?: readonly string[]): string[];
|
|
9
8
|
export declare function withOperatorDenied(base: ToolPermissionConfig | undefined, denied: readonly string[]): ToolPermissionConfig | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function emitKeypressEventsImmediateEscape(stream: NodeJS.ReadableStream): void;
|
|
2
2
|
export declare const CPR_KEYPRESS_GRACE_MS = 500;
|
|
3
3
|
export declare function armCprKeypressGuard(stdin: NodeJS.ReadableStream, durationMs: number): void;
|
|
4
|
+
export declare function disarmCprKeypressGuard(): void;
|
|
4
5
|
export declare function isCprKeypressGuardActive(stdin: NodeJS.ReadableStream): boolean;
|
|
5
6
|
export declare function isCprSequence(stdin: NodeJS.ReadableStream, sequence: string): boolean;
|
|
6
7
|
export declare function __resetCprKeypressGuardForTests(): void;
|
|
@@ -5,4 +5,5 @@ export interface PluginSkillHarvest {
|
|
|
5
5
|
export declare function harvestPluginSkillFlags(cacheRoot?: string): Map<string, string[]>;
|
|
6
6
|
export declare function harvestPluginSkillMetadata(cacheRoot?: string): PluginSkillHarvest;
|
|
7
7
|
export declare function harvestAllPluginSkillFlags(): Map<string, string[]>;
|
|
8
|
+
export declare function harvestDiscoveredPluginSkillMetadata(): PluginSkillHarvest;
|
|
8
9
|
export declare function extractHintFromDescription(description: string): string | undefined;
|
|
@@ -9,6 +9,7 @@ export declare const CPR_RTT_SCALE = 4;
|
|
|
9
9
|
export declare const CPR_TIMEOUT_CEILING_MS = 1500;
|
|
10
10
|
export declare const CPR_MAX_REQUERY = 8;
|
|
11
11
|
export declare function __resetCprRttForTests(): void;
|
|
12
|
+
export declare function __getCprRttForTests(): number | null;
|
|
12
13
|
export interface CprHost {
|
|
13
14
|
readonly stdout: NodeJS.WriteStream;
|
|
14
15
|
readonly stdin: NodeJS.ReadStream;
|