@crewx/sdk 0.9.0-rc.51 → 0.9.0-rc.53
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/activity-log/builder.d.ts +55 -6
- package/dist/config/models.generated.d.ts +1 -0
- package/dist/esm/index.js +50 -49
- package/dist/esm/testing/index.js +1 -1
- package/dist/index.js +52 -51
- package/dist/provider/acp/meta.d.ts +2 -0
- package/dist/provider/cli/adapter.types.d.ts +2 -0
- package/dist/provider/cli/meta.d.ts +2 -0
- package/dist/provider/models.d.ts +7 -10
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export interface ActivityLogRenderedEntry {
|
|
2
|
+
entry: ActivityEntry;
|
|
3
|
+
newestIndex: number;
|
|
4
|
+
bodyLimitChars: number;
|
|
5
|
+
bodyCharsShown: number | null;
|
|
6
|
+
originalBodyChars: number | null;
|
|
7
|
+
}
|
|
1
8
|
export declare function checkStale(tool: string, input: string | null, taskCompletedAt?: string | null): 'ok' | 'stale' | 'unknown';
|
|
2
9
|
export interface ActivityEntry {
|
|
3
10
|
tool: string;
|
|
@@ -6,18 +13,60 @@ export interface ActivityEntry {
|
|
|
6
13
|
status: 'ok' | 'stale' | 'unknown';
|
|
7
14
|
reusable: boolean;
|
|
8
15
|
}
|
|
9
|
-
export
|
|
16
|
+
export type CountTokens = (text: string) => number;
|
|
17
|
+
export type ActivityLogOmissionReason = 'token_cap' | 'repository_limit';
|
|
18
|
+
export interface ActivityLogOmission {
|
|
19
|
+
reason: ActivityLogOmissionReason;
|
|
20
|
+
count: number;
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ActivityLogTaskResult {
|
|
24
|
+
taskId: string;
|
|
25
|
+
taskDistance: number;
|
|
26
|
+
tokenCap: number;
|
|
27
|
+
tokenCount: number;
|
|
28
|
+
includedEntries: number;
|
|
29
|
+
omittedEntries: number;
|
|
30
|
+
totalEntries: number;
|
|
31
|
+
omissions: ActivityLogOmission[];
|
|
32
|
+
entries: ActivityLogRenderedEntry[];
|
|
33
|
+
activityLog: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ActivityLogByTaskResult {
|
|
10
36
|
threadId: string;
|
|
11
37
|
agentId: string;
|
|
12
38
|
lookback: number;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
39
|
+
activityLogTokenBudget: number;
|
|
40
|
+
baseEntryChars: number;
|
|
41
|
+
tasks: ActivityLogTaskResult[];
|
|
42
|
+
activityLogByTask: Map<string, string>;
|
|
43
|
+
}
|
|
44
|
+
export interface BuildActivityLogByTaskBudgetOptions {
|
|
45
|
+
threadId: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
lookback: number;
|
|
48
|
+
maxEntryChars?: number;
|
|
49
|
+
activityLogTokenBudget: number;
|
|
50
|
+
countTokens: CountTokens;
|
|
51
|
+
repositoryEntryLimit?: number;
|
|
16
52
|
}
|
|
17
|
-
export
|
|
53
|
+
export interface BuildActivityLogByTaskOptions {
|
|
18
54
|
threadId: string;
|
|
19
55
|
agentId: string;
|
|
20
56
|
lookback: number;
|
|
21
57
|
maxEntryChars?: number;
|
|
22
58
|
decayRate?: number;
|
|
23
|
-
|
|
59
|
+
activityLogTokenBudget?: number;
|
|
60
|
+
countTokens?: CountTokens;
|
|
61
|
+
repositoryEntryLimit?: number;
|
|
62
|
+
}
|
|
63
|
+
export interface ActivityLogResult {
|
|
64
|
+
threadId: string;
|
|
65
|
+
agentId: string;
|
|
66
|
+
lookback: number;
|
|
67
|
+
entries: ActivityEntry[];
|
|
68
|
+
totalEntries: number;
|
|
69
|
+
truncated: boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare function buildActivityLogByTaskResult(opts: BuildActivityLogByTaskBudgetOptions): ActivityLogByTaskResult;
|
|
72
|
+
export declare function buildActivityLogByTask(opts: BuildActivityLogByTaskOptions): Map<string, string>;
|