@flowdot.ai/daemon 1.0.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.
- package/LICENSE +45 -0
- package/README.md +51 -0
- package/dist/goals/DependencyResolver.d.ts +54 -0
- package/dist/goals/DependencyResolver.js +329 -0
- package/dist/goals/ErrorRecovery.d.ts +133 -0
- package/dist/goals/ErrorRecovery.js +489 -0
- package/dist/goals/GoalApiClient.d.ts +81 -0
- package/dist/goals/GoalApiClient.js +743 -0
- package/dist/goals/GoalCache.d.ts +65 -0
- package/dist/goals/GoalCache.js +243 -0
- package/dist/goals/GoalCommsHandler.d.ts +150 -0
- package/dist/goals/GoalCommsHandler.js +378 -0
- package/dist/goals/GoalExporter.d.ts +164 -0
- package/dist/goals/GoalExporter.js +318 -0
- package/dist/goals/GoalImporter.d.ts +107 -0
- package/dist/goals/GoalImporter.js +345 -0
- package/dist/goals/GoalManager.d.ts +110 -0
- package/dist/goals/GoalManager.js +535 -0
- package/dist/goals/GoalReporter.d.ts +105 -0
- package/dist/goals/GoalReporter.js +534 -0
- package/dist/goals/GoalScheduler.d.ts +102 -0
- package/dist/goals/GoalScheduler.js +209 -0
- package/dist/goals/GoalValidator.d.ts +72 -0
- package/dist/goals/GoalValidator.js +657 -0
- package/dist/goals/MetaGoalEnforcer.d.ts +111 -0
- package/dist/goals/MetaGoalEnforcer.js +536 -0
- package/dist/goals/MilestoneBreaker.d.ts +74 -0
- package/dist/goals/MilestoneBreaker.js +348 -0
- package/dist/goals/PermissionBridge.d.ts +109 -0
- package/dist/goals/PermissionBridge.js +326 -0
- package/dist/goals/ProgressTracker.d.ts +113 -0
- package/dist/goals/ProgressTracker.js +324 -0
- package/dist/goals/ReviewScheduler.d.ts +106 -0
- package/dist/goals/ReviewScheduler.js +360 -0
- package/dist/goals/TaskExecutor.d.ts +116 -0
- package/dist/goals/TaskExecutor.js +370 -0
- package/dist/goals/TaskFeedback.d.ts +126 -0
- package/dist/goals/TaskFeedback.js +402 -0
- package/dist/goals/TaskGenerator.d.ts +75 -0
- package/dist/goals/TaskGenerator.js +329 -0
- package/dist/goals/TaskQueue.d.ts +84 -0
- package/dist/goals/TaskQueue.js +331 -0
- package/dist/goals/TaskSanitizer.d.ts +61 -0
- package/dist/goals/TaskSanitizer.js +464 -0
- package/dist/goals/errors.d.ts +116 -0
- package/dist/goals/errors.js +299 -0
- package/dist/goals/index.d.ts +24 -0
- package/dist/goals/index.js +23 -0
- package/dist/goals/types.d.ts +395 -0
- package/dist/goals/types.js +230 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/loop/DaemonIPC.d.ts +67 -0
- package/dist/loop/DaemonIPC.js +358 -0
- package/dist/loop/IntervalParser.d.ts +39 -0
- package/dist/loop/IntervalParser.js +217 -0
- package/dist/loop/LoopDaemon.d.ts +123 -0
- package/dist/loop/LoopDaemon.js +1821 -0
- package/dist/loop/LoopExecutor.d.ts +93 -0
- package/dist/loop/LoopExecutor.js +326 -0
- package/dist/loop/LoopManager.d.ts +79 -0
- package/dist/loop/LoopManager.js +476 -0
- package/dist/loop/LoopScheduler.d.ts +69 -0
- package/dist/loop/LoopScheduler.js +329 -0
- package/dist/loop/LoopStore.d.ts +57 -0
- package/dist/loop/LoopStore.js +406 -0
- package/dist/loop/LoopValidator.d.ts +55 -0
- package/dist/loop/LoopValidator.js +603 -0
- package/dist/loop/errors.d.ts +115 -0
- package/dist/loop/errors.js +312 -0
- package/dist/loop/index.d.ts +11 -0
- package/dist/loop/index.js +10 -0
- package/dist/loop/notifications/Notifier.d.ts +28 -0
- package/dist/loop/notifications/Notifier.js +78 -0
- package/dist/loop/notifications/SlackNotifier.d.ts +28 -0
- package/dist/loop/notifications/SlackNotifier.js +203 -0
- package/dist/loop/notifications/TerminalNotifier.d.ts +18 -0
- package/dist/loop/notifications/TerminalNotifier.js +72 -0
- package/dist/loop/notifications/WebhookNotifier.d.ts +24 -0
- package/dist/loop/notifications/WebhookNotifier.js +123 -0
- package/dist/loop/notifications/index.d.ts +24 -0
- package/dist/loop/notifications/index.js +109 -0
- package/dist/loop/types.d.ts +280 -0
- package/dist/loop/types.js +222 -0
- package/package.json +92 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
export class GoalError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
context;
|
|
4
|
+
timestamp;
|
|
5
|
+
constructor(code, message, context = {}) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'GoalError';
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.context = context;
|
|
10
|
+
this.timestamp = new Date();
|
|
11
|
+
if (Error.captureStackTrace) {
|
|
12
|
+
Error.captureStackTrace(this, this.constructor);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
name: this.name,
|
|
18
|
+
code: this.code,
|
|
19
|
+
message: this.message,
|
|
20
|
+
context: this.context,
|
|
21
|
+
timestamp: this.timestamp.toISOString(),
|
|
22
|
+
stack: this.stack,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
toLogString() {
|
|
26
|
+
const contextStr = Object.keys(this.context).length > 0
|
|
27
|
+
? ` Context: ${JSON.stringify(this.context)}`
|
|
28
|
+
: '';
|
|
29
|
+
return `[${this.code}] ${this.message}${contextStr}`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class GoalNotFoundError extends GoalError {
|
|
33
|
+
constructor(identifier, identifierType = 'hash') {
|
|
34
|
+
super('GOAL_NOT_FOUND', `Goal not found: ${identifier}`, { identifier, identifierType });
|
|
35
|
+
this.name = 'GoalNotFoundError';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class GoalAlreadyExistsError extends GoalError {
|
|
39
|
+
constructor(name) {
|
|
40
|
+
super('GOAL_ALREADY_EXISTS', `Goal already exists with name: ${name}`, { name });
|
|
41
|
+
this.name = 'GoalAlreadyExistsError';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class GoalInvalidStatusError extends GoalError {
|
|
45
|
+
constructor(goalHash, currentStatus, operation, allowedStatuses) {
|
|
46
|
+
super('GOAL_INVALID_STATUS', `Cannot ${operation} goal in "${currentStatus}" status. Allowed: ${allowedStatuses.join(', ')}`, { goalHash, currentStatus, operation, allowedStatuses });
|
|
47
|
+
this.name = 'GoalInvalidStatusError';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class GoalBlockedError extends GoalError {
|
|
51
|
+
constructor(goalHash, blockedBy) {
|
|
52
|
+
super('GOAL_BLOCKED', `Goal is blocked by incomplete dependencies: ${blockedBy.join(', ')}`, { goalHash, blockedBy });
|
|
53
|
+
this.name = 'GoalBlockedError';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export class GoalDependencyNotFoundError extends GoalError {
|
|
57
|
+
constructor(goalHash, dependencyHash) {
|
|
58
|
+
super('GOAL_DEPENDENCY_NOT_FOUND', `Dependency goal not found: ${dependencyHash}`, { goalHash, dependencyHash });
|
|
59
|
+
this.name = 'GoalDependencyNotFoundError';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export class GoalCircularDependencyError extends GoalError {
|
|
63
|
+
constructor(goalHash, cycle) {
|
|
64
|
+
super('GOAL_CIRCULAR_DEPENDENCY', `Circular dependency detected: ${cycle.join(' -> ')}`, { goalHash, cycle });
|
|
65
|
+
this.name = 'GoalCircularDependencyError';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export class MilestoneNotFoundError extends GoalError {
|
|
69
|
+
constructor(goalHash, milestoneId) {
|
|
70
|
+
super('MILESTONE_NOT_FOUND', `Milestone not found: ${milestoneId}`, { goalHash, milestoneId });
|
|
71
|
+
this.name = 'MilestoneNotFoundError';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class MilestoneAlreadyCompleteError extends GoalError {
|
|
75
|
+
constructor(goalHash, milestoneId) {
|
|
76
|
+
super('MILESTONE_ALREADY_COMPLETE', `Milestone is already complete: ${milestoneId}`, { goalHash, milestoneId });
|
|
77
|
+
this.name = 'MilestoneAlreadyCompleteError';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export class TaskNotFoundError extends GoalError {
|
|
81
|
+
constructor(goalHash, taskId) {
|
|
82
|
+
super('TASK_NOT_FOUND', `Task not found: ${taskId}`, { goalHash, taskId });
|
|
83
|
+
this.name = 'TaskNotFoundError';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export class TaskInvalidStatusError extends GoalError {
|
|
87
|
+
constructor(taskId, currentStatus, operation, allowedStatuses) {
|
|
88
|
+
super('TASK_INVALID_STATUS', `Cannot ${operation} task in "${currentStatus}" status. Allowed: ${allowedStatuses.join(', ')}`, { taskId, currentStatus, operation, allowedStatuses });
|
|
89
|
+
this.name = 'TaskInvalidStatusError';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export class TaskExecutionError extends GoalError {
|
|
93
|
+
constructor(taskId, cause, originalError) {
|
|
94
|
+
super('TASK_EXECUTION_ERROR', `Task execution failed: ${cause}`, {
|
|
95
|
+
taskId,
|
|
96
|
+
cause,
|
|
97
|
+
originalError: originalError?.message,
|
|
98
|
+
originalStack: originalError?.stack,
|
|
99
|
+
});
|
|
100
|
+
this.name = 'TaskExecutionError';
|
|
101
|
+
if (originalError) {
|
|
102
|
+
this.cause = originalError;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export class TaskExecutionTimeoutError extends GoalError {
|
|
107
|
+
constructor(taskId, timeoutMs) {
|
|
108
|
+
super('TASK_EXECUTION_TIMEOUT', `Task execution timed out after ${formatDuration(timeoutMs)}`, { taskId, timeoutMs });
|
|
109
|
+
this.name = 'TaskExecutionTimeoutError';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export class TaskApprovalRequiredError extends GoalError {
|
|
113
|
+
constructor(taskId, permissionCategory) {
|
|
114
|
+
super('TASK_APPROVAL_REQUIRED', `Task requires approval before execution`, { taskId, permissionCategory });
|
|
115
|
+
this.name = 'TaskApprovalRequiredError';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export class TaskSanitizationFailedError extends GoalError {
|
|
119
|
+
constructor(taskId, reason) {
|
|
120
|
+
super('TASK_SANITIZATION_FAILED', `Task sanitization failed: ${reason}`, { taskId, reason });
|
|
121
|
+
this.name = 'TaskSanitizationFailedError';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export class MemoryNotFoundError extends GoalError {
|
|
125
|
+
constructor(goalHash, memoryId) {
|
|
126
|
+
super('MEMORY_NOT_FOUND', `Memory not found: ${memoryId}`, { goalHash, memoryId });
|
|
127
|
+
this.name = 'MemoryNotFoundError';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export class MemoryContentTooLongError extends GoalError {
|
|
131
|
+
constructor(contentLength, maxLength) {
|
|
132
|
+
super('MEMORY_CONTENT_TOO_LONG', `Memory content exceeds maximum length (${contentLength} > ${maxLength})`, { contentLength, maxLength });
|
|
133
|
+
this.name = 'MemoryContentTooLongError';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
export class MetaGoalNotFoundError extends GoalError {
|
|
137
|
+
constructor(metaGoalId) {
|
|
138
|
+
super('META_GOAL_NOT_FOUND', `Meta-goal not found: ${metaGoalId}`, { metaGoalId });
|
|
139
|
+
this.name = 'MetaGoalNotFoundError';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
export class MetaGoalConstraintViolatedError extends GoalError {
|
|
143
|
+
constructor(metaGoalId, description, violation) {
|
|
144
|
+
super('META_GOAL_CONSTRAINT_VIOLATED', `Meta-goal constraint violated: ${violation}`, { metaGoalId, description, violation });
|
|
145
|
+
this.name = 'MetaGoalConstraintViolatedError';
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export class ApiRequestFailedError extends GoalError {
|
|
149
|
+
constructor(endpoint, method, statusCode, reason) {
|
|
150
|
+
super('API_REQUEST_FAILED', `API request failed: ${method} ${endpoint} - ${reason}`, { endpoint, method, statusCode, reason });
|
|
151
|
+
this.name = 'ApiRequestFailedError';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export class ApiAuthenticationFailedError extends GoalError {
|
|
155
|
+
constructor(reason) {
|
|
156
|
+
super('API_AUTHENTICATION_FAILED', `API authentication failed: ${reason}`, { reason });
|
|
157
|
+
this.name = 'ApiAuthenticationFailedError';
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export class ApiRateLimitedError extends GoalError {
|
|
161
|
+
constructor(retryAfter) {
|
|
162
|
+
super('API_RATE_LIMITED', `API rate limit exceeded${retryAfter ? `. Retry after ${retryAfter}s` : ''}`, { retryAfter });
|
|
163
|
+
this.name = 'ApiRateLimitedError';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
export class ApiResponseInvalidError extends GoalError {
|
|
167
|
+
constructor(endpoint, reason) {
|
|
168
|
+
super('API_RESPONSE_INVALID', `Invalid API response from ${endpoint}: ${reason}`, { endpoint, reason });
|
|
169
|
+
this.name = 'ApiResponseInvalidError';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
export class ApiNetworkError extends GoalError {
|
|
173
|
+
constructor(endpoint, reason, originalError) {
|
|
174
|
+
super('API_NETWORK_ERROR', `Network error connecting to ${endpoint}: ${reason}`, {
|
|
175
|
+
endpoint,
|
|
176
|
+
reason,
|
|
177
|
+
originalError: originalError?.message,
|
|
178
|
+
});
|
|
179
|
+
this.name = 'ApiNetworkError';
|
|
180
|
+
if (originalError) {
|
|
181
|
+
this.cause = originalError;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export class ApiTimeoutError extends GoalError {
|
|
186
|
+
constructor(endpoint, timeoutMs) {
|
|
187
|
+
super('API_TIMEOUT', `API request to ${endpoint} timed out after ${formatDuration(timeoutMs)}`, { endpoint, timeoutMs });
|
|
188
|
+
this.name = 'ApiTimeoutError';
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
export class ValidationError extends GoalError {
|
|
192
|
+
errors;
|
|
193
|
+
constructor(fieldOrMessage, valueOrErrors, reason) {
|
|
194
|
+
if (reason !== undefined) {
|
|
195
|
+
super('VALIDATION_ERROR', `Validation failed for "${fieldOrMessage}": ${reason}`, { field: fieldOrMessage, value: valueOrErrors, reason });
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
super('VALIDATION_ERROR', fieldOrMessage, { errors: valueOrErrors });
|
|
199
|
+
this.errors = valueOrErrors;
|
|
200
|
+
}
|
|
201
|
+
this.name = 'ValidationError';
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export class InvalidInputError extends GoalError {
|
|
205
|
+
constructor(input, reason) {
|
|
206
|
+
super('INVALID_INPUT', `Invalid input "${input}": ${reason}`, { input, reason });
|
|
207
|
+
this.name = 'InvalidInputError';
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
export class InvalidGoalNameError extends GoalError {
|
|
211
|
+
constructor(name, reason) {
|
|
212
|
+
super('INVALID_GOAL_NAME', `Invalid goal name "${name}": ${reason}`, { name, reason });
|
|
213
|
+
this.name = 'InvalidGoalNameError';
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export class InvalidTaskTypeError extends GoalError {
|
|
217
|
+
constructor(taskType) {
|
|
218
|
+
super('INVALID_TASK_TYPE', `Invalid task type: ${taskType}`, { taskType });
|
|
219
|
+
this.name = 'InvalidTaskTypeError';
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
export class CacheError extends GoalError {
|
|
223
|
+
constructor(message, context = {}) {
|
|
224
|
+
super('CACHE_ERROR', message, context);
|
|
225
|
+
this.name = 'CacheError';
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
export class CacheMissError extends GoalError {
|
|
229
|
+
constructor(key) {
|
|
230
|
+
super('CACHE_MISS', `Cache miss for key: ${key}`, { key });
|
|
231
|
+
this.name = 'CacheMissError';
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
export class CacheStaleError extends GoalError {
|
|
235
|
+
constructor(key, age, maxAge) {
|
|
236
|
+
super('CACHE_STALE', `Cache entry for "${key}" is stale (age: ${age}ms, max: ${maxAge}ms)`, { key, age, maxAge });
|
|
237
|
+
this.name = 'CacheStaleError';
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export class ManagerNotInitializedError extends GoalError {
|
|
241
|
+
constructor() {
|
|
242
|
+
super('MANAGER_NOT_INITIALIZED', 'Goal manager has not been initialized', {});
|
|
243
|
+
this.name = 'ManagerNotInitializedError';
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
export class ManagerError extends GoalError {
|
|
247
|
+
constructor(message, context = {}) {
|
|
248
|
+
super('MANAGER_ERROR', message, context);
|
|
249
|
+
this.name = 'ManagerError';
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function formatDuration(ms) {
|
|
253
|
+
if (ms < 1000) {
|
|
254
|
+
return `${ms}ms`;
|
|
255
|
+
}
|
|
256
|
+
if (ms < 60000) {
|
|
257
|
+
return `${Math.round(ms / 1000)}s`;
|
|
258
|
+
}
|
|
259
|
+
if (ms < 3600000) {
|
|
260
|
+
return `${Math.round(ms / 60000)}m`;
|
|
261
|
+
}
|
|
262
|
+
if (ms < 86400000) {
|
|
263
|
+
return `${Math.round(ms / 3600000)}h`;
|
|
264
|
+
}
|
|
265
|
+
return `${Math.round(ms / 86400000)}d`;
|
|
266
|
+
}
|
|
267
|
+
export function isGoalError(error) {
|
|
268
|
+
return error instanceof GoalError;
|
|
269
|
+
}
|
|
270
|
+
export function hasErrorCode(error, code) {
|
|
271
|
+
return isGoalError(error) && error.code === code;
|
|
272
|
+
}
|
|
273
|
+
export function wrapError(error, code, message) {
|
|
274
|
+
if (isGoalError(error)) {
|
|
275
|
+
return error;
|
|
276
|
+
}
|
|
277
|
+
const originalError = error instanceof Error ? error : new Error(String(error));
|
|
278
|
+
const goalError = new GoalError(code, message, {
|
|
279
|
+
originalError: originalError.message,
|
|
280
|
+
originalStack: originalError.stack,
|
|
281
|
+
});
|
|
282
|
+
goalError.cause = originalError;
|
|
283
|
+
return goalError;
|
|
284
|
+
}
|
|
285
|
+
export function isNotFoundError(error) {
|
|
286
|
+
return (hasErrorCode(error, 'GOAL_NOT_FOUND') ||
|
|
287
|
+
hasErrorCode(error, 'TASK_NOT_FOUND') ||
|
|
288
|
+
hasErrorCode(error, 'MILESTONE_NOT_FOUND') ||
|
|
289
|
+
hasErrorCode(error, 'MEMORY_NOT_FOUND') ||
|
|
290
|
+
hasErrorCode(error, 'META_GOAL_NOT_FOUND'));
|
|
291
|
+
}
|
|
292
|
+
export function isApiError(error) {
|
|
293
|
+
return (hasErrorCode(error, 'API_REQUEST_FAILED') ||
|
|
294
|
+
hasErrorCode(error, 'API_AUTHENTICATION_FAILED') ||
|
|
295
|
+
hasErrorCode(error, 'API_RATE_LIMITED') ||
|
|
296
|
+
hasErrorCode(error, 'API_RESPONSE_INVALID') ||
|
|
297
|
+
hasErrorCode(error, 'API_NETWORK_ERROR') ||
|
|
298
|
+
hasErrorCode(error, 'API_TIMEOUT'));
|
|
299
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type { GoalHash, MilestoneId, TaskId, MemoryId, MetaGoalId, GoalStatus, GoalPriority, TaskType, TaskStatus, ApprovalMode, MemoryCategory, ConstraintType, Goal, Milestone, Task, GoalMemory, MetaGoal, MetaGoalConstraint, CreateGoalInput, UpdateGoalInput, CreateMilestoneInput, UpdateMilestoneInput, CreateTaskInput, UpdateTaskInput, CreateMemoryInput, UpdateMemoryInput, CreateMetaGoalInput, UpdateMetaGoalInput, TaskFeedbackInput, TaskFailInput, ListOptions, ListTasksOptions, Logger, } from './types.js';
|
|
2
|
+
export { isValidGoalHash, isGoalStatus, isGoalPriority, isTaskType, isTaskStatus, isApprovalMode, isMemoryType, isMemorySource, isFeedbackQuality, isActionType, serializeGoal, deserializeGoal, deserializeMilestone, deserializeTask, deserializeMemory, deserializeGoalMemory, deserializeMetaGoal, deserializeGoalActionLog, type SerializedGoalActionLog, TASK_TYPES, canGoalTransitionTo, isTerminalGoalStatus, canTaskTransitionTo, isTerminalTaskStatus, } from './types.js';
|
|
3
|
+
export { type GoalErrorCode, GoalError, GoalNotFoundError, GoalAlreadyExistsError, GoalInvalidStatusError, GoalBlockedError, GoalDependencyNotFoundError, GoalCircularDependencyError, MilestoneNotFoundError, MilestoneAlreadyCompleteError, TaskNotFoundError, TaskInvalidStatusError, TaskExecutionError, TaskExecutionTimeoutError, TaskApprovalRequiredError, TaskSanitizationFailedError, MemoryNotFoundError, MemoryContentTooLongError, MetaGoalNotFoundError, MetaGoalConstraintViolatedError, ApiRequestFailedError, ApiAuthenticationFailedError, ApiRateLimitedError, ApiResponseInvalidError, ApiNetworkError, ApiTimeoutError, ValidationError, InvalidInputError, InvalidGoalNameError, InvalidTaskTypeError, CacheError, CacheMissError, CacheStaleError, ManagerNotInitializedError, ManagerError, isGoalError, hasErrorCode, wrapError, isNotFoundError, isApiError, } from './errors.js';
|
|
4
|
+
export { GoalApiClient, createGoalApiClient, type GoalApiClientOptions, type TokenProvider, type PaginatedResponse, type ApiListOptions, } from './GoalApiClient.js';
|
|
5
|
+
export { GoalValidator, createGoalValidator, DEFAULT_GOAL_VALIDATION_CONSTRAINTS, type GoalValidationConstraints, } from './GoalValidator.js';
|
|
6
|
+
export { GoalCache, createGoalCache, type GoalCacheOptions, type GoalCacheEvents, type CacheStats, type CacheType, } from './GoalCache.js';
|
|
7
|
+
export { GoalManager, createGoalManager, type GoalManagerOptions, type GoalManagerEvents, } from './GoalManager.js';
|
|
8
|
+
export { TaskGenerator, createTaskGenerator, type TaskGeneratorLLMFunction, type TaskGeneratorOptions, type TaskGeneratorEvents, type TaskSuggestion, type TaskGenerationOptions, type TaskGenerationResult, } from './TaskGenerator.js';
|
|
9
|
+
export { TaskSanitizer, createTaskSanitizer, type TaskSanitizerOptions, type SanitizationResult, type PathValidationResult, type SecurityIssue, } from './TaskSanitizer.js';
|
|
10
|
+
export { MilestoneBreaker, createMilestoneBreaker, type MilestoneLLMFunction, type MilestoneBreakerOptions, type MilestoneBreakerEvents, type MilestoneSuggestion, type MilestoneBreakdownOptions, type MilestoneBreakdownResult, } from './MilestoneBreaker.js';
|
|
11
|
+
export { TaskQueue, createTaskQueue, type TaskQueueOptions, type TaskQueueEvents, type QueuedTask, type TaskFilterOptions, type TaskQueueStats, } from './TaskQueue.js';
|
|
12
|
+
export { DependencyResolver, createDependencyResolver, getTransitiveDependencies, getTransitiveDependents, calculateCriticalPath, type DependencyResolverOptions, type DependencyNode, type GoalResolutionResult, type TaskDependencyNode, } from './DependencyResolver.js';
|
|
13
|
+
export { MetaGoalEnforcer, createMetaGoalEnforcer, metaGoalAppliesToGoal, sortMetaGoalsByPriority, getBlockingMetaGoalsForType, summarizeConstraints, type MetaGoalLLMFunction, type MetaGoalEnforcerOptions, type MetaGoalEnforcerEvents, type ConstraintViolation, type EnforcementResult, type ParsedConstraint, type ConstraintType as MetaGoalConstraintType, type ConstraintTarget, } from './MetaGoalEnforcer.js';
|
|
14
|
+
export { GoalCommsHandler, createGoalCommsHandler, type GoalCommsHandlerOptions, type GoalCommsHandlerEvents, type GoalNotificationSubtype, type ApprovalResponse, type ViewAction, type GoalNotification, type GoalApprovalRequest, type GoalViewRequest, type GoalViewResponse, type GoalModificationRedirect, type ProgressSummary, type CommsSendFunction, type ApprovalResponseHandler, } from './GoalCommsHandler.js';
|
|
15
|
+
export { TaskExecutor, createTaskExecutor, type TaskExecutorOptions, type TaskExecutorEvents, type PermissionCategory, type ExecutionContext, type TaskExecutionHandler, type ExecutionResult, type ApprovalRequestFunction, type ApprovalResult, } from './TaskExecutor.js';
|
|
16
|
+
export { PermissionBridge, createPermissionBridge, type PermissionBridgeOptions, type PermissionBridgeEvents, type PermissionDecision, type PermissionCheckOptions, type PermissionAuditEntry, type StoredPermission, type PermissionRule, } from './PermissionBridge.js';
|
|
17
|
+
export { ErrorRecovery, createErrorRecovery, type ErrorRecoveryOptions, type ErrorRecoveryEvents, type RecoveryStrategy, type ErrorCategory, type Checkpoint, type CheckpointState, type RecoveryAction, type RecoveryResult, type ErrorAnalysis, } from './ErrorRecovery.js';
|
|
18
|
+
export { ProgressTracker, createProgressTracker, type ProgressTrackerOptions, type ProgressTrackerEvents, type GoalProgress, type MilestoneProgress, type TaskStats, type VelocityMetrics, type ProgressSnapshot, type TaskCompletionRecord, } from './ProgressTracker.js';
|
|
19
|
+
export { GoalReporter, createGoalReporter, type GoalReporterOptions, type GoalReporterEvents, type ReportFormat, type ReportDetailLevel, type ReportSection, type ProgressReport, type ReportPeriod, type ReportSectionContent, type ReportMetadata, type ReportOptions, type ActionItem, type RiskAssessment, } from './GoalReporter.js';
|
|
20
|
+
export { ReviewScheduler, createReviewScheduler, type ReviewSchedulerOptions, type ReviewSchedulerEvents, type ReviewFrequency, type ReviewType, type ScheduledReview, type ReviewScheduleConfig, type ReviewTrigger, type ReviewResult, } from './ReviewScheduler.js';
|
|
21
|
+
export { TaskFeedback, createTaskFeedback, type TaskFeedbackOptions, type TaskFeedbackEvents, type FeedbackRating, type FeedbackCategory, type FeedbackSentiment, type TaskFeedbackEntry, type FeedbackStatistics, type IssuePattern, type FeedbackTrend, type FeedbackQueryOptions, type FeedbackInput, type ImprovementSuggestion, } from './TaskFeedback.js';
|
|
22
|
+
export { GoalExporter, createGoalExporter, EXPORT_FORMAT_VERSION, type GoalExporterOptions, type GoalExporterEvents, type ExportType, type ExportScope, type ExportOptions, type ExportedGoal, type ExportedMilestone, type ExportedTask, type ExportedMemory, type ExportedMetaGoal, type ExportManifest, type ExportPackage, type ExportResult, type ExportDataProvider, } from './GoalExporter.js';
|
|
23
|
+
export { GoalImporter, createGoalImporter, type GoalImporterOptions, type GoalImporterEvents, type ImportMode, type ConflictResolution, type ImportOptions, type ImportConflict, type ImportValidation, type ImportMapping, type ImportResult, type ImportDataWriter, } from './GoalImporter.js';
|
|
24
|
+
export { GoalScheduler, createGoalScheduler, type GoalSchedulerOptions, type GoalSchedulerEvents, type ScheduledGoal, type GetDueGoalsFunction, type MarkGoalStartedFunction, type MarkGoalCompletedFunction, type ExecuteGoalFunction, } from './GoalScheduler.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { isValidGoalHash, isGoalStatus, isGoalPriority, isTaskType, isTaskStatus, isApprovalMode, isMemoryType, isMemorySource, isFeedbackQuality, isActionType, serializeGoal, deserializeGoal, deserializeMilestone, deserializeTask, deserializeMemory, deserializeGoalMemory, deserializeMetaGoal, deserializeGoalActionLog, TASK_TYPES, canGoalTransitionTo, isTerminalGoalStatus, canTaskTransitionTo, isTerminalTaskStatus, } from './types.js';
|
|
2
|
+
export { GoalError, GoalNotFoundError, GoalAlreadyExistsError, GoalInvalidStatusError, GoalBlockedError, GoalDependencyNotFoundError, GoalCircularDependencyError, MilestoneNotFoundError, MilestoneAlreadyCompleteError, TaskNotFoundError, TaskInvalidStatusError, TaskExecutionError, TaskExecutionTimeoutError, TaskApprovalRequiredError, TaskSanitizationFailedError, MemoryNotFoundError, MemoryContentTooLongError, MetaGoalNotFoundError, MetaGoalConstraintViolatedError, ApiRequestFailedError, ApiAuthenticationFailedError, ApiRateLimitedError, ApiResponseInvalidError, ApiNetworkError, ApiTimeoutError, ValidationError, InvalidInputError, InvalidGoalNameError, InvalidTaskTypeError, CacheError, CacheMissError, CacheStaleError, ManagerNotInitializedError, ManagerError, isGoalError, hasErrorCode, wrapError, isNotFoundError, isApiError, } from './errors.js';
|
|
3
|
+
export { GoalApiClient, createGoalApiClient, } from './GoalApiClient.js';
|
|
4
|
+
export { GoalValidator, createGoalValidator, DEFAULT_GOAL_VALIDATION_CONSTRAINTS, } from './GoalValidator.js';
|
|
5
|
+
export { GoalCache, createGoalCache, } from './GoalCache.js';
|
|
6
|
+
export { GoalManager, createGoalManager, } from './GoalManager.js';
|
|
7
|
+
export { TaskGenerator, createTaskGenerator, } from './TaskGenerator.js';
|
|
8
|
+
export { TaskSanitizer, createTaskSanitizer, } from './TaskSanitizer.js';
|
|
9
|
+
export { MilestoneBreaker, createMilestoneBreaker, } from './MilestoneBreaker.js';
|
|
10
|
+
export { TaskQueue, createTaskQueue, } from './TaskQueue.js';
|
|
11
|
+
export { DependencyResolver, createDependencyResolver, getTransitiveDependencies, getTransitiveDependents, calculateCriticalPath, } from './DependencyResolver.js';
|
|
12
|
+
export { MetaGoalEnforcer, createMetaGoalEnforcer, metaGoalAppliesToGoal, sortMetaGoalsByPriority, getBlockingMetaGoalsForType, summarizeConstraints, } from './MetaGoalEnforcer.js';
|
|
13
|
+
export { GoalCommsHandler, createGoalCommsHandler, } from './GoalCommsHandler.js';
|
|
14
|
+
export { TaskExecutor, createTaskExecutor, } from './TaskExecutor.js';
|
|
15
|
+
export { PermissionBridge, createPermissionBridge, } from './PermissionBridge.js';
|
|
16
|
+
export { ErrorRecovery, createErrorRecovery, } from './ErrorRecovery.js';
|
|
17
|
+
export { ProgressTracker, createProgressTracker, } from './ProgressTracker.js';
|
|
18
|
+
export { GoalReporter, createGoalReporter, } from './GoalReporter.js';
|
|
19
|
+
export { ReviewScheduler, createReviewScheduler, } from './ReviewScheduler.js';
|
|
20
|
+
export { TaskFeedback, createTaskFeedback, } from './TaskFeedback.js';
|
|
21
|
+
export { GoalExporter, createGoalExporter, EXPORT_FORMAT_VERSION, } from './GoalExporter.js';
|
|
22
|
+
export { GoalImporter, createGoalImporter, } from './GoalImporter.js';
|
|
23
|
+
export { GoalScheduler, createGoalScheduler, } from './GoalScheduler.js';
|