agent-afk 5.311.0 → 5.312.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,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
+ }