universal-agent-memory 0.1.5 → 0.2.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/dist/bin/cli.js +207 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/agent.d.ts +20 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +388 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/coord.d.ts +7 -0
- package/dist/cli/coord.d.ts.map +1 -0
- package/dist/cli/coord.js +145 -0
- package/dist/cli/coord.js.map +1 -0
- package/dist/cli/deploy.d.ts +19 -0
- package/dist/cli/deploy.d.ts.map +1 -0
- package/dist/cli/deploy.js +267 -0
- package/dist/cli/deploy.js.map +1 -0
- package/dist/cli/task.d.ts +33 -0
- package/dist/cli/task.d.ts.map +1 -0
- package/dist/cli/task.js +570 -0
- package/dist/cli/task.js.map +1 -0
- package/dist/coordination/database.d.ts +13 -0
- package/dist/coordination/database.d.ts.map +1 -0
- package/dist/coordination/database.js +131 -0
- package/dist/coordination/database.js.map +1 -0
- package/dist/coordination/deploy-batcher.d.ts +38 -0
- package/dist/coordination/deploy-batcher.d.ts.map +1 -0
- package/dist/coordination/deploy-batcher.js +401 -0
- package/dist/coordination/deploy-batcher.js.map +1 -0
- package/dist/coordination/index.d.ts +4 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +4 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/service.d.ts +79 -0
- package/dist/coordination/service.d.ts.map +1 -0
- package/dist/coordination/service.js +591 -0
- package/dist/coordination/service.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/tasks/coordination.d.ts +74 -0
- package/dist/tasks/coordination.d.ts.map +1 -0
- package/dist/tasks/coordination.js +237 -0
- package/dist/tasks/coordination.js.map +1 -0
- package/dist/tasks/database.d.ts +14 -0
- package/dist/tasks/database.d.ts.map +1 -0
- package/dist/tasks/database.js +128 -0
- package/dist/tasks/database.js.map +1 -0
- package/dist/tasks/index.d.ts +5 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +5 -0
- package/dist/tasks/index.js.map +1 -0
- package/dist/tasks/service.d.ts +39 -0
- package/dist/tasks/service.d.ts.map +1 -0
- package/dist/tasks/service.js +582 -0
- package/dist/tasks/service.js.map +1 -0
- package/dist/tasks/types.d.ts +224 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/tasks/types.js +64 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/types/coordination.d.ts +240 -0
- package/dist/types/coordination.d.ts.map +1 -0
- package/dist/types/coordination.js +43 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/CLAUDE.template.md +371 -8
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type TaskType = 'task' | 'bug' | 'feature' | 'epic' | 'chore' | 'story';
|
|
3
|
+
export type TaskStatus = 'open' | 'in_progress' | 'blocked' | 'done' | 'wont_do';
|
|
4
|
+
export type TaskPriority = 0 | 1 | 2 | 3 | 4;
|
|
5
|
+
export type DependencyType = 'blocks' | 'related' | 'discovered_from';
|
|
6
|
+
export type TaskActivityType = 'claimed' | 'released' | 'commented' | 'updated' | 'created' | 'closed';
|
|
7
|
+
export interface Task {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
type: TaskType;
|
|
12
|
+
status: TaskStatus;
|
|
13
|
+
priority: TaskPriority;
|
|
14
|
+
assignee?: string;
|
|
15
|
+
worktreeBranch?: string;
|
|
16
|
+
labels: string[];
|
|
17
|
+
notes?: string;
|
|
18
|
+
parentId?: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
closedAt?: string;
|
|
22
|
+
closedReason?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TaskDependency {
|
|
25
|
+
id: number;
|
|
26
|
+
fromTask: string;
|
|
27
|
+
toTask: string;
|
|
28
|
+
depType: DependencyType;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TaskHistoryEntry {
|
|
32
|
+
id: number;
|
|
33
|
+
taskId: string;
|
|
34
|
+
field: string;
|
|
35
|
+
oldValue?: string;
|
|
36
|
+
newValue?: string;
|
|
37
|
+
changedBy?: string;
|
|
38
|
+
changedAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TaskActivity {
|
|
41
|
+
id: number;
|
|
42
|
+
taskId: string;
|
|
43
|
+
agentId: string;
|
|
44
|
+
activity: TaskActivityType;
|
|
45
|
+
details?: string;
|
|
46
|
+
timestamp: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TaskSummary {
|
|
49
|
+
id: number;
|
|
50
|
+
originalIds: string[];
|
|
51
|
+
summary: string;
|
|
52
|
+
labels: string[];
|
|
53
|
+
closedPeriod: string;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
}
|
|
56
|
+
export interface TaskWithRelations extends Task {
|
|
57
|
+
blockedBy: string[];
|
|
58
|
+
blocks: string[];
|
|
59
|
+
relatedTo: string[];
|
|
60
|
+
children: string[];
|
|
61
|
+
parent?: Task;
|
|
62
|
+
isBlocked: boolean;
|
|
63
|
+
isReady: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface CreateTaskInput {
|
|
66
|
+
title: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
type?: TaskType;
|
|
69
|
+
priority?: TaskPriority;
|
|
70
|
+
labels?: string[];
|
|
71
|
+
parentId?: string;
|
|
72
|
+
assignee?: string;
|
|
73
|
+
notes?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface UpdateTaskInput {
|
|
76
|
+
title?: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
type?: TaskType;
|
|
79
|
+
status?: TaskStatus;
|
|
80
|
+
priority?: TaskPriority;
|
|
81
|
+
assignee?: string;
|
|
82
|
+
worktreeBranch?: string;
|
|
83
|
+
labels?: string[];
|
|
84
|
+
notes?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface TaskFilter {
|
|
87
|
+
status?: TaskStatus | TaskStatus[];
|
|
88
|
+
type?: TaskType | TaskType[];
|
|
89
|
+
priority?: TaskPriority | TaskPriority[];
|
|
90
|
+
assignee?: string;
|
|
91
|
+
labels?: string[];
|
|
92
|
+
parentId?: string;
|
|
93
|
+
isBlocked?: boolean;
|
|
94
|
+
isReady?: boolean;
|
|
95
|
+
search?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface TaskStats {
|
|
98
|
+
total: number;
|
|
99
|
+
byStatus: Record<TaskStatus, number>;
|
|
100
|
+
byType: Record<TaskType, number>;
|
|
101
|
+
byPriority: Record<TaskPriority, number>;
|
|
102
|
+
blocked: number;
|
|
103
|
+
ready: number;
|
|
104
|
+
overdue: number;
|
|
105
|
+
}
|
|
106
|
+
export interface TaskJSONL {
|
|
107
|
+
id: string;
|
|
108
|
+
title: string;
|
|
109
|
+
description?: string;
|
|
110
|
+
type: TaskType;
|
|
111
|
+
status: TaskStatus;
|
|
112
|
+
priority: TaskPriority;
|
|
113
|
+
assignee?: string;
|
|
114
|
+
worktreeBranch?: string;
|
|
115
|
+
labels: string[];
|
|
116
|
+
notes?: string;
|
|
117
|
+
parentId?: string;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
closedAt?: string;
|
|
121
|
+
closedReason?: string;
|
|
122
|
+
dependencies: Array<{
|
|
123
|
+
toTask: string;
|
|
124
|
+
depType: DependencyType;
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
export declare const TaskTypeSchema: z.ZodEnum<["task", "bug", "feature", "epic", "chore", "story"]>;
|
|
128
|
+
export declare const TaskStatusSchema: z.ZodEnum<["open", "in_progress", "blocked", "done", "wont_do"]>;
|
|
129
|
+
export declare const TaskPrioritySchema: z.ZodNumber;
|
|
130
|
+
export declare const DependencyTypeSchema: z.ZodEnum<["blocks", "related", "discovered_from"]>;
|
|
131
|
+
export declare const CreateTaskInputSchema: z.ZodObject<{
|
|
132
|
+
title: z.ZodString;
|
|
133
|
+
description: z.ZodOptional<z.ZodString>;
|
|
134
|
+
type: z.ZodDefault<z.ZodEnum<["task", "bug", "feature", "epic", "chore", "story"]>>;
|
|
135
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
136
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
137
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
138
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
139
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
type: "chore" | "feature" | "task" | "bug" | "epic" | "story";
|
|
142
|
+
priority: number;
|
|
143
|
+
title: string;
|
|
144
|
+
labels: string[];
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
parentId?: string | undefined;
|
|
147
|
+
assignee?: string | undefined;
|
|
148
|
+
notes?: string | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
title: string;
|
|
151
|
+
type?: "chore" | "feature" | "task" | "bug" | "epic" | "story" | undefined;
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
priority?: number | undefined;
|
|
154
|
+
labels?: string[] | undefined;
|
|
155
|
+
parentId?: string | undefined;
|
|
156
|
+
assignee?: string | undefined;
|
|
157
|
+
notes?: string | undefined;
|
|
158
|
+
}>;
|
|
159
|
+
export declare const UpdateTaskInputSchema: z.ZodObject<{
|
|
160
|
+
title: z.ZodOptional<z.ZodString>;
|
|
161
|
+
description: z.ZodOptional<z.ZodString>;
|
|
162
|
+
type: z.ZodOptional<z.ZodEnum<["task", "bug", "feature", "epic", "chore", "story"]>>;
|
|
163
|
+
status: z.ZodOptional<z.ZodEnum<["open", "in_progress", "blocked", "done", "wont_do"]>>;
|
|
164
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
assignee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
worktreeBranch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
type?: "chore" | "feature" | "task" | "bug" | "epic" | "story" | undefined;
|
|
171
|
+
status?: "open" | "in_progress" | "blocked" | "done" | "wont_do" | undefined;
|
|
172
|
+
description?: string | undefined;
|
|
173
|
+
priority?: number | undefined;
|
|
174
|
+
title?: string | undefined;
|
|
175
|
+
labels?: string[] | undefined;
|
|
176
|
+
assignee?: string | null | undefined;
|
|
177
|
+
notes?: string | null | undefined;
|
|
178
|
+
worktreeBranch?: string | null | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
type?: "chore" | "feature" | "task" | "bug" | "epic" | "story" | undefined;
|
|
181
|
+
status?: "open" | "in_progress" | "blocked" | "done" | "wont_do" | undefined;
|
|
182
|
+
description?: string | undefined;
|
|
183
|
+
priority?: number | undefined;
|
|
184
|
+
title?: string | undefined;
|
|
185
|
+
labels?: string[] | undefined;
|
|
186
|
+
assignee?: string | null | undefined;
|
|
187
|
+
notes?: string | null | undefined;
|
|
188
|
+
worktreeBranch?: string | null | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
export declare const TaskFilterSchema: z.ZodObject<{
|
|
191
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["open", "in_progress", "blocked", "done", "wont_do"]>, z.ZodArray<z.ZodEnum<["open", "in_progress", "blocked", "done", "wont_do"]>, "many">]>>;
|
|
192
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["task", "bug", "feature", "epic", "chore", "story"]>, z.ZodArray<z.ZodEnum<["task", "bug", "feature", "epic", "chore", "story"]>, "many">]>>;
|
|
193
|
+
priority: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber, "many">]>>;
|
|
194
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
195
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
196
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
197
|
+
isBlocked: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
isReady: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
search: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
type?: "chore" | "feature" | "task" | "bug" | "epic" | "story" | ("chore" | "feature" | "task" | "bug" | "epic" | "story")[] | undefined;
|
|
202
|
+
status?: "open" | "in_progress" | "blocked" | "done" | "wont_do" | ("open" | "in_progress" | "blocked" | "done" | "wont_do")[] | undefined;
|
|
203
|
+
priority?: number | number[] | undefined;
|
|
204
|
+
search?: string | undefined;
|
|
205
|
+
labels?: string[] | undefined;
|
|
206
|
+
parentId?: string | undefined;
|
|
207
|
+
assignee?: string | undefined;
|
|
208
|
+
isBlocked?: boolean | undefined;
|
|
209
|
+
isReady?: boolean | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
type?: "chore" | "feature" | "task" | "bug" | "epic" | "story" | ("chore" | "feature" | "task" | "bug" | "epic" | "story")[] | undefined;
|
|
212
|
+
status?: "open" | "in_progress" | "blocked" | "done" | "wont_do" | ("open" | "in_progress" | "blocked" | "done" | "wont_do")[] | undefined;
|
|
213
|
+
priority?: number | number[] | undefined;
|
|
214
|
+
search?: string | undefined;
|
|
215
|
+
labels?: string[] | undefined;
|
|
216
|
+
parentId?: string | undefined;
|
|
217
|
+
assignee?: string | undefined;
|
|
218
|
+
isBlocked?: boolean | undefined;
|
|
219
|
+
isReady?: boolean | undefined;
|
|
220
|
+
}>;
|
|
221
|
+
export declare const PRIORITY_LABELS: Record<TaskPriority, string>;
|
|
222
|
+
export declare const STATUS_ICONS: Record<TaskStatus, string>;
|
|
223
|
+
export declare const TYPE_ICONS: Record<TaskType, string>;
|
|
224
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tasks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAG/E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAGjF,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAG7C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAGtE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAGvG,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,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;;;;;;;;;;;;EAU3B,CAAC;AAGH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAMxD,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAMnD,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAO/C,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Zod schemas for validation
|
|
3
|
+
export const TaskTypeSchema = z.enum(['task', 'bug', 'feature', 'epic', 'chore', 'story']);
|
|
4
|
+
export const TaskStatusSchema = z.enum(['open', 'in_progress', 'blocked', 'done', 'wont_do']);
|
|
5
|
+
export const TaskPrioritySchema = z.number().int().min(0).max(4);
|
|
6
|
+
export const DependencyTypeSchema = z.enum(['blocks', 'related', 'discovered_from']);
|
|
7
|
+
export const CreateTaskInputSchema = z.object({
|
|
8
|
+
title: z.string().min(1).max(500),
|
|
9
|
+
description: z.string().max(10000).optional(),
|
|
10
|
+
type: TaskTypeSchema.default('task'),
|
|
11
|
+
priority: TaskPrioritySchema.default(2),
|
|
12
|
+
labels: z.array(z.string()).default([]),
|
|
13
|
+
parentId: z.string().optional(),
|
|
14
|
+
assignee: z.string().optional(),
|
|
15
|
+
notes: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const UpdateTaskInputSchema = z.object({
|
|
18
|
+
title: z.string().min(1).max(500).optional(),
|
|
19
|
+
description: z.string().max(10000).optional(),
|
|
20
|
+
type: TaskTypeSchema.optional(),
|
|
21
|
+
status: TaskStatusSchema.optional(),
|
|
22
|
+
priority: TaskPrioritySchema.optional(),
|
|
23
|
+
assignee: z.string().nullable().optional(),
|
|
24
|
+
worktreeBranch: z.string().nullable().optional(),
|
|
25
|
+
labels: z.array(z.string()).optional(),
|
|
26
|
+
notes: z.string().nullable().optional(),
|
|
27
|
+
});
|
|
28
|
+
export const TaskFilterSchema = z.object({
|
|
29
|
+
status: z.union([TaskStatusSchema, z.array(TaskStatusSchema)]).optional(),
|
|
30
|
+
type: z.union([TaskTypeSchema, z.array(TaskTypeSchema)]).optional(),
|
|
31
|
+
priority: z.union([TaskPrioritySchema, z.array(TaskPrioritySchema)]).optional(),
|
|
32
|
+
assignee: z.string().optional(),
|
|
33
|
+
labels: z.array(z.string()).optional(),
|
|
34
|
+
parentId: z.string().optional(),
|
|
35
|
+
isBlocked: z.boolean().optional(),
|
|
36
|
+
isReady: z.boolean().optional(),
|
|
37
|
+
search: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
// Priority labels for display
|
|
40
|
+
export const PRIORITY_LABELS = {
|
|
41
|
+
0: 'P0 (Critical)',
|
|
42
|
+
1: 'P1 (High)',
|
|
43
|
+
2: 'P2 (Medium)',
|
|
44
|
+
3: 'P3 (Low)',
|
|
45
|
+
4: 'P4 (Backlog)',
|
|
46
|
+
};
|
|
47
|
+
// Status icons for display
|
|
48
|
+
export const STATUS_ICONS = {
|
|
49
|
+
open: '○',
|
|
50
|
+
in_progress: '◐',
|
|
51
|
+
blocked: '❄',
|
|
52
|
+
done: '✓',
|
|
53
|
+
wont_do: '✗',
|
|
54
|
+
};
|
|
55
|
+
// Type icons for display
|
|
56
|
+
export const TYPE_ICONS = {
|
|
57
|
+
task: '◆',
|
|
58
|
+
bug: '🐛',
|
|
59
|
+
feature: '✨',
|
|
60
|
+
epic: '🎯',
|
|
61
|
+
chore: '🔧',
|
|
62
|
+
story: '📖',
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tasks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+JxB,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,K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,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,8BAA8B;AAC9B,MAAM,CAAC,MAAM,eAAe,GAAiC;IAC3D,CAAC,EAAE,eAAe;IAClB,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,cAAc;CAClB,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,YAAY,GAA+B;IACtD,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,GAAG;IAChB,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,yBAAyB;AACzB,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,IAAI;IACT,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type AgentStatus = 'active' | 'idle' | 'completed' | 'failed';
|
|
3
|
+
export type MessageType = 'request' | 'response' | 'notification' | 'claim' | 'release';
|
|
4
|
+
export type MessageChannel = 'broadcast' | 'deploy' | 'review' | 'direct' | 'coordination';
|
|
5
|
+
export type WorkIntentType = 'editing' | 'reviewing' | 'refactoring' | 'testing' | 'documenting';
|
|
6
|
+
export type ConflictRisk = 'none' | 'low' | 'medium' | 'high' | 'critical';
|
|
7
|
+
export type DeployActionType = 'commit' | 'push' | 'merge' | 'deploy' | 'workflow';
|
|
8
|
+
export type DeployStatus = 'pending' | 'batched' | 'executing' | 'completed' | 'failed';
|
|
9
|
+
export interface AgentRegistryEntry {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
status: AgentStatus;
|
|
14
|
+
currentTask?: string;
|
|
15
|
+
worktreeBranch?: string;
|
|
16
|
+
startedAt: string;
|
|
17
|
+
lastHeartbeat: string;
|
|
18
|
+
capabilities?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface MessagePayload {
|
|
21
|
+
action: string;
|
|
22
|
+
resource?: string;
|
|
23
|
+
data?: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface AgentMessage {
|
|
26
|
+
id: number;
|
|
27
|
+
channel: MessageChannel;
|
|
28
|
+
fromAgent?: string;
|
|
29
|
+
toAgent?: string;
|
|
30
|
+
type: MessageType;
|
|
31
|
+
payload: MessagePayload;
|
|
32
|
+
priority: number;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
readAt?: string;
|
|
35
|
+
expiresAt?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkAnnouncement {
|
|
38
|
+
id: number;
|
|
39
|
+
agentId: string;
|
|
40
|
+
agentName?: string;
|
|
41
|
+
worktreeBranch?: string;
|
|
42
|
+
intentType: WorkIntentType;
|
|
43
|
+
resource: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
filesAffected?: string[];
|
|
46
|
+
estimatedCompletion?: string;
|
|
47
|
+
announcedAt: string;
|
|
48
|
+
completedAt?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface WorkOverlap {
|
|
51
|
+
resource: string;
|
|
52
|
+
agents: Array<{
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
intentType: WorkIntentType;
|
|
56
|
+
worktreeBranch?: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
}>;
|
|
59
|
+
conflictRisk: ConflictRisk;
|
|
60
|
+
suggestion: string;
|
|
61
|
+
}
|
|
62
|
+
export interface CollaborationSuggestion {
|
|
63
|
+
type: 'sequence' | 'parallel' | 'handoff' | 'merge_order';
|
|
64
|
+
agents: string[];
|
|
65
|
+
reason: string;
|
|
66
|
+
suggestedOrder?: string[];
|
|
67
|
+
estimatedMergeComplexity?: ConflictRisk;
|
|
68
|
+
}
|
|
69
|
+
export type ClaimType = 'exclusive' | 'shared';
|
|
70
|
+
export interface WorkClaim extends WorkAnnouncement {
|
|
71
|
+
claimType?: ClaimType;
|
|
72
|
+
claimedAt: string;
|
|
73
|
+
expiresAt?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface DeployAction {
|
|
76
|
+
id: number;
|
|
77
|
+
agentId: string;
|
|
78
|
+
actionType: DeployActionType;
|
|
79
|
+
target: string;
|
|
80
|
+
payload?: Record<string, unknown>;
|
|
81
|
+
status: DeployStatus;
|
|
82
|
+
batchId?: string;
|
|
83
|
+
queuedAt: string;
|
|
84
|
+
executeAfter?: string;
|
|
85
|
+
priority: number;
|
|
86
|
+
dependencies?: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface DeployBatch {
|
|
89
|
+
id: string;
|
|
90
|
+
actions: DeployAction[];
|
|
91
|
+
createdAt: string;
|
|
92
|
+
status: DeployStatus;
|
|
93
|
+
}
|
|
94
|
+
export interface BatchResult {
|
|
95
|
+
batchId: string;
|
|
96
|
+
success: boolean;
|
|
97
|
+
executedActions: number;
|
|
98
|
+
failedActions: number;
|
|
99
|
+
errors?: string[];
|
|
100
|
+
duration: number;
|
|
101
|
+
}
|
|
102
|
+
export interface CoordinationStatus {
|
|
103
|
+
activeAgents: AgentRegistryEntry[];
|
|
104
|
+
activeClaims: WorkClaim[];
|
|
105
|
+
pendingDeploys: DeployAction[];
|
|
106
|
+
pendingMessages: number;
|
|
107
|
+
}
|
|
108
|
+
export declare const AgentRegistryEntrySchema: z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
sessionId: z.ZodString;
|
|
112
|
+
status: z.ZodEnum<["active", "idle", "completed", "failed"]>;
|
|
113
|
+
currentTask: z.ZodOptional<z.ZodString>;
|
|
114
|
+
startedAt: z.ZodString;
|
|
115
|
+
lastHeartbeat: z.ZodString;
|
|
116
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
status: "active" | "idle" | "completed" | "failed";
|
|
119
|
+
name: string;
|
|
120
|
+
id: string;
|
|
121
|
+
sessionId: string;
|
|
122
|
+
startedAt: string;
|
|
123
|
+
lastHeartbeat: string;
|
|
124
|
+
currentTask?: string | undefined;
|
|
125
|
+
capabilities?: string[] | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
status: "active" | "idle" | "completed" | "failed";
|
|
128
|
+
name: string;
|
|
129
|
+
id: string;
|
|
130
|
+
sessionId: string;
|
|
131
|
+
startedAt: string;
|
|
132
|
+
lastHeartbeat: string;
|
|
133
|
+
currentTask?: string | undefined;
|
|
134
|
+
capabilities?: string[] | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const MessagePayloadSchema: z.ZodObject<{
|
|
137
|
+
action: z.ZodString;
|
|
138
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
139
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
action: string;
|
|
142
|
+
resource?: string | undefined;
|
|
143
|
+
data?: unknown;
|
|
144
|
+
}, {
|
|
145
|
+
action: string;
|
|
146
|
+
resource?: string | undefined;
|
|
147
|
+
data?: unknown;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const AgentMessageSchema: z.ZodObject<{
|
|
150
|
+
id: z.ZodNumber;
|
|
151
|
+
channel: z.ZodEnum<["broadcast", "deploy", "review", "direct", "coordination"]>;
|
|
152
|
+
fromAgent: z.ZodOptional<z.ZodString>;
|
|
153
|
+
toAgent: z.ZodOptional<z.ZodString>;
|
|
154
|
+
type: z.ZodEnum<["request", "response", "notification", "claim", "release"]>;
|
|
155
|
+
payload: z.ZodObject<{
|
|
156
|
+
action: z.ZodString;
|
|
157
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
158
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
action: string;
|
|
161
|
+
resource?: string | undefined;
|
|
162
|
+
data?: unknown;
|
|
163
|
+
}, {
|
|
164
|
+
action: string;
|
|
165
|
+
resource?: string | undefined;
|
|
166
|
+
data?: unknown;
|
|
167
|
+
}>;
|
|
168
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
169
|
+
createdAt: z.ZodString;
|
|
170
|
+
readAt: z.ZodOptional<z.ZodString>;
|
|
171
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
type: "request" | "response" | "notification" | "claim" | "release";
|
|
174
|
+
id: number;
|
|
175
|
+
channel: "broadcast" | "deploy" | "review" | "direct" | "coordination";
|
|
176
|
+
payload: {
|
|
177
|
+
action: string;
|
|
178
|
+
resource?: string | undefined;
|
|
179
|
+
data?: unknown;
|
|
180
|
+
};
|
|
181
|
+
priority: number;
|
|
182
|
+
createdAt: string;
|
|
183
|
+
fromAgent?: string | undefined;
|
|
184
|
+
toAgent?: string | undefined;
|
|
185
|
+
readAt?: string | undefined;
|
|
186
|
+
expiresAt?: string | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
type: "request" | "response" | "notification" | "claim" | "release";
|
|
189
|
+
id: number;
|
|
190
|
+
channel: "broadcast" | "deploy" | "review" | "direct" | "coordination";
|
|
191
|
+
payload: {
|
|
192
|
+
action: string;
|
|
193
|
+
resource?: string | undefined;
|
|
194
|
+
data?: unknown;
|
|
195
|
+
};
|
|
196
|
+
createdAt: string;
|
|
197
|
+
fromAgent?: string | undefined;
|
|
198
|
+
toAgent?: string | undefined;
|
|
199
|
+
priority?: number | undefined;
|
|
200
|
+
readAt?: string | undefined;
|
|
201
|
+
expiresAt?: string | undefined;
|
|
202
|
+
}>;
|
|
203
|
+
export declare const DeployActionSchema: z.ZodObject<{
|
|
204
|
+
id: z.ZodNumber;
|
|
205
|
+
agentId: z.ZodString;
|
|
206
|
+
actionType: z.ZodEnum<["commit", "push", "merge", "deploy", "workflow"]>;
|
|
207
|
+
target: z.ZodString;
|
|
208
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
209
|
+
status: z.ZodEnum<["pending", "batched", "executing", "completed", "failed"]>;
|
|
210
|
+
batchId: z.ZodOptional<z.ZodString>;
|
|
211
|
+
queuedAt: z.ZodString;
|
|
212
|
+
executeAfter: z.ZodOptional<z.ZodString>;
|
|
213
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
214
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
status: "completed" | "failed" | "pending" | "batched" | "executing";
|
|
217
|
+
id: number;
|
|
218
|
+
priority: number;
|
|
219
|
+
agentId: string;
|
|
220
|
+
actionType: "push" | "deploy" | "commit" | "merge" | "workflow";
|
|
221
|
+
target: string;
|
|
222
|
+
queuedAt: string;
|
|
223
|
+
payload?: Record<string, unknown> | undefined;
|
|
224
|
+
batchId?: string | undefined;
|
|
225
|
+
executeAfter?: string | undefined;
|
|
226
|
+
dependencies?: string[] | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
status: "completed" | "failed" | "pending" | "batched" | "executing";
|
|
229
|
+
id: number;
|
|
230
|
+
agentId: string;
|
|
231
|
+
actionType: "push" | "deploy" | "commit" | "merge" | "workflow";
|
|
232
|
+
target: string;
|
|
233
|
+
queuedAt: string;
|
|
234
|
+
payload?: Record<string, unknown> | undefined;
|
|
235
|
+
priority?: number | undefined;
|
|
236
|
+
batchId?: string | undefined;
|
|
237
|
+
executeAfter?: string | undefined;
|
|
238
|
+
dependencies?: string[] | undefined;
|
|
239
|
+
}>;
|
|
240
|
+
//# sourceMappingURL=coordination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination.d.ts","sourceRoot":"","sources":["../../src/types/coordination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAGrE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAGxF,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC;AAG3F,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAGjG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAG3E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;AAGnF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAGxF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY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AC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;CACzB;AAGD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY7B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Zod schemas for validation
|
|
3
|
+
export const AgentRegistryEntrySchema = z.object({
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
sessionId: z.string(),
|
|
7
|
+
status: z.enum(['active', 'idle', 'completed', 'failed']),
|
|
8
|
+
currentTask: z.string().optional(),
|
|
9
|
+
startedAt: z.string(),
|
|
10
|
+
lastHeartbeat: z.string(),
|
|
11
|
+
capabilities: z.array(z.string()).optional(),
|
|
12
|
+
});
|
|
13
|
+
export const MessagePayloadSchema = z.object({
|
|
14
|
+
action: z.string(),
|
|
15
|
+
resource: z.string().optional(),
|
|
16
|
+
data: z.unknown().optional(),
|
|
17
|
+
});
|
|
18
|
+
export const AgentMessageSchema = z.object({
|
|
19
|
+
id: z.number(),
|
|
20
|
+
channel: z.enum(['broadcast', 'deploy', 'review', 'direct', 'coordination']),
|
|
21
|
+
fromAgent: z.string().optional(),
|
|
22
|
+
toAgent: z.string().optional(),
|
|
23
|
+
type: z.enum(['request', 'response', 'notification', 'claim', 'release']),
|
|
24
|
+
payload: MessagePayloadSchema,
|
|
25
|
+
priority: z.number().default(5),
|
|
26
|
+
createdAt: z.string(),
|
|
27
|
+
readAt: z.string().optional(),
|
|
28
|
+
expiresAt: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
export const DeployActionSchema = z.object({
|
|
31
|
+
id: z.number(),
|
|
32
|
+
agentId: z.string(),
|
|
33
|
+
actionType: z.enum(['commit', 'push', 'merge', 'deploy', 'workflow']),
|
|
34
|
+
target: z.string(),
|
|
35
|
+
payload: z.record(z.unknown()).optional(),
|
|
36
|
+
status: z.enum(['pending', 'batched', 'executing', 'completed', 'failed']),
|
|
37
|
+
batchId: z.string().optional(),
|
|
38
|
+
queuedAt: z.string(),
|
|
39
|
+
executeAfter: z.string().optional(),
|
|
40
|
+
priority: z.number().default(5),
|
|
41
|
+
dependencies: z.array(z.string()).optional(),
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=coordination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination.js","sourceRoot":"","sources":["../../src/types/coordination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgJxB,6BAA6B;AAC7B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACzD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,CAAC,CAAC,MAA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EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IACrE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC1E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/B,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-agent-memory",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Universal AI agent memory system - CLAUDE.md templates, memory, worktrees for Claude Code, Factory.AI, VSCode, OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|