sidekick-shared 0.13.2 → 0.13.3
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/aggregation/EventAggregator.d.ts +12 -0
- package/dist/aggregation/EventAggregator.js +277 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
|
@@ -63,6 +63,13 @@ export interface SerializedAggregatorState {
|
|
|
63
63
|
patternState?: SerializedPatternState;
|
|
64
64
|
heatmapState?: SerializedHeatmapState;
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Parses dependency references from a todo item's content text.
|
|
68
|
+
*
|
|
69
|
+
* Looks for patterns like "(blocked by Task A and Task B)" and maps
|
|
70
|
+
* referenced task names back to todo-{i} IDs by substring matching.
|
|
71
|
+
*/
|
|
72
|
+
export declare function parseTodoDependencies(content: string, allTodos: Array<Record<string, unknown>>): string[];
|
|
66
73
|
interface BurnSample {
|
|
67
74
|
time: number;
|
|
68
75
|
tokens: number;
|
|
@@ -150,6 +157,11 @@ export declare class EventAggregator {
|
|
|
150
157
|
private extractTaskStateFromFollowEvent;
|
|
151
158
|
private applyTaskUpdate;
|
|
152
159
|
private resolveTaskCreate;
|
|
160
|
+
private handleTodoWrite;
|
|
161
|
+
private handleUpdatePlan;
|
|
162
|
+
private handleAgentSpawn;
|
|
163
|
+
private resolveAgentResult;
|
|
164
|
+
private isGoalGateTask;
|
|
153
165
|
private extractSubagentFromEvent;
|
|
154
166
|
private extractSubagentFromFollowEvent;
|
|
155
167
|
private completeSubagent;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.EventAggregator = void 0;
|
|
13
|
+
exports.parseTodoDependencies = parseTodoDependencies;
|
|
13
14
|
const jsonl_1 = require("../parsers/jsonl");
|
|
14
15
|
const planExtractor_1 = require("../parsers/planExtractor");
|
|
15
16
|
const eventBridge_1 = require("../watchers/eventBridge");
|
|
@@ -26,6 +27,34 @@ const DEFAULT_BURN_SAMPLE_MS = 10_000;
|
|
|
26
27
|
const COMPACTION_DROP_THRESHOLD = 0.8; // >20% drop
|
|
27
28
|
/** Schema version for serialized snapshots. */
|
|
28
29
|
const SNAPSHOT_SCHEMA_VERSION = 1;
|
|
30
|
+
// ── Goal gate detection regex ──
|
|
31
|
+
const GOAL_GATE_REGEX = /\b(CRITICAL|MUST|blocker|required|must.?complete|goal.?gate|essential|do.?not.?skip|blocking)\b/i;
|
|
32
|
+
// ── Todo dependency parsing ──
|
|
33
|
+
/**
|
|
34
|
+
* Parses dependency references from a todo item's content text.
|
|
35
|
+
*
|
|
36
|
+
* Looks for patterns like "(blocked by Task A and Task B)" and maps
|
|
37
|
+
* referenced task names back to todo-{i} IDs by substring matching.
|
|
38
|
+
*/
|
|
39
|
+
function parseTodoDependencies(content, allTodos) {
|
|
40
|
+
const depPattern = /(?:blocked by|depends on|waiting on|requires)\s+(.+?)(?:\)|$)/i;
|
|
41
|
+
const match = content.match(depPattern);
|
|
42
|
+
if (!match)
|
|
43
|
+
return [];
|
|
44
|
+
const refs = match[1].split(/\s+and\s+|,\s*|&\s*/).map(r => r.trim()).filter(Boolean);
|
|
45
|
+
const result = [];
|
|
46
|
+
for (const ref of refs) {
|
|
47
|
+
const refLower = ref.toLowerCase();
|
|
48
|
+
for (let j = 0; j < allTodos.length; j++) {
|
|
49
|
+
const otherContent = String(allTodos[j].content || allTodos[j].subject || '').toLowerCase();
|
|
50
|
+
if (otherContent.includes(refLower) || refLower.includes(otherContent.split(':')[0].trim())) {
|
|
51
|
+
result.push(`todo-${j}`);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
29
58
|
// ── EventAggregator ──
|
|
30
59
|
class EventAggregator {
|
|
31
60
|
// Options
|
|
@@ -848,17 +877,29 @@ class EventAggregator {
|
|
|
848
877
|
activeForm: input.activeForm,
|
|
849
878
|
subagentType: input.subagentType,
|
|
850
879
|
isGoalGate: input.isGoalGate,
|
|
880
|
+
timestamp: new Date(event.timestamp),
|
|
851
881
|
});
|
|
852
882
|
}
|
|
853
883
|
else if (name === 'TaskUpdate') {
|
|
854
884
|
this.applyTaskUpdate(input);
|
|
855
885
|
}
|
|
886
|
+
else if (name === 'TodoWrite') {
|
|
887
|
+
this.handleTodoWrite(input, new Date(event.timestamp));
|
|
888
|
+
}
|
|
889
|
+
else if (name === 'UpdatePlan') {
|
|
890
|
+
this.handleUpdatePlan(input, new Date(event.timestamp));
|
|
891
|
+
}
|
|
892
|
+
else if ((name === 'Agent' || name === 'Task') && toolUseId) {
|
|
893
|
+
this.handleAgentSpawn(toolUseId, input, new Date(event.timestamp));
|
|
894
|
+
}
|
|
856
895
|
}
|
|
857
896
|
else if (block.type === 'tool_result') {
|
|
858
897
|
const toolUseId = block.tool_use_id;
|
|
859
898
|
if (!toolUseId)
|
|
860
899
|
continue;
|
|
861
|
-
|
|
900
|
+
const isError = block.is_error ?? false;
|
|
901
|
+
this.resolveTaskCreate(toolUseId, block.content ?? block.output, event.timestamp, isError);
|
|
902
|
+
this.resolveAgentResult(toolUseId, isError, event.timestamp);
|
|
862
903
|
}
|
|
863
904
|
}
|
|
864
905
|
}
|
|
@@ -879,11 +920,21 @@ class EventAggregator {
|
|
|
879
920
|
activeForm: input.activeForm,
|
|
880
921
|
subagentType: input.subagentType,
|
|
881
922
|
isGoalGate: input.isGoalGate,
|
|
923
|
+
timestamp: new Date(event.timestamp),
|
|
882
924
|
});
|
|
883
925
|
}
|
|
884
926
|
else if (event.toolName === 'TaskUpdate') {
|
|
885
927
|
this.applyTaskUpdate(input);
|
|
886
928
|
}
|
|
929
|
+
else if (event.toolName === 'TodoWrite') {
|
|
930
|
+
this.handleTodoWrite(input, new Date(event.timestamp));
|
|
931
|
+
}
|
|
932
|
+
else if (event.toolName === 'UpdatePlan') {
|
|
933
|
+
this.handleUpdatePlan(input, new Date(event.timestamp));
|
|
934
|
+
}
|
|
935
|
+
else if ((event.toolName === 'Agent' || event.toolName === 'Task') && toolUseId) {
|
|
936
|
+
this.handleAgentSpawn(toolUseId, input, new Date(event.timestamp));
|
|
937
|
+
}
|
|
887
938
|
}
|
|
888
939
|
else if (event.type === 'tool_result') {
|
|
889
940
|
if (!raw)
|
|
@@ -891,7 +942,9 @@ class EventAggregator {
|
|
|
891
942
|
const toolUseId = raw.tool_use_id;
|
|
892
943
|
if (!toolUseId)
|
|
893
944
|
return;
|
|
894
|
-
|
|
945
|
+
const isError = raw.is_error ?? false;
|
|
946
|
+
this.resolveTaskCreate(toolUseId, raw.content, event.timestamp, isError);
|
|
947
|
+
this.resolveAgentResult(toolUseId, isError, event.timestamp);
|
|
895
948
|
}
|
|
896
949
|
}
|
|
897
950
|
applyTaskUpdate(input) {
|
|
@@ -908,11 +961,16 @@ class EventAggregator {
|
|
|
908
961
|
this.activeTaskId = null;
|
|
909
962
|
return;
|
|
910
963
|
}
|
|
964
|
+
const oldStatus = existing.status;
|
|
911
965
|
existing.status = newStatus;
|
|
912
966
|
existing.updatedAt = new Date();
|
|
913
|
-
if (newStatus === 'in_progress') {
|
|
967
|
+
if (newStatus === 'in_progress' && oldStatus !== 'in_progress') {
|
|
914
968
|
this.activeTaskId = taskId;
|
|
915
969
|
}
|
|
970
|
+
else if (oldStatus === 'in_progress' && newStatus !== 'in_progress') {
|
|
971
|
+
if (this.activeTaskId === taskId)
|
|
972
|
+
this.activeTaskId = null;
|
|
973
|
+
}
|
|
916
974
|
}
|
|
917
975
|
if (input.subject)
|
|
918
976
|
existing.subject = input.subject;
|
|
@@ -921,11 +979,23 @@ class EventAggregator {
|
|
|
921
979
|
if (input.activeForm)
|
|
922
980
|
existing.activeForm = input.activeForm;
|
|
923
981
|
if (input.addBlockedBy && Array.isArray(input.addBlockedBy)) {
|
|
924
|
-
|
|
982
|
+
for (const id of input.addBlockedBy) {
|
|
983
|
+
const idStr = String(id);
|
|
984
|
+
if (!existing.blockedBy.includes(idStr)) {
|
|
985
|
+
existing.blockedBy.push(idStr);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
925
988
|
}
|
|
926
989
|
if (input.addBlocks && Array.isArray(input.addBlocks)) {
|
|
927
|
-
|
|
990
|
+
for (const id of input.addBlocks) {
|
|
991
|
+
const idStr = String(id);
|
|
992
|
+
if (!existing.blocks.includes(idStr)) {
|
|
993
|
+
existing.blocks.push(idStr);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
928
996
|
}
|
|
997
|
+
// Re-evaluate goal gate after update
|
|
998
|
+
existing.isGoalGate = this.isGoalGateTask(existing);
|
|
929
999
|
}
|
|
930
1000
|
else {
|
|
931
1001
|
// TaskUpdate for unknown task — create placeholder
|
|
@@ -933,9 +1003,10 @@ class EventAggregator {
|
|
|
933
1003
|
if (status === 'deleted')
|
|
934
1004
|
return;
|
|
935
1005
|
const now = new Date();
|
|
936
|
-
|
|
1006
|
+
const task = {
|
|
937
1007
|
taskId,
|
|
938
1008
|
subject: input.subject || `Task ${taskId}`,
|
|
1009
|
+
description: input.description,
|
|
939
1010
|
status: status,
|
|
940
1011
|
createdAt: now,
|
|
941
1012
|
updatedAt: now,
|
|
@@ -943,27 +1014,32 @@ class EventAggregator {
|
|
|
943
1014
|
blocks: [],
|
|
944
1015
|
associatedToolCalls: [],
|
|
945
1016
|
activeForm: input.activeForm,
|
|
946
|
-
}
|
|
1017
|
+
};
|
|
1018
|
+
task.isGoalGate = this.isGoalGateTask(task);
|
|
1019
|
+
this.tasks.set(taskId, task);
|
|
947
1020
|
if (status === 'in_progress') {
|
|
948
1021
|
this.activeTaskId = taskId;
|
|
949
1022
|
}
|
|
950
1023
|
}
|
|
951
1024
|
}
|
|
952
|
-
resolveTaskCreate(toolUseId, content, timestamp) {
|
|
1025
|
+
resolveTaskCreate(toolUseId, content, timestamp, isError) {
|
|
953
1026
|
const pending = this.pendingTaskCreates.get(toolUseId);
|
|
954
1027
|
if (!pending)
|
|
955
1028
|
return;
|
|
956
1029
|
this.pendingTaskCreates.delete(toolUseId);
|
|
1030
|
+
// Don't create task on error
|
|
1031
|
+
if (isError)
|
|
1032
|
+
return;
|
|
957
1033
|
const taskId = this.extractTaskIdFromResult(content);
|
|
958
1034
|
if (!taskId)
|
|
959
1035
|
return;
|
|
960
1036
|
const now = new Date(timestamp);
|
|
961
|
-
|
|
1037
|
+
const task = {
|
|
962
1038
|
taskId,
|
|
963
1039
|
subject: pending.subject,
|
|
964
1040
|
description: pending.description,
|
|
965
1041
|
status: 'pending',
|
|
966
|
-
createdAt: now,
|
|
1042
|
+
createdAt: pending.timestamp ?? now,
|
|
967
1043
|
updatedAt: now,
|
|
968
1044
|
blockedBy: [],
|
|
969
1045
|
blocks: [],
|
|
@@ -971,7 +1047,197 @@ class EventAggregator {
|
|
|
971
1047
|
activeForm: pending.activeForm,
|
|
972
1048
|
subagentType: pending.subagentType,
|
|
973
1049
|
isGoalGate: pending.isGoalGate,
|
|
974
|
-
}
|
|
1050
|
+
};
|
|
1051
|
+
// Evaluate goal gate from content if not explicitly set
|
|
1052
|
+
task.isGoalGate = task.isGoalGate || this.isGoalGateTask(task);
|
|
1053
|
+
this.tasks.set(taskId, task);
|
|
1054
|
+
}
|
|
1055
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1056
|
+
// Private: TodoWrite handling (OpenCode)
|
|
1057
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1058
|
+
handleTodoWrite(input, now) {
|
|
1059
|
+
const todos = input.todos;
|
|
1060
|
+
if (!Array.isArray(todos))
|
|
1061
|
+
return;
|
|
1062
|
+
// Remove all non-subagent tasks (subagent tasks should persist)
|
|
1063
|
+
for (const [taskId, task] of this.tasks) {
|
|
1064
|
+
if (!task.isSubagent) {
|
|
1065
|
+
this.tasks.delete(taskId);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
// Reset active task if it was a non-subagent task
|
|
1069
|
+
if (this.activeTaskId && !this.tasks.has(this.activeTaskId)) {
|
|
1070
|
+
this.activeTaskId = null;
|
|
1071
|
+
}
|
|
1072
|
+
for (let i = 0; i < todos.length; i++) {
|
|
1073
|
+
const todo = todos[i];
|
|
1074
|
+
const taskId = `todo-${i}`;
|
|
1075
|
+
const content = String(todo.content || todo.subject || `Todo ${i + 1}`);
|
|
1076
|
+
const rawStatus = String(todo.status || 'pending').toLowerCase();
|
|
1077
|
+
const priority = todo.priority ? String(todo.priority) : undefined;
|
|
1078
|
+
// Map OpenCode todo status values to TaskStatus
|
|
1079
|
+
let status;
|
|
1080
|
+
if (rawStatus === 'completed' || rawStatus === 'done') {
|
|
1081
|
+
status = 'completed';
|
|
1082
|
+
}
|
|
1083
|
+
else if (rawStatus === 'in_progress' || rawStatus === 'in-progress') {
|
|
1084
|
+
status = 'in_progress';
|
|
1085
|
+
}
|
|
1086
|
+
else {
|
|
1087
|
+
status = 'pending';
|
|
1088
|
+
}
|
|
1089
|
+
const task = {
|
|
1090
|
+
taskId,
|
|
1091
|
+
subject: content,
|
|
1092
|
+
description: priority ? `Priority: ${priority}` : undefined,
|
|
1093
|
+
status,
|
|
1094
|
+
createdAt: now,
|
|
1095
|
+
updatedAt: now,
|
|
1096
|
+
blockedBy: [],
|
|
1097
|
+
blocks: [],
|
|
1098
|
+
associatedToolCalls: [],
|
|
1099
|
+
};
|
|
1100
|
+
this.tasks.set(taskId, task);
|
|
1101
|
+
if (status === 'in_progress') {
|
|
1102
|
+
this.activeTaskId = taskId;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
// Second pass: parse dependency info from content text
|
|
1106
|
+
for (let i = 0; i < todos.length; i++) {
|
|
1107
|
+
const task = this.tasks.get(`todo-${i}`);
|
|
1108
|
+
if (!task)
|
|
1109
|
+
continue;
|
|
1110
|
+
// Check for explicit blockedBy field
|
|
1111
|
+
if (Array.isArray(todos[i].blockedBy)) {
|
|
1112
|
+
for (const ref of todos[i].blockedBy) {
|
|
1113
|
+
const refStr = String(ref);
|
|
1114
|
+
if (!task.blockedBy.includes(refStr)) {
|
|
1115
|
+
task.blockedBy.push(refStr);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
// Parse dependency references from content text
|
|
1120
|
+
const deps = parseTodoDependencies(String(todos[i].content || ''), todos);
|
|
1121
|
+
for (const depId of deps) {
|
|
1122
|
+
if (depId !== `todo-${i}` && !task.blockedBy.includes(depId)) {
|
|
1123
|
+
task.blockedBy.push(depId);
|
|
1124
|
+
const depTask = this.tasks.get(depId);
|
|
1125
|
+
if (depTask && !depTask.blocks.includes(`todo-${i}`)) {
|
|
1126
|
+
depTask.blocks.push(`todo-${i}`);
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1133
|
+
// Private: UpdatePlan handling (Codex)
|
|
1134
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1135
|
+
handleUpdatePlan(input, now) {
|
|
1136
|
+
const plan = input.plan;
|
|
1137
|
+
if (!Array.isArray(plan))
|
|
1138
|
+
return;
|
|
1139
|
+
const seenPlanTaskIds = new Set();
|
|
1140
|
+
let activePlanTaskId = null;
|
|
1141
|
+
for (let i = 0; i < plan.length; i++) {
|
|
1142
|
+
const entry = plan[i];
|
|
1143
|
+
const step = String(entry.step || '').trim();
|
|
1144
|
+
if (!step)
|
|
1145
|
+
continue;
|
|
1146
|
+
const rawStatus = String(entry.status || 'pending').toLowerCase();
|
|
1147
|
+
let status;
|
|
1148
|
+
if (rawStatus === 'completed')
|
|
1149
|
+
status = 'completed';
|
|
1150
|
+
else if (rawStatus === 'in_progress' || rawStatus === 'in-progress')
|
|
1151
|
+
status = 'in_progress';
|
|
1152
|
+
else
|
|
1153
|
+
status = 'pending';
|
|
1154
|
+
const taskId = `plan-${i}`;
|
|
1155
|
+
seenPlanTaskIds.add(taskId);
|
|
1156
|
+
const existing = this.tasks.get(taskId);
|
|
1157
|
+
if (existing) {
|
|
1158
|
+
existing.subject = step;
|
|
1159
|
+
existing.status = status;
|
|
1160
|
+
existing.updatedAt = now;
|
|
1161
|
+
if (!existing.activeForm) {
|
|
1162
|
+
existing.activeForm = `Working on ${step}`;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
else {
|
|
1166
|
+
const task = {
|
|
1167
|
+
taskId,
|
|
1168
|
+
subject: step,
|
|
1169
|
+
status,
|
|
1170
|
+
createdAt: now,
|
|
1171
|
+
updatedAt: now,
|
|
1172
|
+
activeForm: `Working on ${step}`,
|
|
1173
|
+
blockedBy: [],
|
|
1174
|
+
blocks: [],
|
|
1175
|
+
associatedToolCalls: [],
|
|
1176
|
+
};
|
|
1177
|
+
this.tasks.set(taskId, task);
|
|
1178
|
+
}
|
|
1179
|
+
if (status === 'in_progress') {
|
|
1180
|
+
activePlanTaskId = taskId;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
// Mark missing synthetic plan tasks as deleted
|
|
1184
|
+
for (const [taskId, task] of this.tasks) {
|
|
1185
|
+
if (!taskId.startsWith('plan-'))
|
|
1186
|
+
continue;
|
|
1187
|
+
if (!seenPlanTaskIds.has(taskId) && task.status !== 'deleted') {
|
|
1188
|
+
task.status = 'deleted';
|
|
1189
|
+
task.updatedAt = now;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
if (activePlanTaskId) {
|
|
1193
|
+
this.activeTaskId = activePlanTaskId;
|
|
1194
|
+
}
|
|
1195
|
+
else if (this.activeTaskId?.startsWith('plan-')) {
|
|
1196
|
+
this.activeTaskId = null;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1200
|
+
// Private: Agent/Task (subagent) as tracked task
|
|
1201
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1202
|
+
handleAgentSpawn(toolUseId, input, now) {
|
|
1203
|
+
const agentTaskId = `agent-${toolUseId}`;
|
|
1204
|
+
const description = input.description ? String(input.description) : 'Subagent';
|
|
1205
|
+
const subagentType = input.subagent_type || input.subagentType || undefined;
|
|
1206
|
+
const task = {
|
|
1207
|
+
taskId: agentTaskId,
|
|
1208
|
+
subject: description,
|
|
1209
|
+
status: 'in_progress',
|
|
1210
|
+
createdAt: now,
|
|
1211
|
+
updatedAt: now,
|
|
1212
|
+
activeForm: subagentType ? `Running ${subagentType} agent` : 'Running subagent',
|
|
1213
|
+
blockedBy: [],
|
|
1214
|
+
blocks: [],
|
|
1215
|
+
associatedToolCalls: [],
|
|
1216
|
+
isSubagent: true,
|
|
1217
|
+
subagentType,
|
|
1218
|
+
toolUseId,
|
|
1219
|
+
};
|
|
1220
|
+
this.tasks.set(agentTaskId, task);
|
|
1221
|
+
}
|
|
1222
|
+
resolveAgentResult(toolUseId, isError, timestamp) {
|
|
1223
|
+
const agentTaskId = `agent-${toolUseId}`;
|
|
1224
|
+
const agentTask = this.tasks.get(agentTaskId);
|
|
1225
|
+
if (!agentTask)
|
|
1226
|
+
return;
|
|
1227
|
+
agentTask.status = isError ? 'deleted' : 'completed';
|
|
1228
|
+
agentTask.updatedAt = new Date(timestamp);
|
|
1229
|
+
}
|
|
1230
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1231
|
+
// Private: Goal gate detection
|
|
1232
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
1233
|
+
isGoalGateTask(task) {
|
|
1234
|
+
if (GOAL_GATE_REGEX.test(task.subject))
|
|
1235
|
+
return true;
|
|
1236
|
+
if (task.description && GOAL_GATE_REGEX.test(task.description))
|
|
1237
|
+
return true;
|
|
1238
|
+
if (task.blocks.length >= 3)
|
|
1239
|
+
return true;
|
|
1240
|
+
return false;
|
|
975
1241
|
}
|
|
976
1242
|
// ═══════════════════════════════════════════════════════════════════════
|
|
977
1243
|
// Private: Subagent Tracking from SessionEvent
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export type { SessionDumpOptions } from './formatters/sessionDump';
|
|
|
66
66
|
export { highlight as highlightEvent, clearHighlightCache, HIGHLIGHT_CSS } from './formatters/eventHighlighter';
|
|
67
67
|
export type { HighlightFormat } from './formatters/eventHighlighter';
|
|
68
68
|
export { ALL_PHRASES, getRandomPhrase } from './phrases';
|
|
69
|
-
export { EventAggregator } from './aggregation/EventAggregator';
|
|
69
|
+
export { EventAggregator, parseTodoDependencies } from './aggregation/EventAggregator';
|
|
70
70
|
export type { SerializedAggregatorState } from './aggregation/EventAggregator';
|
|
71
71
|
export { saveSnapshot, loadSnapshot, deleteSnapshot, isSnapshotValid, getSnapshotPath } from './aggregation/snapshot';
|
|
72
72
|
export type { SessionSnapshot } from './aggregation/snapshot';
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.findActiveClaudeSession = exports.discoverSessionDirectory = exports.getClaudeSessionDirectory = exports.encodeClaudeWorkspacePath = exports.detectSessionActivity = exports.extractTaskInfo = exports.scanSubagentDir = exports.normalizeCodexToolInput = exports.normalizeCodexToolName = exports.extractPatchFilePaths = exports.CodexRolloutParser = exports.parseDbPartData = exports.parseDbMessageData = exports.convertOpenCodeMessage = exports.detectPlanModeFromText = exports.normalizeToolInput = exports.normalizeToolName = exports.TRUNCATION_PATTERNS = exports.JsonlParser = exports.CodexProvider = exports.OpenCodeProvider = exports.ClaudeCodeProvider = exports.getAllDetectedProviders = exports.detectProvider = exports.readClaudeCodePlanFiles = exports.getPlanAnalytics = exports.writePlans = exports.getLatestPlan = exports.readPlans = exports.readLatestHandoff = exports.readHistory = exports.readNotes = exports.readDecisions = exports.readTasks = exports.getProjectSlugRaw = exports.getProjectSlug = exports.encodeWorkspacePath = exports.getGlobalDataPath = exports.getProjectDataPath = exports.getConfigDir = exports.MAX_PLANS_PER_PROJECT = exports.PLAN_SCHEMA_VERSION = exports.createEmptyTokenTotals = exports.HISTORICAL_DATA_SCHEMA_VERSION = exports.STALENESS_THRESHOLDS = exports.IMPORTANCE_DECAY_FACTORS = exports.KNOWLEDGE_NOTE_SCHEMA_VERSION = exports.DECISION_LOG_SCHEMA_VERSION = exports.normalizeTaskStatus = exports.TASK_PERSISTENCE_SCHEMA_VERSION = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.fetchQuota = exports.readClaudeMaxAccessTokenSync = exports.readClaudeMaxCredentials = exports.openInBrowser = exports.parseTranscript = exports.generateHtmlReport = void 0;
|
|
7
|
+
exports.HeatmapTracker = exports.FrequencyTracker = exports.getSnapshotPath = exports.isSnapshotValid = exports.deleteSnapshot = exports.loadSnapshot = exports.saveSnapshot = exports.parseTodoDependencies = exports.EventAggregator = exports.getRandomPhrase = exports.ALL_PHRASES = exports.HIGHLIGHT_CSS = exports.clearHighlightCache = exports.highlightEvent = exports.formatSessionJson = exports.formatSessionMarkdown = exports.formatSessionText = exports.classifyNoise = exports.shouldMergeWithPrevious = exports.classifyFollowEvent = exports.classifyMessage = exports.getSoftNoiseReason = exports.isHardNoiseFollowEvent = exports.isHardNoise = exports.formatToolSummary = exports.toFollowEvents = exports.createWatcher = exports.parseChangelog = exports.extractProposedPlanShared = exports.parsePlanMarkdownShared = exports.PlanExtractor = exports.composeContext = exports.FilterEngine = exports.searchSessions = exports.CodexDatabase = exports.OpenCodeDatabase = exports.discoverDebugLogs = exports.collapseDuplicates = exports.filterByLevel = exports.parseDebugLog = exports.scanSubagentTraces = exports.findAllSessionsWithWorktrees = exports.discoverWorktreeSiblings = exports.resolveWorktreeMainRepo = exports.getAllClaudeProjectFolders = exports.decodeEncodedPath = exports.getMostRecentlyActiveSessionDir = exports.findSubdirectorySessionDirs = exports.findSessionsInDirectory = exports.findAllClaudeSessions = void 0;
|
|
8
|
+
exports.fetchQuota = exports.readClaudeMaxAccessTokenSync = exports.readClaudeMaxCredentials = exports.openInBrowser = exports.parseTranscript = exports.generateHtmlReport = exports.PatternExtractor = void 0;
|
|
9
9
|
var taskPersistence_1 = require("./types/taskPersistence");
|
|
10
10
|
Object.defineProperty(exports, "TASK_PERSISTENCE_SCHEMA_VERSION", { enumerable: true, get: function () { return taskPersistence_1.TASK_PERSISTENCE_SCHEMA_VERSION; } });
|
|
11
11
|
Object.defineProperty(exports, "normalizeTaskStatus", { enumerable: true, get: function () { return taskPersistence_1.normalizeTaskStatus; } });
|
|
@@ -155,6 +155,7 @@ Object.defineProperty(exports, "getRandomPhrase", { enumerable: true, get: funct
|
|
|
155
155
|
// Aggregation
|
|
156
156
|
var EventAggregator_1 = require("./aggregation/EventAggregator");
|
|
157
157
|
Object.defineProperty(exports, "EventAggregator", { enumerable: true, get: function () { return EventAggregator_1.EventAggregator; } });
|
|
158
|
+
Object.defineProperty(exports, "parseTodoDependencies", { enumerable: true, get: function () { return EventAggregator_1.parseTodoDependencies; } });
|
|
158
159
|
var snapshot_1 = require("./aggregation/snapshot");
|
|
159
160
|
Object.defineProperty(exports, "saveSnapshot", { enumerable: true, get: function () { return snapshot_1.saveSnapshot; } });
|
|
160
161
|
Object.defineProperty(exports, "loadSnapshot", { enumerable: true, get: function () { return snapshot_1.loadSnapshot; } });
|
package/package.json
CHANGED