agent-afk 5.311.0 → 5.312.1

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,8 @@
1
+ import type { ArtifactListFilter, ArtifactPutOptions, ArtifactRecord } from './types.js';
2
+ export declare function artifactPut(opts: ArtifactPutOptions, _storeDir?: string, _indexPath?: string): Promise<ArtifactRecord>;
3
+ export declare function artifactGet(id: string, _indexPath?: string): ArtifactRecord | undefined;
4
+ export declare function artifactList(filter?: ArtifactListFilter, _indexPath?: string): ArtifactRecord[];
5
+ export declare function artifactRead(id: string, _indexPath?: string): Promise<Buffer>;
6
+ export declare function artifactCount(_indexPath?: string): number;
7
+ export declare function compactIndex(_indexPath?: string): Promise<void>;
8
+ export declare function listStoreBlobs(_storeDir?: string): string[];
@@ -0,0 +1,45 @@
1
+ export type ArtifactRetention = 'permanent' | 'session' | `ttl:${number}`;
2
+ export interface ArtifactRecord {
3
+ id: string;
4
+ uri: string;
5
+ media_type: string;
6
+ hash: string;
7
+ size: number;
8
+ producer: {
9
+ session_id?: string;
10
+ subagent_id?: string;
11
+ tool_name?: string;
12
+ task_id?: string;
13
+ };
14
+ inputs: string[];
15
+ tags: Record<string, string>;
16
+ created_at: number;
17
+ retention: ArtifactRetention;
18
+ }
19
+ export type ArtifactPutOptions = ({
20
+ path: string;
21
+ content?: never;
22
+ } | {
23
+ content: Buffer | string;
24
+ path?: never;
25
+ }) & {
26
+ media_type?: string;
27
+ producer?: ArtifactRecord['producer'];
28
+ inputs?: string[];
29
+ tags?: Record<string, string>;
30
+ retention?: ArtifactRetention;
31
+ };
32
+ export interface ArtifactListFilter {
33
+ session_id?: string;
34
+ subagent_id?: string;
35
+ tool_name?: string;
36
+ media_type?: string;
37
+ since?: number;
38
+ until?: number;
39
+ retention?: ArtifactRetention;
40
+ tag?: {
41
+ key: string;
42
+ value: string;
43
+ };
44
+ limit?: number;
45
+ }
@@ -27,5 +27,9 @@ export declare function readHandoff(taskId: string, handoffsDir?: string): Promi
27
27
  export declare function deleteHandoff(taskId: string, handoffsDir?: string): Promise<void>;
28
28
  export declare function listPendingHandoffs(handoffsDir?: string): Promise<HandoffRecord[]>;
29
29
  export declare function withHandoffLock<T>(taskId: string, handoffsDir: string, cb: () => Promise<T>): Promise<T | null>;
30
- export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string, responderIdentity?: string): Promise<UpdateHandoffResult>;
30
+ export interface UpdateHandoffAnswerOpts {
31
+ handoffsDir?: string;
32
+ responderIdentity?: string;
33
+ }
34
+ export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, opts?: UpdateHandoffAnswerOpts): Promise<UpdateHandoffResult>;
31
35
  export {};
@@ -0,0 +1,4 @@
1
+ import type { MessageChunk } from '../../agent/types.js';
2
+ import type { SourceState } from './stream-renderer-source.js';
3
+ import type { OrchestratorCtx } from './stream-renderer-orchestrator.js';
4
+ export declare function handleOrchestratorChunk(chunk: MessageChunk, source: SourceState, ctx: OrchestratorCtx): void;
@@ -1,6 +1,10 @@
1
+ import type { MessageChunk } from '../../agent/types.js';
1
2
  import type { SourceState } from './stream-renderer-source.js';
2
3
  import type { SubagentCtx } from './stream-renderer-subagent.js';
3
4
  export declare function extractLatestThinkingClause(buffer: string, maxChars: number): string;
4
5
  export declare function emitSubagentTextLines(text: string, ctx: SubagentCtx): void;
5
6
  export declare function formatSubagentTextLines(text: string): string[];
6
7
  export declare function synthesizeAgentEntry(sourceId: string, source: SourceState, ctx: SubagentCtx, agentContext?: string): void;
8
+ export declare const _thinkingTailLastUpdate: Map<string, number>;
9
+ export declare const _overlayLastUpdate: Map<string, number>;
10
+ export declare function handleSubagentChunk(chunk: MessageChunk, sourceId: string, source: SourceState, parentId: string, ctx: SubagentCtx): void;
@@ -1,3 +1,4 @@
1
1
  import { type SkillInvocation } from '../preflight/index.js';
2
2
  import type { SlashContext } from '../types.js';
3
+ export declare function bareSkillName(name: string): string;
3
4
  export declare function invokeSkillPreflight(skillName: string, rawArgs: string, source: SkillInvocation['source'], ctx: SlashContext): Promise<string | undefined>;