@ai-ecoverse/slicc-agent 6.2.2 → 6.3.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.
- package/README.md +10 -0
- package/dist/freezer/index.js +27 -3
- package/dist/freezer/index.js.map +2 -2
- package/dist/freezer/v6-schema.js +343 -0
- package/dist/freezer/v6-schema.js.map +7 -0
- package/dist/freezer/v6.js +249 -0
- package/dist/freezer/v6.js.map +7 -0
- package/dist/freezer/zip.js +89 -0
- package/dist/freezer/zip.js.map +7 -0
- package/dist/main.js +14 -9
- package/dist/main.js.map +2 -2
- package/dist/memory/runtime.js +14 -4
- package/dist/memory/runtime.js.map +2 -2
- package/dist/scoops/cli.js +4 -1
- package/dist/scoops/cli.js.map +2 -2
- package/dist/types/freezer/index.d.ts +9 -2
- package/dist/types/freezer/v6-schema.d.ts +141 -0
- package/dist/types/freezer/v6.d.ts +52 -0
- package/dist/types/freezer/zip.d.ts +14 -0
- package/dist/types/scoops/cli.d.ts +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
type Json = Record<string, unknown>;
|
|
2
|
+
export type Block = {
|
|
3
|
+
type: 'text';
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: 'tool-call';
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
input: unknown;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'attachment-ref';
|
|
12
|
+
attachmentId: string;
|
|
13
|
+
};
|
|
14
|
+
export type V6Message = {
|
|
15
|
+
id: string;
|
|
16
|
+
sequence: number;
|
|
17
|
+
role: 'user' | 'assistant' | 'tool-result';
|
|
18
|
+
timestamp: string;
|
|
19
|
+
content: Block[];
|
|
20
|
+
toolCallId?: string;
|
|
21
|
+
isError?: boolean;
|
|
22
|
+
model?: {
|
|
23
|
+
provider: string;
|
|
24
|
+
id: string;
|
|
25
|
+
api?: string;
|
|
26
|
+
};
|
|
27
|
+
usage?: Json;
|
|
28
|
+
stopReason?: string;
|
|
29
|
+
};
|
|
30
|
+
export type V6Conversation = {
|
|
31
|
+
id: string;
|
|
32
|
+
kind: 'cone' | 'scoop';
|
|
33
|
+
name: string;
|
|
34
|
+
folder?: string;
|
|
35
|
+
messages: V6Message[];
|
|
36
|
+
};
|
|
37
|
+
export type V6Attachment = {
|
|
38
|
+
id: string;
|
|
39
|
+
path: string;
|
|
40
|
+
originalName: string;
|
|
41
|
+
sha256: string;
|
|
42
|
+
byteLength: number;
|
|
43
|
+
present: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type Transcript = {
|
|
46
|
+
session: {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
updatedAt?: string;
|
|
50
|
+
frozenAt?: string;
|
|
51
|
+
createdAt?: string;
|
|
52
|
+
};
|
|
53
|
+
conversations: V6Conversation[];
|
|
54
|
+
attachments: V6Attachment[];
|
|
55
|
+
};
|
|
56
|
+
export type ManifestScoop = {
|
|
57
|
+
key: string;
|
|
58
|
+
folder: string;
|
|
59
|
+
name: string;
|
|
60
|
+
conversation: string | null;
|
|
61
|
+
};
|
|
62
|
+
export type ManifestCone = ManifestScoop & {
|
|
63
|
+
transcript: string | null;
|
|
64
|
+
memory: string | null;
|
|
65
|
+
scoops: ManifestScoop[];
|
|
66
|
+
};
|
|
67
|
+
export type Manifest = {
|
|
68
|
+
exportId: string;
|
|
69
|
+
producer: {
|
|
70
|
+
slicc: string;
|
|
71
|
+
origin: string;
|
|
72
|
+
};
|
|
73
|
+
createdAt: string;
|
|
74
|
+
part?: {
|
|
75
|
+
index: number;
|
|
76
|
+
of: number;
|
|
77
|
+
};
|
|
78
|
+
cones: ManifestCone[];
|
|
79
|
+
frozen: {
|
|
80
|
+
id: string;
|
|
81
|
+
title: string;
|
|
82
|
+
frozenAt: string | null;
|
|
83
|
+
transcript: string;
|
|
84
|
+
}[];
|
|
85
|
+
skills: {
|
|
86
|
+
name: string;
|
|
87
|
+
path: string;
|
|
88
|
+
}[];
|
|
89
|
+
sprinkles: {
|
|
90
|
+
name: string;
|
|
91
|
+
path: string;
|
|
92
|
+
}[];
|
|
93
|
+
licks: string | null;
|
|
94
|
+
gitconfig?: string | null;
|
|
95
|
+
files: {
|
|
96
|
+
path: string;
|
|
97
|
+
size: number;
|
|
98
|
+
sha256: string;
|
|
99
|
+
}[];
|
|
100
|
+
skipped: {
|
|
101
|
+
path: string;
|
|
102
|
+
reason: string;
|
|
103
|
+
}[];
|
|
104
|
+
flagged: {
|
|
105
|
+
path: string;
|
|
106
|
+
size: number;
|
|
107
|
+
rule: string;
|
|
108
|
+
}[];
|
|
109
|
+
providers: string[];
|
|
110
|
+
mcp?: {
|
|
111
|
+
name: string;
|
|
112
|
+
url: string;
|
|
113
|
+
}[];
|
|
114
|
+
secrets?: string[];
|
|
115
|
+
};
|
|
116
|
+
export type Licks = {
|
|
117
|
+
crontasks: {
|
|
118
|
+
name: string;
|
|
119
|
+
cron: string;
|
|
120
|
+
targetFolder?: string | null;
|
|
121
|
+
filter?: string;
|
|
122
|
+
}[];
|
|
123
|
+
tasks: {
|
|
124
|
+
groupFolder: string;
|
|
125
|
+
prompt: string;
|
|
126
|
+
scheduleType: string;
|
|
127
|
+
scheduleValue: string;
|
|
128
|
+
}[];
|
|
129
|
+
webhooks: {
|
|
130
|
+
name: string;
|
|
131
|
+
targetFolder?: string | null;
|
|
132
|
+
filter?: string;
|
|
133
|
+
}[];
|
|
134
|
+
};
|
|
135
|
+
export declare const FOLDER: RegExp;
|
|
136
|
+
export declare function checkTranscript(value: unknown): Transcript;
|
|
137
|
+
export declare function checkManifest(value: unknown): Manifest;
|
|
138
|
+
export declare function checkLicks(value: unknown): Licks;
|
|
139
|
+
export declare function lickName(name: string, fallback: string): string;
|
|
140
|
+
export declare function skillName(name: string): string;
|
|
141
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Context } from '@earendil-works/chord';
|
|
2
|
+
import type { ExecutionEnv } from '@earendil-works/pi-durable/env';
|
|
3
|
+
import { type Manifest } from './v6-schema.ts';
|
|
4
|
+
import { type ZipEntry } from './zip.ts';
|
|
5
|
+
export declare const LIMITS: {
|
|
6
|
+
archive: number;
|
|
7
|
+
entries: number;
|
|
8
|
+
file: number;
|
|
9
|
+
transcript: number;
|
|
10
|
+
total: number;
|
|
11
|
+
ratio: number;
|
|
12
|
+
};
|
|
13
|
+
export interface ImportPreview {
|
|
14
|
+
exportId: string;
|
|
15
|
+
origin: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
cones: number;
|
|
18
|
+
scoops: number;
|
|
19
|
+
frozen: number;
|
|
20
|
+
bytes: number;
|
|
21
|
+
skills: string[];
|
|
22
|
+
crons: number;
|
|
23
|
+
webhooks: number;
|
|
24
|
+
flagged: number;
|
|
25
|
+
providers: string[];
|
|
26
|
+
mounts: string[];
|
|
27
|
+
text: string;
|
|
28
|
+
}
|
|
29
|
+
export type ImportSource = {
|
|
30
|
+
path: string;
|
|
31
|
+
} | {
|
|
32
|
+
bytes: Uint8Array;
|
|
33
|
+
};
|
|
34
|
+
export type Opened = {
|
|
35
|
+
manifest: Manifest;
|
|
36
|
+
entries: Map<string, ZipEntry>;
|
|
37
|
+
bytes: Uint8Array;
|
|
38
|
+
key: string;
|
|
39
|
+
};
|
|
40
|
+
export type Where = {
|
|
41
|
+
kind: 'data' | 'skip' | 'attachment';
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'cone' | 'scoop' | 'home-user' | 'skill' | 'sprinkle';
|
|
44
|
+
folder: string;
|
|
45
|
+
rest: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const day: (at: number | string) => string;
|
|
48
|
+
export declare function textOf(bytes: Uint8Array, name: string): string;
|
|
49
|
+
export declare function whereOf(manifest: Manifest, name: string): Where;
|
|
50
|
+
export declare function openProfile(bytes: Uint8Array): Promise<Opened>;
|
|
51
|
+
export declare function previewOf(opened: Opened): Promise<ImportPreview>;
|
|
52
|
+
export declare function checkProfile(env: ExecutionEnv, source: ImportSource, context: Context): Promise<ImportPreview>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class ImportError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export type ZipEntry = {
|
|
4
|
+
name: string;
|
|
5
|
+
method: number;
|
|
6
|
+
flags: number;
|
|
7
|
+
compressed: number;
|
|
8
|
+
size: number;
|
|
9
|
+
offset: number;
|
|
10
|
+
mode: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function zipEntries(bytes: Uint8Array): ZipEntry[];
|
|
13
|
+
export declare function isLink(entry: ZipEntry): boolean;
|
|
14
|
+
export declare function readEntry(bytes: Uint8Array, entry: ZipEntry): Promise<Uint8Array>;
|
|
@@ -24,7 +24,10 @@ export interface CliOptions {
|
|
|
24
24
|
now?: () => number;
|
|
25
25
|
memory?: (argv: readonly string[], caller: string | null, context: Context) => Promise<Answer>;
|
|
26
26
|
gelatiere?: (argv: readonly string[], caller: string | null, context: Context) => Promise<Answer>;
|
|
27
|
-
freezer?: (argv: readonly string[], caller: string | null, context: Context
|
|
27
|
+
freezer?: (argv: readonly string[], caller: string | null, context: Context, asker?: {
|
|
28
|
+
user: string | null;
|
|
29
|
+
cwd: string;
|
|
30
|
+
}) => Promise<Answer>;
|
|
28
31
|
models?: (argv: readonly string[], caller: string | null, context: Context) => Promise<Answer>;
|
|
29
32
|
layout?: Layout;
|
|
30
33
|
panel?: (argv: readonly string[], caller: PanelCaller, context: Context) => Promise<Answer>;
|
package/package.json
CHANGED