agent-afk 5.89.1 → 5.91.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.
@@ -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 {
@@ -23,7 +23,7 @@ export interface CliOptions {
23
23
  maxTurns: string;
24
24
  thinking?: string;
25
25
  thinkingUi?: ThinkingUiMode;
26
- theme?: 'dark' | 'light' | 'auto';
26
+ theme?: 'dark' | 'light' | 'umber' | 'auto';
27
27
  effort?: string;
28
28
  maxOutputTokens?: string;
29
29
  resume?: string;
@@ -52,7 +52,7 @@ export interface CliConfig {
52
52
  thinkingUi?: 'summary' | 'live' | 'digest' | 'off';
53
53
  };
54
54
  updatePolicy: 'notify' | 'auto' | 'off';
55
- theme?: 'dark' | 'light' | 'auto';
55
+ theme?: 'dark' | 'light' | 'umber' | 'auto';
56
56
  autoResumeOnUsageLimit?: boolean;
57
57
  enforceDoneEvidence?: boolean;
58
58
  bgSummaries?: boolean;
@@ -117,7 +117,7 @@ export interface ConfigFileSchema {
117
117
  thinkingUi?: 'summary' | 'live' | 'digest' | 'off';
118
118
  };
119
119
  updatePolicy?: 'notify' | 'auto' | 'off';
120
- theme?: 'dark' | 'light' | 'auto';
120
+ theme?: 'dark' | 'light' | 'umber' | 'auto';
121
121
  autoResumeOnUsageLimit?: boolean;
122
122
  enforceDoneEvidence?: boolean;
123
123
  bgSummaries?: boolean;
@@ -33,5 +33,6 @@ export type ThemePalette = {
33
33
  };
34
34
  export declare const darkPalette: ThemePalette;
35
35
  export declare const lightPalette: ThemePalette;
36
+ export declare const umberPalette: ThemePalette;
36
37
  export declare const palette: ThemePalette;
37
38
  export {};
@@ -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[]>;
@@ -1,9 +1,11 @@
1
- export type ThemeName = 'dark' | 'light';
1
+ export type ThemeName = 'dark' | 'light' | 'umber';
2
2
  export type ThemeMode = ThemeName | 'auto';
3
+ export type AutoDetectableTheme = 'dark' | 'light';
4
+ export declare const THEME_NAMES: readonly ThemeName[];
3
5
  export declare function getActiveTheme(): ThemeName;
4
6
  export declare function applyTheme(name: ThemeName): void;
5
7
  export declare function parseThemeMode(raw: string | undefined | null): ThemeMode | undefined;
6
- export declare function detectTerminalTheme(): ThemeName;
8
+ export declare function detectTerminalTheme(): AutoDetectableTheme;
7
9
  export declare function resolveTheme(mode: ThemeMode | undefined): ThemeName;
8
10
  export declare function parseThemeFlag(raw: string): ThemeMode;
9
11
  export declare function resolveThemeMode(flag: ThemeMode | undefined, config: ThemeMode | undefined): ThemeMode | undefined;