agent-afk 5.20.5 → 5.20.7
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/providers/openai-compatible/query.d.ts +1 -0
- package/dist/agent/session/agent-session.d.ts +1 -0
- package/dist/agent/tools/nesting.d.ts +3 -3
- package/dist/agent/tools/skill-executor.d.ts +3 -1
- package/dist/agent/tools/subagent-executor.d.ts +2 -2
- package/dist/agent/trace/writer.d.ts +1 -0
- package/dist/bundled-plugins/awa-bundled/.claude-plugin/plugin.json +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/automate/SKILL.md +1 -0
- package/dist/bundled-plugins/awa-bundled/skills/research/SKILL.md +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/review/SKILL.md +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/shadow-verify/SKILL.md +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/simplify/SKILL.md +1 -1
- package/dist/cli/commands/interactive/shared.d.ts +2 -2
- package/dist/cli/slash/commands/thinking.d.ts +2 -0
- package/dist/cli/slash/types.d.ts +2 -0
- package/dist/cli.mjs +509 -513
- package/dist/index.mjs +155 -155
- package/dist/telegram.mjs +157 -161
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare class OpenAICompatibleQuery implements ProviderQuery {
|
|
|
41
41
|
private readonly closedPromise;
|
|
42
42
|
private lastUsage;
|
|
43
43
|
constructor(opts: OpenAICompatibleQueryOptions);
|
|
44
|
+
private activeOpenAITools;
|
|
44
45
|
[Symbol.asyncIterator](): AsyncIterator<ProviderEvent>;
|
|
45
46
|
private runTurn;
|
|
46
47
|
private _runTurnInner;
|
|
@@ -23,8 +23,8 @@ export interface CreateChildProviderFactoryOptions {
|
|
|
23
23
|
openaiBaseUrl?: string;
|
|
24
24
|
}
|
|
25
25
|
export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
26
|
-
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined): ModelProvider;
|
|
27
|
-
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceWriter, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry): (depth: number, maxDepth: number, signal: AbortSignal) => SkillExecutor;
|
|
26
|
+
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string): ModelProvider;
|
|
27
|
+
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceWriter, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
28
28
|
export type PhaseRole = 'read-only' | 'read-write';
|
|
29
|
-
export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean): ModelProvider;
|
|
29
|
+
export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string): ModelProvider;
|
|
30
30
|
export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined): ModelProvider;
|
|
@@ -14,11 +14,12 @@ export interface SkillExecutorContext {
|
|
|
14
14
|
apiKey?: string;
|
|
15
15
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
16
16
|
baseUrl?: string;
|
|
17
|
+
openaiBaseUrl?: string;
|
|
17
18
|
pluginConfigs?: SdkPluginConfig[];
|
|
18
19
|
depth?: number;
|
|
19
20
|
maxDepth?: number;
|
|
20
21
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
21
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal) => SkillExecutor;
|
|
22
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
22
23
|
traceWriter?: TraceWriter;
|
|
23
24
|
backgroundRegistry?: BackgroundAgentRegistry;
|
|
24
25
|
cwd?: string;
|
|
@@ -41,6 +42,7 @@ export declare class SkillExecutor {
|
|
|
41
42
|
private executeLoadedPluginSkill;
|
|
42
43
|
private substituteSkillArgs;
|
|
43
44
|
private executePluginSkill;
|
|
45
|
+
private runForkedSkillToResult;
|
|
44
46
|
private getPluginSkillBody;
|
|
45
47
|
private createDispatchSkillCallback;
|
|
46
48
|
}
|
|
@@ -12,12 +12,12 @@ export { DEFAULT_MAX_NESTING_DEPTH, type ChildProviderFactoryArgs } from './nest
|
|
|
12
12
|
export interface SubagentExecutorContext {
|
|
13
13
|
subagentManager: SubagentManager;
|
|
14
14
|
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'>>;
|
|
15
|
-
defaultConfig: Pick<AgentConfig, 'apiKey' | 'systemPrompt' | 'baseUrl'>;
|
|
15
|
+
defaultConfig: Pick<AgentConfig, 'apiKey' | 'systemPrompt' | 'baseUrl' | 'openaiBaseUrl'>;
|
|
16
16
|
surface?: Surface;
|
|
17
17
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
18
18
|
defaultSubagentModel?: AgentModelInput;
|
|
19
19
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
20
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal) => SkillExecutor;
|
|
20
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
21
21
|
depth: number;
|
|
22
22
|
maxDepth?: number;
|
|
23
23
|
backgroundRegistry?: BackgroundAgentRegistry;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: automate
|
|
3
3
|
description: "Set up a scheduled headless afk run that pushes a summary to Telegram. Use when the user wants to automate a recurring task via the afk daemon scheduler (cron) with push-notified results."
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
+
context: load
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
Set up a recurring headless task using afk's **native** scheduler. Do NOT hand-roll launchd plists or shell scripts — afk has first-class scheduling: the `create_schedule` tool writes `~/.afk/config/schedules.json` entries that `afk daemon` runs on cron.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: review
|
|
3
3
|
description: "Dispatches parallel dimension agents across a diff, PR (URL or number), commit SHA, branch, staged changes, or patch file — covering security, correctness, api-compat, test-coverage, and perf-observability — synthesizes findings by severity, and emits a merge recommendation. Use when changes are ready for review before merge. Read-only: this skill analyzes and reports only — it never edits files, commits, pushes, comments on a PR, or modifies the PR description."
|
|
4
4
|
argument-hint: "[diff|pr-url|pr-number|commit-sha|branch|--staged|--head] [--light] [--change-type hotfix|feature|refactor|dep-bump|new-service] [--post github|telegram] [--brief <text>|--spec <path>]"
|
|
5
|
-
context:
|
|
5
|
+
context: load
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Read-only — hard constraint
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shadow-verify
|
|
3
3
|
description: "Dispatch a parallel adversarial verifier wave after any high-stakes sub-agent investigation (code reviews, audits, findings reports, large refactors) — or whenever a sub-agent asserts a claim with high-confidence language (confident, certain, clearly, ≥80%), since confidence is a trigger, not a verdict. Shadow verifiers independently re-derive 2–3 key claims from scratch using tool calls only, returning CONFIRMED/REFUTED/UNVERIFIABLE, and flag disagreements before the user acts. Use when sub-agent output will drive decisions, file changes, commits, or external side-effects."
|
|
4
|
-
context:
|
|
4
|
+
context: load
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Sub-agent contract
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: simplify
|
|
3
3
|
description: "Discovers incidental complexity, duplication, and dead code in a codebase and produces a ranked, behavior-preserving reduction plan — optionally applying safe changes. Dispatches four parallel read-only discovery lenses (clone detection, dead code, complexity hotspots, wrong abstraction), synthesizes into a prioritized reduction plan, and gates apply mode behind /refactor and a hard test check."
|
|
4
4
|
argument-hint: "[target] [--apply] [--all]"
|
|
5
|
-
context:
|
|
5
|
+
context: load
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Sub-agent contract
|
|
@@ -6,7 +6,7 @@ import type { AgentModelInput } from '../../../agent/types.js';
|
|
|
6
6
|
import type { BackgroundAgentRegistry } from '../../../agent/background-registry.js';
|
|
7
7
|
import type { BackgroundSummarizer } from '../../../agent/background-summarizer.js';
|
|
8
8
|
import type { SubagentControl } from '../../../agent/tools/subagent-executor.js';
|
|
9
|
-
import type { SlashContext, SessionStats, ResumeSwapResult } from '../../slash/types.js';
|
|
9
|
+
import type { SlashContext, SessionStats, ResumeSwapResult, ThinkingUiMode } from '../../slash/types.js';
|
|
10
10
|
import type { StoredSession } from '../../session-store.js';
|
|
11
11
|
import type { StatusLine } from '../../status-line.js';
|
|
12
12
|
import type { ReplRenderer } from './repl-renderer.js';
|
|
@@ -16,7 +16,7 @@ import type { GitStatusSampler } from '../../git-status-sampler.js';
|
|
|
16
16
|
export type { ResumeSwapResult } from '../../slash/types.js';
|
|
17
17
|
export declare function reseedStatsFromStored(stats: SessionStats, stored: StoredSession, resumeId: string): void;
|
|
18
18
|
export declare function printResumeBanner(stats: SessionStats, writer: CompletionWriter): void;
|
|
19
|
-
export type ThinkingUiMode
|
|
19
|
+
export type { ThinkingUiMode } from '../../slash/types.js';
|
|
20
20
|
export interface CliOptions {
|
|
21
21
|
model: AgentModelInput;
|
|
22
22
|
maxTurns: string;
|
|
@@ -13,6 +13,7 @@ export type ResumeSwapResult = {
|
|
|
13
13
|
ok: false;
|
|
14
14
|
reason: string;
|
|
15
15
|
};
|
|
16
|
+
export type ThinkingUiMode = 'summary' | 'live' | 'off';
|
|
16
17
|
export interface ToolEvent {
|
|
17
18
|
toolName: string;
|
|
18
19
|
toolUseId: string;
|
|
@@ -47,6 +48,7 @@ export interface SessionStats {
|
|
|
47
48
|
turns: TurnRecord[];
|
|
48
49
|
model: AgentModelInput;
|
|
49
50
|
permissionMode: PermissionMode;
|
|
51
|
+
thinkingUi?: ThinkingUiMode;
|
|
50
52
|
sessionId?: string;
|
|
51
53
|
name?: string;
|
|
52
54
|
cwd?: string;
|