agent-afk 5.26.3 → 5.26.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/cli/elicitation/agent-question.d.ts +4 -0
- package/dist/cli/elicitation/form-mode.d.ts +27 -0
- package/dist/cli/elicitation/repl-handler.d.ts +5 -0
- package/dist/cli/elicitation/repl-shared.d.ts +26 -0
- package/dist/cli/elicitation/url-mode.d.ts +3 -0
- package/dist/cli/elicitation-repl.d.ts +2 -26
- package/dist/cli.mjs +378 -378
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ElicitationRequest, ElicitationResult } from '../../agent/types/sdk-types.js';
|
|
2
|
+
import type { ReplElicitationDeps } from './repl-shared.js';
|
|
3
|
+
export declare const SKIP: ElicitationResult;
|
|
4
|
+
export declare function renderAgentQuestion(request: ElicitationRequest, deps: ReplElicitationDeps, signal: AbortSignal): Promise<ElicitationResult>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ElicitationRequest } from '../../agent/types/sdk-types.js';
|
|
2
|
+
import type { ReplElicitationDeps } from './repl-shared.js';
|
|
3
|
+
export declare const MAX_FIELDS = 64;
|
|
4
|
+
export declare const BLOCKED_KEYS: Set<string>;
|
|
5
|
+
export interface FieldDef {
|
|
6
|
+
type?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
enum?: unknown[];
|
|
9
|
+
default?: unknown;
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
export type FieldOutcome = {
|
|
13
|
+
tag: 'value';
|
|
14
|
+
value: unknown;
|
|
15
|
+
} | {
|
|
16
|
+
tag: 'cancel';
|
|
17
|
+
} | {
|
|
18
|
+
tag: 'decline';
|
|
19
|
+
};
|
|
20
|
+
export declare function parseProperties(schema: Record<string, unknown>): {
|
|
21
|
+
properties: Record<string, FieldDef>;
|
|
22
|
+
required: Set<string>;
|
|
23
|
+
fieldsTruncated: boolean;
|
|
24
|
+
originalFieldCount: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function renderFormHeader(writer: ReplElicitationDeps['writer'], req: ElicitationRequest): void;
|
|
27
|
+
export declare function promptField(fieldKey: string, fieldDef: FieldDef, isRequired: boolean, readLine: ReplElicitationDeps['readLine'], writer: ReplElicitationDeps['writer'], signal: AbortSignal, pickFromList?: ReplElicitationDeps['pickFromList']): Promise<FieldOutcome>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ElicitationRequest, ElicitationResult } from '../../agent/types/sdk-types.js';
|
|
2
|
+
import type { ReplElicitationDeps } from './repl-shared.js';
|
|
3
|
+
export declare function makeReplElicitationHandler(deps: ReplElicitationDeps): (request: ElicitationRequest, options: {
|
|
4
|
+
signal: AbortSignal;
|
|
5
|
+
}) => Promise<ElicitationResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ElicitationResult } from '../../agent/types/sdk-types.js';
|
|
2
|
+
export interface ReplElicitationDeps {
|
|
3
|
+
readLine: (prompt: string) => Promise<string>;
|
|
4
|
+
writer: {
|
|
5
|
+
line: (text?: string) => void;
|
|
6
|
+
};
|
|
7
|
+
pendingCount: () => number;
|
|
8
|
+
suspendInput?: () => void;
|
|
9
|
+
resumeInput?: () => void;
|
|
10
|
+
pickFromList?: (opts: {
|
|
11
|
+
header: readonly string[];
|
|
12
|
+
options: readonly string[];
|
|
13
|
+
multi?: boolean;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
}) => Promise<readonly string[] | null>;
|
|
16
|
+
readTextOverlay?: (opts: {
|
|
17
|
+
header: readonly string[];
|
|
18
|
+
initial?: string;
|
|
19
|
+
help?: string;
|
|
20
|
+
validate?: (value: string) => string | null;
|
|
21
|
+
signal: AbortSignal;
|
|
22
|
+
}) => Promise<string | null>;
|
|
23
|
+
}
|
|
24
|
+
export declare const DECLINE: ElicitationResult;
|
|
25
|
+
export declare const CANCEL: ElicitationResult;
|
|
26
|
+
export declare const ACCEPT: ElicitationResult;
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
readLine: (prompt: string) => Promise<string>;
|
|
4
|
-
writer: {
|
|
5
|
-
line: (text?: string) => void;
|
|
6
|
-
};
|
|
7
|
-
pendingCount: () => number;
|
|
8
|
-
suspendInput?: () => void;
|
|
9
|
-
resumeInput?: () => void;
|
|
10
|
-
pickFromList?: (opts: {
|
|
11
|
-
header: readonly string[];
|
|
12
|
-
options: readonly string[];
|
|
13
|
-
multi?: boolean;
|
|
14
|
-
signal: AbortSignal;
|
|
15
|
-
}) => Promise<readonly string[] | null>;
|
|
16
|
-
readTextOverlay?: (opts: {
|
|
17
|
-
header: readonly string[];
|
|
18
|
-
initial?: string;
|
|
19
|
-
help?: string;
|
|
20
|
-
validate?: (value: string) => string | null;
|
|
21
|
-
signal: AbortSignal;
|
|
22
|
-
}) => Promise<string | null>;
|
|
23
|
-
}
|
|
24
|
-
export declare function makeReplElicitationHandler(deps: ReplElicitationDeps): (request: ElicitationRequest, options: {
|
|
25
|
-
signal: AbortSignal;
|
|
26
|
-
}) => Promise<ElicitationResult>;
|
|
1
|
+
export type { ReplElicitationDeps } from './elicitation/repl-shared.js';
|
|
2
|
+
export { makeReplElicitationHandler } from './elicitation/repl-handler.js';
|