agent-afk 5.316.4 → 5.317.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/hooks-source.d.ts +22 -0
- package/dist/agent/awareness/types.d.ts +3 -1
- package/dist/agent/providers/anthropic-direct/loop/stream-consumer.d.ts +2 -1
- package/dist/agent/subagent/handle.run-success.d.ts +1 -1
- package/dist/agent/tools/subagent-executor.execute-once.helpers.d.ts +1 -0
- package/dist/agent/tools/subagent-executor.write-intent.d.ts +1 -0
- package/dist/cli.mjs +399 -399
- package/dist/index.mjs +202 -202
- package/dist/telegram.mjs +232 -232
- package/dist/utils/jsonl.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type LoadHooksConfigOptions } from '../hooks/config-loader.js';
|
|
2
|
+
import type { HarnessHookEvent } from '../hooks.js';
|
|
3
|
+
export interface RuntimeConfiguredHook {
|
|
4
|
+
event: HarnessHookEvent;
|
|
5
|
+
matcher?: string;
|
|
6
|
+
source: 'user-global' | 'project-local' | 'plugin' | 'unknown';
|
|
7
|
+
pluginName?: string;
|
|
8
|
+
type: 'command';
|
|
9
|
+
timeoutMs: number;
|
|
10
|
+
commandFingerprint: string;
|
|
11
|
+
executableBasename?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RuntimeHooks {
|
|
14
|
+
configured: RuntimeConfiguredHook[];
|
|
15
|
+
userGlobalEnabled: boolean;
|
|
16
|
+
allowProjectHooks: boolean;
|
|
17
|
+
pluginHooksEnabled: boolean;
|
|
18
|
+
warningCount: number;
|
|
19
|
+
builtinListing: 'unavailable';
|
|
20
|
+
}
|
|
21
|
+
export declare function commandExecutableBasename(command: string): string | undefined;
|
|
22
|
+
export declare function gatherHooks(opts: LoadHooksConfigOptions): RuntimeHooks;
|
|
@@ -58,6 +58,7 @@ export interface RuntimeSnapshot {
|
|
|
58
58
|
tools: RuntimeTools;
|
|
59
59
|
subagents: RuntimeSubagents;
|
|
60
60
|
workspace: RuntimeWorkspace;
|
|
61
|
+
hooks?: import('./hooks-source.js').RuntimeHooks;
|
|
61
62
|
usage?: RuntimeUsageEntry[];
|
|
62
63
|
clock?: {
|
|
63
64
|
iso: string;
|
|
@@ -66,8 +67,9 @@ export interface RuntimeSnapshot {
|
|
|
66
67
|
subagentOutcomeSummary?: SubagentOutcomeSummaryEntry[];
|
|
67
68
|
}
|
|
68
69
|
export type { SubagentOutcomeSummaryEntry } from '../../insights/aggregators/subagent-outcomes.js';
|
|
69
|
-
export type RuntimeView = 'self' | 'tools' | 'subagents' | 'workspace' | 'all';
|
|
70
|
+
export type RuntimeView = 'self' | 'tools' | 'subagents' | 'workspace' | 'hooks' | 'all';
|
|
70
71
|
export interface RuntimeStateSource {
|
|
72
|
+
getHooks?(): import('./hooks-source.js').RuntimeHooks;
|
|
71
73
|
getSelf(): RuntimeSelf;
|
|
72
74
|
getTools(): RuntimeTools;
|
|
73
75
|
getSubagents(): RuntimeSubagents;
|
|
@@ -15,7 +15,7 @@ export interface StreamConsumerContext {
|
|
|
15
15
|
stallTimeoutMs: number;
|
|
16
16
|
requestStartedAt: number;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
interface StreamRoundState {
|
|
19
19
|
turnResult: TurnResult | null;
|
|
20
20
|
translatorErrored: boolean;
|
|
21
21
|
retryTtfb: boolean;
|
|
@@ -40,3 +40,4 @@ export declare function handleCatchError(state: StreamRoundState, err: unknown,
|
|
|
40
40
|
done: false;
|
|
41
41
|
};
|
|
42
42
|
export declare function consumeRoundStream({ events, input, turn, retry, ttfb, stall, stallTimeoutMs, requestStartedAt, }: StreamConsumerContext): AsyncGenerator<ProviderEvent, RoundOutcome, void>;
|
|
43
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubagentProgressSink } from '../types/session-types.js';
|
|
2
2
|
import type { Message } from '../types.js';
|
|
3
3
|
import type { SubagentHandleImpl } from './handle.js';
|
|
4
|
-
export declare function drainAndEmitSuccess
|
|
4
|
+
export declare function drainAndEmitSuccess(handle: SubagentHandleImpl<unknown>, firstMsg: Message, startTime: number, sinkOverride: SubagentProgressSink | undefined): Promise<Message>;
|
|
@@ -103,3 +103,4 @@ export interface RunBackgroundDispatchArgs {
|
|
|
103
103
|
}
|
|
104
104
|
export declare function runBackgroundDispatch(args: RunBackgroundDispatchArgs): Promise<ToolResult>;
|
|
105
105
|
export declare function checkNestedScope(nestedScope: readonly string[], requestedType: string | undefined): ToolResult | undefined;
|
|
106
|
+
export declare function checkReadOnlyDispatchIntent(childWriteCapable: boolean, namedAgent: RegisteredAgent | undefined, prompt: string, classifyFn: (p: string) => boolean): ToolResult | undefined;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
export declare function classifyDispatchIntent(prompt: string): boolean;
|
|
1
2
|
export declare function collectPostRunWarnings(model: string, hasAttachments: boolean, agentName: string | undefined, prompt: string, childWriteCapable: boolean, supportsVisionFn: (m: string) => boolean): string;
|