agent-afk 5.89.1 → 5.90.0
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/content/attachment-registry.d.ts +29 -0
- package/dist/agent/tools/subagent/attachment-resolve.d.ts +3 -0
- package/dist/agent/tools/subagent-executor.d.ts +2 -0
- package/dist/cli/slash/_lib/skill-message-bridge.d.ts +1 -1
- package/dist/cli/slash/_lib/user-payload.d.ts +1 -1
- package/dist/cli.mjs +508 -508
- package/dist/index.mjs +170 -170
- package/dist/paths.d.ts +1 -0
- package/dist/telegram.mjs +233 -233
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
2
|
+
import { type ImageBlockAttachment } from './image-blocks.js';
|
|
3
|
+
export type InboundMediaType = ImageBlockAttachment['mediaType'];
|
|
4
|
+
export interface InboundAttachmentRecord {
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly mediaType: InboundMediaType;
|
|
7
|
+
readonly sizeBytes: number;
|
|
8
|
+
}
|
|
9
|
+
export interface InboundAttachmentRegistration extends InboundAttachmentRecord {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface InboundAttachmentReader {
|
|
13
|
+
get(sessionId: string, id: string): InboundAttachmentRecord | undefined;
|
|
14
|
+
listIds(sessionId: string): string[];
|
|
15
|
+
}
|
|
16
|
+
type HashBytes = (bytes: Buffer) => string;
|
|
17
|
+
export declare function formatInboundImageMarker(id: string, mediaType: InboundMediaType, sizeBytes: number): string;
|
|
18
|
+
export declare function registerInboundImageBlocks(blocks: ContentBlockParam[], sessionId: string, attachments: readonly ImageBlockAttachment[], registry?: InboundAttachmentRegistry): Promise<void>;
|
|
19
|
+
export declare class InboundAttachmentRegistry implements InboundAttachmentReader {
|
|
20
|
+
private readonly entries;
|
|
21
|
+
private readonly hashBytes;
|
|
22
|
+
constructor(entries?: Map<string, Map<string, InboundAttachmentRecord>>, hashBytes?: HashBytes);
|
|
23
|
+
get(sessionId: string, id: string): InboundAttachmentRecord | undefined;
|
|
24
|
+
listIds(sessionId: string): string[];
|
|
25
|
+
clear(sessionId: string): void;
|
|
26
|
+
put(sessionId: string, bytes: Buffer, mediaType: InboundMediaType): Promise<InboundAttachmentRegistration>;
|
|
27
|
+
}
|
|
28
|
+
export declare const inboundAttachmentRegistry: InboundAttachmentRegistry;
|
|
29
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InboundAttachmentReader } from '../../content/attachment-registry.js';
|
|
1
2
|
import type { ImageBlockAttachment } from '../../content/image-blocks.js';
|
|
2
3
|
export declare const MAX_SUBAGENT_ATTACHMENT_COUNT = 8;
|
|
3
4
|
export declare const MAX_SUBAGENT_ATTACHMENT_BYTES: number;
|
|
@@ -5,5 +6,7 @@ export interface ResolveSubagentAttachmentsArgs {
|
|
|
5
6
|
paths: readonly string[];
|
|
6
7
|
resolveBase: string | undefined;
|
|
7
8
|
readRoots: string[] | undefined;
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
registry?: InboundAttachmentReader;
|
|
8
11
|
}
|
|
9
12
|
export declare function resolveSubagentAttachments(args: ResolveSubagentAttachmentsArgs): Promise<ImageBlockAttachment[]>;
|
|
@@ -11,6 +11,7 @@ import type { SkillExecutor } from './skill-executor.js';
|
|
|
11
11
|
import type { Surface } from '../awareness/types.js';
|
|
12
12
|
import type { TraceWriter } from '../trace/index.js';
|
|
13
13
|
import { type AgentExecutionMode } from './subagent/input-parse.js';
|
|
14
|
+
import { type InboundAttachmentReader } from '../content/attachment-registry.js';
|
|
14
15
|
export { DEFAULT_MAX_NESTING_DEPTH, type ChildProviderFactoryArgs } from './nesting.js';
|
|
15
16
|
export type { AgentExecutionMode };
|
|
16
17
|
export interface SubagentExecutorContext {
|
|
@@ -31,6 +32,7 @@ export interface SubagentExecutorContext {
|
|
|
31
32
|
readOnlyBash?: boolean;
|
|
32
33
|
nestedAgentAllowlist?: readonly string[];
|
|
33
34
|
agentRegistry?: AgentRegistry;
|
|
35
|
+
inboundAttachmentRegistry?: InboundAttachmentReader;
|
|
34
36
|
parentModel?: AgentModelInput;
|
|
35
37
|
}
|
|
36
38
|
export interface PromotedSubagentInfo {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { SkillMetadata } from '../../../skills/index.js';
|
|
3
3
|
import type { ImageAttachment } from '../../input/attachments.js';
|
|
4
|
-
export declare function buildSkillInvocationMessage(skill: SkillMetadata, args: string, manifestBlock?: string, attachments?: readonly ImageAttachment[]): ContentBlockParam[]
|
|
4
|
+
export declare function buildSkillInvocationMessage(skill: SkillMetadata, args: string, manifestBlock?: string, attachments?: readonly ImageAttachment[], sessionId?: string): Promise<ContentBlockParam[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { ImageAttachment } from '../../input/attachments.js';
|
|
3
|
-
export declare function buildUserPayload(text: string, attachments: readonly ImageAttachment[], manifestBlock?: string, fileBlocks?: readonly ContentBlockParam[]): ContentBlockParam[]
|
|
3
|
+
export declare function buildUserPayload(text: string, attachments: readonly ImageAttachment[], manifestBlock?: string, fileBlocks?: readonly ContentBlockParam[], sessionId?: string): Promise<ContentBlockParam[]>;
|