agent-afk 5.321.8 → 5.321.10
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/daemon/handoff-maintenance.d.ts +1 -1
- package/dist/agent/providers/openai-compatible/query/dispatch-append.parse-errors.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/turn-driver.emit-terminal.d.ts +6 -0
- package/dist/agent/tools/compose-agent-resolve.d.ts +1 -0
- package/dist/agent/tools/subagent/write-capability.d.ts +1 -0
- package/dist/agent/tools/subagent-executor.dispatch-intent.d.ts +11 -0
- package/dist/agent/tools/subagent-executor.execute-once.helpers.d.ts +0 -1
- package/dist/agent/tools/subagent-executor.write-intent.d.ts +0 -1
- package/dist/agent/trace/events.d.ts +6 -0
- package/dist/agent/trace/events.subagent-lifecycle.d.ts +3 -0
- package/dist/agent/trace/types.d.ts +1 -1
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/agent/types/sdk-types.d.ts +2 -0
- package/dist/cli/commands/chat.action-body.d.ts +2 -0
- package/dist/cli/commands/interactive/shared.d.ts +3 -1
- package/dist/cli.mjs +391 -391
- package/dist/index.mjs +199 -199
- package/dist/remote/hosts.d.ts +2 -0
- package/dist/remote/remote-run.d.ts +2 -0
- package/dist/remote/remote-script.d.ts +2 -0
- package/dist/telegram/bg-result-notifier.d.ts +2 -0
- package/dist/telegram/handlers/message.d.ts +1 -0
- package/dist/telegram/handlers/message.wake-idle.d.ts +13 -0
- package/dist/telegram/session-context.d.ts +1 -0
- package/dist/telegram/session-manager.d.ts +1 -0
- package/dist/telegram/session-manager.session-builder.d.ts +1 -0
- package/dist/telegram/wire-telegram-executors.d.ts +1 -0
- package/dist/telegram.mjs +215 -215
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export interface HandoffMaintenanceOpts {
|
|
|
13
13
|
intervalMs?: number;
|
|
14
14
|
}
|
|
15
15
|
export interface HandoffMaintenanceHandle {
|
|
16
|
-
stop(): void
|
|
16
|
+
stop(): Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
export declare function runStartupRecovery(opts: HandoffMaintenanceOpts, resumeDir: string): Promise<void>;
|
|
19
19
|
export declare function consumeAndResume(opts: HandoffMaintenanceOpts, resumeDir: string): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ToolCall, ToolResult } from '../../anthropic-direct/types.js';
|
|
2
2
|
import type { AccumulatedToolCall } from '../translate.js';
|
|
3
|
+
export declare const LOST_ARGS_FAILURE_CLASS: "lost-args";
|
|
3
4
|
export declare function parseErrorResult(name: string, diagnostic: string, argumentsLost: boolean): ToolResult;
|
|
4
5
|
export declare function dispatchableCalls(calls: readonly ToolCall[], parseErrors: ReadonlyMap<string, string>): ToolCall[];
|
|
5
6
|
export declare function mergeUndispatchedResults(calls: readonly ToolCall[], accumulated: readonly AccumulatedToolCall[], parseErrors: ReadonlyMap<string, string>, dispatchedResults: readonly ToolResult[]): ToolResult[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ProviderEvent, ProviderUsage } from '../../../provider.js';
|
|
2
|
+
import { TOOL_USE_LOOP_CAPPED } from '../../shared/tool-loop-cap.js';
|
|
3
|
+
import { SOFT_DEADLINE_WIND_DOWN } from '../../shared/soft-deadline.js';
|
|
4
|
+
import { CONTEXT_PRESSURE_WIND_DOWN } from '../../shared/context-pressure.js';
|
|
5
|
+
import type { TurnDriverContext } from './turn-driver.js';
|
|
6
|
+
export declare function emitTurnTerminal(ctx: TurnDriverContext, finalAssistantText: string, droppedToolNames: string[], accumulatedUsage: ProviderUsage, windDownReason: typeof TOOL_USE_LOOP_CAPPED | typeof SOFT_DEADLINE_WIND_DOWN | typeof CONTEXT_PRESSURE_WIND_DOWN | null, turnStartTime: number): AsyncGenerator<ProviderEvent>;
|
|
@@ -11,6 +11,7 @@ export interface ResolvedComposeAgent {
|
|
|
11
11
|
canUseTool?: CanUseTool;
|
|
12
12
|
namedAgentAllowedTools?: string[];
|
|
13
13
|
readOnlyBash?: true;
|
|
14
|
+
readOnly?: true;
|
|
14
15
|
}
|
|
15
16
|
export declare function buildAllowlistCanUseTool(allowed: string[]): CanUseTool;
|
|
16
17
|
export declare function resolveComposeNodeAgent(agentType: string | undefined, agentRegistry: AgentRegistry | undefined): ResolvedComposeAgent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isChildWriteCapable(effectiveAllowedTools: readonly string[] | undefined, effectiveReadOnlyBash: boolean): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RegisteredAgent } from '../agents/index.js';
|
|
2
|
+
import type { ToolResult } from './types.js';
|
|
3
|
+
export declare function classifyDispatchIntent(prompt: string): string | undefined;
|
|
4
|
+
export declare function checkReadOnlyDispatchIntent(childWriteCapable: boolean, namedAgent: RegisteredAgent | undefined, prompt: string, classifyFn: (p: string) => string | undefined): ToolResult | undefined;
|
|
5
|
+
export declare function checkComposeReadOnlyDispatchIntent(nodes: ReadonlyArray<{
|
|
6
|
+
id: string;
|
|
7
|
+
prompt: string;
|
|
8
|
+
agent_type?: string;
|
|
9
|
+
}>, resolvedAgents: ReadonlyArray<{
|
|
10
|
+
readOnly?: true;
|
|
11
|
+
}>, classifyFn?: (p: string) => string | undefined): ToolResult | undefined;
|
|
@@ -103,4 +103,3 @@ 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,2 +1 @@
|
|
|
1
|
-
export declare function classifyDispatchIntent(prompt: string): boolean;
|
|
2
1
|
export declare function collectPostRunWarnings(model: string, hasAttachments: boolean, agentName: string | undefined, prompt: string, childWriteCapable: boolean, supportsVisionFn: (m: string) => boolean): string;
|
|
@@ -36,6 +36,7 @@ export declare const ToolCallCompletedPayloadSchema: z.ZodObject<{
|
|
|
36
36
|
"repeat-failure": "repeat-failure";
|
|
37
37
|
"no-such-target": "no-such-target";
|
|
38
38
|
"hook-block-repeat": "hook-block-repeat";
|
|
39
|
+
"lost-args": "lost-args";
|
|
39
40
|
}>>;
|
|
40
41
|
batchIndex: z.ZodOptional<z.ZodNumber>;
|
|
41
42
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -73,6 +74,7 @@ export declare const ToolCallPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
73
74
|
"repeat-failure": "repeat-failure";
|
|
74
75
|
"no-such-target": "no-such-target";
|
|
75
76
|
"hook-block-repeat": "hook-block-repeat";
|
|
77
|
+
"lost-args": "lost-args";
|
|
76
78
|
}>>;
|
|
77
79
|
batchIndex: z.ZodOptional<z.ZodNumber>;
|
|
78
80
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -339,6 +341,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
339
341
|
"repeat-failure": "repeat-failure";
|
|
340
342
|
"no-such-target": "no-such-target";
|
|
341
343
|
"hook-block-repeat": "hook-block-repeat";
|
|
344
|
+
"lost-args": "lost-args";
|
|
342
345
|
}>>;
|
|
343
346
|
batchIndex: z.ZodOptional<z.ZodNumber>;
|
|
344
347
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -436,6 +439,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
436
439
|
"repeat-failure": "repeat-failure";
|
|
437
440
|
"no-such-target": "no-such-target";
|
|
438
441
|
"hook-block-repeat": "hook-block-repeat";
|
|
442
|
+
"lost-args": "lost-args";
|
|
439
443
|
}>>;
|
|
440
444
|
}, z.core.$strip>, z.ZodObject<{
|
|
441
445
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -766,6 +770,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
766
770
|
"repeat-failure": "repeat-failure";
|
|
767
771
|
"no-such-target": "no-such-target";
|
|
768
772
|
"hook-block-repeat": "hook-block-repeat";
|
|
773
|
+
"lost-args": "lost-args";
|
|
769
774
|
}>>;
|
|
770
775
|
batchIndex: z.ZodOptional<z.ZodNumber>;
|
|
771
776
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -869,6 +874,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
869
874
|
"repeat-failure": "repeat-failure";
|
|
870
875
|
"no-such-target": "no-such-target";
|
|
871
876
|
"hook-block-repeat": "hook-block-repeat";
|
|
877
|
+
"lost-args": "lost-args";
|
|
872
878
|
}>>;
|
|
873
879
|
}, z.core.$strip>, z.ZodObject<{
|
|
874
880
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -11,6 +11,7 @@ export declare const ToolFailureClassSchema: z.ZodEnum<{
|
|
|
11
11
|
"repeat-failure": "repeat-failure";
|
|
12
12
|
"no-such-target": "no-such-target";
|
|
13
13
|
"hook-block-repeat": "hook-block-repeat";
|
|
14
|
+
"lost-args": "lost-args";
|
|
14
15
|
}>;
|
|
15
16
|
export declare const SubagentStartedPayloadSchema: z.ZodObject<{
|
|
16
17
|
transition: z.ZodLiteral<"started">;
|
|
@@ -65,6 +66,7 @@ export declare const SubagentFailedPayloadSchema: z.ZodObject<{
|
|
|
65
66
|
"repeat-failure": "repeat-failure";
|
|
66
67
|
"no-such-target": "no-such-target";
|
|
67
68
|
"hook-block-repeat": "hook-block-repeat";
|
|
69
|
+
"lost-args": "lost-args";
|
|
68
70
|
}>>;
|
|
69
71
|
}, z.core.$strip>;
|
|
70
72
|
export declare const SubagentCancelledPayloadSchema: z.ZodObject<{
|
|
@@ -134,6 +136,7 @@ export declare const SubagentLifecyclePayloadSchema: z.ZodDiscriminatedUnion<[z.
|
|
|
134
136
|
"repeat-failure": "repeat-failure";
|
|
135
137
|
"no-such-target": "no-such-target";
|
|
136
138
|
"hook-block-repeat": "hook-block-repeat";
|
|
139
|
+
"lost-args": "lost-args";
|
|
137
140
|
}>>;
|
|
138
141
|
}, z.core.$strip>, z.ZodObject<{
|
|
139
142
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -8,7 +8,7 @@ export interface ToolCallStartedPayload {
|
|
|
8
8
|
resourceFingerprint?: string;
|
|
9
9
|
subagentId?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const TOOL_FAILURE_CLASSES: readonly ["policy-refusal", "timeout", "budget", "permission-denied", "hook-block", "abort", "elicitation-declined", "denial-breaker", "repeat-failure", "no-such-target", "hook-block-repeat"];
|
|
11
|
+
export declare const TOOL_FAILURE_CLASSES: readonly ["policy-refusal", "timeout", "budget", "permission-denied", "hook-block", "abort", "elicitation-declined", "denial-breaker", "repeat-failure", "no-such-target", "hook-block-repeat", "lost-args"];
|
|
12
12
|
export type ToolFailureClass = (typeof TOOL_FAILURE_CLASSES)[number];
|
|
13
13
|
export declare const BENIGN_FAILURE_CLASSES: ReadonlySet<ToolFailureClass>;
|
|
14
14
|
export interface ToolCallCompletedPayload {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
2
2
|
export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk' | 'auto' | 'autonomous';
|
|
3
|
+
export declare const VALID_PERMISSION_MODES: ReadonlySet<string>;
|
|
4
|
+
export declare function isValidPermissionMode(value: string): value is PermissionMode;
|
|
3
5
|
export type SettingSource = 'user' | 'project' | 'local';
|
|
4
6
|
export type ApiKeySource = 'user' | 'project' | 'org' | 'temporary' | 'oauth';
|
|
5
7
|
export type SDKStatus = 'compacting' | 'requesting' | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentSession } from '../../agent/session.js';
|
|
2
2
|
import type { AgentModelInput } from '../../agent/types.js';
|
|
3
|
+
import type { PermissionMode } from '../../agent/types/sdk-types.js';
|
|
3
4
|
import { parseThinking, parseEffort } from '../shared-helpers.js';
|
|
4
5
|
import { setupWorktree } from './interactive/worktree.js';
|
|
5
6
|
import { resolveResumeTarget, resumeConfigFor } from '../resume-session.js';
|
|
@@ -30,6 +31,7 @@ export interface ChatActionOptions {
|
|
|
30
31
|
sessionId?: string;
|
|
31
32
|
post?: string;
|
|
32
33
|
postPr?: string;
|
|
34
|
+
permissionMode?: PermissionMode;
|
|
33
35
|
dangerouslySkipPermissions?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export declare function resolvePostTargets(post: string | undefined): PostTarget[];
|
|
@@ -6,6 +6,7 @@ import type { SessionRef } from '../../../agent/session-ref.js';
|
|
|
6
6
|
import type { MemoryStore } from '../../../agent/memory/index.js';
|
|
7
7
|
import type { StateStore } from '../../../agent/state/state-store.js';
|
|
8
8
|
import type { AgentModelInput } from '../../../agent/types.js';
|
|
9
|
+
import type { PermissionMode } from '../../../agent/types/sdk-types.js';
|
|
9
10
|
import type { BackgroundAgentRegistry } from '../../../agent/background-registry.js';
|
|
10
11
|
import type { BackgroundSummarizer } from '../../../agent/background-summarizer.js';
|
|
11
12
|
import type { SubagentControl } from '../../../agent/tools/subagent-executor.js';
|
|
@@ -36,6 +37,7 @@ export interface CliOptions {
|
|
|
36
37
|
continue?: boolean;
|
|
37
38
|
debug?: boolean;
|
|
38
39
|
dangerouslySkipPermissions?: boolean;
|
|
40
|
+
permissionMode?: PermissionMode;
|
|
39
41
|
worktree?: string | true;
|
|
40
42
|
worktreeAutoname?: boolean;
|
|
41
43
|
worktreeBase?: string;
|
|
@@ -169,5 +171,5 @@ export declare function formatStatusFields(stats: SessionStats, sampler?: Contex
|
|
|
169
171
|
contextLimit: number;
|
|
170
172
|
contextUsedTokens: number | undefined;
|
|
171
173
|
contextSparkline: string | undefined;
|
|
172
|
-
permissionMode:
|
|
174
|
+
permissionMode: PermissionMode;
|
|
173
175
|
};
|