agent-afk 5.26.2 → 5.26.3

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.
@@ -0,0 +1,23 @@
1
+ import type { RawMessageStreamEvent } from '@anthropic-ai/sdk/resources';
2
+ import type { ProviderEvent } from '../../provider.js';
3
+ import type { AnthropicClientLike, ToolDispatcherLike, ToolCall, ToolResult, TranslateCtx } from './types.js';
4
+ export declare function fromArray<T>(arr: T[]): AsyncIterable<T>;
5
+ export declare function collect(gen: AsyncGenerator<ProviderEvent>): Promise<ProviderEvent[]>;
6
+ export declare const SESSION_ID = "sess_loop_test";
7
+ export declare const ctx: TranslateCtx;
8
+ export declare function baseUsage(): {
9
+ input_tokens: number;
10
+ output_tokens: number;
11
+ cache_creation_input_tokens: number;
12
+ cache_read_input_tokens: number;
13
+ };
14
+ export declare function makeTextStream(text: string, stopReason?: string): RawMessageStreamEvent[];
15
+ export declare function makeToolUseStream(toolId: string, toolName: string, inputJson: string): RawMessageStreamEvent[];
16
+ export declare function makeMultiToolUseStream(tools: Array<{
17
+ id: string;
18
+ name: string;
19
+ input: string;
20
+ }>): RawMessageStreamEvent[];
21
+ export declare function makeClient(streamFactory: () => AsyncIterable<RawMessageStreamEvent>): AnthropicClientLike;
22
+ export declare function makeDispatcher(executeFn: (call: ToolCall) => Promise<ToolResult>): ToolDispatcherLike;
23
+ export declare function makeBatchDispatcher(executeBatchFn: (calls: ToolCall[]) => Promise<ToolResult[]>): ToolDispatcherLike;
@@ -0,0 +1,10 @@
1
+ import type { AgentSession } from '../../../agent/session.js';
2
+ import type { SlashCommand } from '../types.js';
3
+ import { type DiscoveredSkill } from './state.js';
4
+ export declare function makeForwardHandler(skill: DiscoveredSkill, flags?: readonly string[]): SlashCommand;
5
+ export declare function registerPluginSkills(session: AgentSession): Promise<number | null>;
6
+ export declare function getPluginShadowingNoticeLines(): string[];
7
+ export declare function autoRegisterPluginPassthroughs(session: AgentSession): Promise<{
8
+ skillCount: number | null;
9
+ agentCount: number | null;
10
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare function harvestPluginSkillFlags(cacheRoot?: string): Map<string, string[]>;
2
+ export declare function harvestAllPluginSkillFlags(): Map<string, string[]>;
3
+ export declare function extractHintFromDescription(description: string): string | undefined;
@@ -0,0 +1,4 @@
1
+ import type { SlashCommand } from '../types.js';
2
+ import { type DiscoveredSkill } from './state.js';
3
+ export declare const initialSkillsCmd: SlashCommand;
4
+ export declare function makeDynamicSkillsCmd(plugins: DiscoveredSkill[]): SlashCommand;
@@ -0,0 +1,14 @@
1
+ import { type SkillManifestEntry } from '../../../agent/tools/skill-bridge.js';
2
+ import { type InstalledPlugin } from '../../../agent/plugins/inventory.js';
3
+ import type { SlashCommand } from '../types.js';
4
+ export declare function buildSourceBreakdown(entries: SkillManifestEntry[]): string;
5
+ export declare function computeSkillDelta(prev: ReadonlySet<string>, next: ReadonlySet<string>): {
6
+ added: string[];
7
+ removed: string[];
8
+ } | null;
9
+ export declare function formatSkillDelta(delta: {
10
+ added: string[];
11
+ removed: string[];
12
+ }): string;
13
+ export declare function buildPluginRows(plugins: InstalledPlugin[]): string[];
14
+ export declare const reloadPluginsCmd: SlashCommand;
@@ -0,0 +1,18 @@
1
+ export interface DiscoveredSkill {
2
+ name: string;
3
+ description: string;
4
+ argumentHint?: string;
5
+ }
6
+ export interface PluginCollision {
7
+ bare: string;
8
+ altSlash: string;
9
+ altDescription: string;
10
+ }
11
+ export interface PluginSkillsState {
12
+ discovered: DiscoveredSkill[];
13
+ collisions: PluginCollision[];
14
+ shadowedBareNames: Set<string>;
15
+ }
16
+ export declare let state: PluginSkillsState;
17
+ export declare function setState(next: PluginSkillsState): void;
18
+ export declare function bareName(name: string): string;
@@ -1,32 +1,5 @@
1
- import type { AgentSession } from '../../agent/session.js';
2
- import { type SkillManifestEntry } from '../../agent/tools/skill-bridge.js';
3
- import { type InstalledPlugin } from '../../agent/plugins/inventory.js';
4
- import type { SlashCommand } from './types.js';
5
- interface DiscoveredSkill {
6
- name: string;
7
- description: string;
8
- argumentHint?: string;
9
- }
10
- export declare function harvestPluginSkillFlags(cacheRoot?: string): Map<string, string[]>;
11
- export declare function extractHintFromDescription(description: string): string | undefined;
12
- export declare function makeForwardHandler(skill: DiscoveredSkill, flags?: readonly string[]): SlashCommand;
13
- export declare const initialSkillsCmd: SlashCommand;
14
- export declare function registerPluginSkills(session: AgentSession): Promise<number | null>;
15
- export declare function getPluginShadowingNoticeLines(): string[];
16
- export declare function autoRegisterPluginPassthroughs(session: AgentSession): Promise<{
17
- skillCount: number | null;
18
- agentCount: number | null;
19
- }>;
20
- export declare function buildSourceBreakdown(entries: SkillManifestEntry[]): string;
21
- export declare function computeSkillDelta(prev: ReadonlySet<string>, next: ReadonlySet<string>): {
22
- added: string[];
23
- removed: string[];
24
- } | null;
25
- export declare function formatSkillDelta(delta: {
26
- added: string[];
27
- removed: string[];
28
- }): string;
29
- export declare function buildPluginRows(plugins: InstalledPlugin[]): string[];
30
- export declare const reloadPluginsCmd: SlashCommand;
1
+ export { harvestPluginSkillFlags, extractHintFromDescription, } from './plugin-skills/flags.js';
2
+ export { initialSkillsCmd } from './plugin-skills/listing.js';
3
+ export { makeForwardHandler, registerPluginSkills, getPluginShadowingNoticeLines, autoRegisterPluginPassthroughs, } from './plugin-skills/dispatch.js';
4
+ export { buildSourceBreakdown, computeSkillDelta, formatSkillDelta, buildPluginRows, reloadPluginsCmd, } from './plugin-skills/reload.js';
31
5
  export declare function registerStaticPluginSkillCommands(): void;
32
- export {};