@pi-unipi/core 0.1.0 → 0.1.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/constants.ts +42 -1
- package/events.ts +81 -1
- package/package.json +1 -1
package/constants.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const MODULES = {
|
|
|
25
25
|
MCP: "@unipi/mcp",
|
|
26
26
|
TASK: "@unipi/task",
|
|
27
27
|
WEBTOOLS: "@unipi/webtools",
|
|
28
|
-
INFO_SCREEN: "@unipi/info-screen",
|
|
28
|
+
INFO_SCREEN: "@pi-unipi/info-screen",
|
|
29
29
|
IMPECCABLE: "@unipi/impeccable",
|
|
30
30
|
SETTINGS: "@unipi/settings",
|
|
31
31
|
} as const;
|
|
@@ -78,6 +78,47 @@ export const UNIPI_DIRS = {
|
|
|
78
78
|
QUICK_WORK: ".unipi/quick-work",
|
|
79
79
|
} as const;
|
|
80
80
|
|
|
81
|
+
/** Memory tool names */
|
|
82
|
+
export const MEMORY_TOOLS = {
|
|
83
|
+
STORE: "memory_store",
|
|
84
|
+
SEARCH: "memory_search",
|
|
85
|
+
DELETE: "memory_delete",
|
|
86
|
+
LIST: "memory_list",
|
|
87
|
+
GLOBAL_SEARCH: "global_memory_search",
|
|
88
|
+
GLOBAL_LIST: "global_memory_list",
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
/** Memory command names */
|
|
92
|
+
export const MEMORY_COMMANDS = {
|
|
93
|
+
PROCESS: "memory-process",
|
|
94
|
+
SEARCH: "memory-search",
|
|
95
|
+
CONSOLIDATE: "memory-consolidate",
|
|
96
|
+
FORGET: "memory-forget",
|
|
97
|
+
GLOBAL_SEARCH: "global-memory-search",
|
|
98
|
+
GLOBAL_LIST: "global-memory-list",
|
|
99
|
+
} as const;
|
|
100
|
+
|
|
101
|
+
/** Memory directory paths */
|
|
102
|
+
export const MEMORY_DIRS = {
|
|
103
|
+
BASE: "~/.unipi/memory",
|
|
104
|
+
GLOBAL: "~/.unipi/memory/global",
|
|
105
|
+
} as const;
|
|
106
|
+
|
|
107
|
+
/** Memory defaults */
|
|
108
|
+
export const MEMORY_DEFAULTS = {
|
|
109
|
+
EMBEDDING_DIM: 384,
|
|
110
|
+
SEARCH_LIMIT: 10,
|
|
111
|
+
SNIPPET_CHARS: 150,
|
|
112
|
+
} as const;
|
|
113
|
+
|
|
114
|
+
/** Memory types */
|
|
115
|
+
export const MEMORY_TYPES = {
|
|
116
|
+
PREFERENCE: "preference",
|
|
117
|
+
DECISION: "decision",
|
|
118
|
+
PATTERN: "pattern",
|
|
119
|
+
SUMMARY: "summary",
|
|
120
|
+
} as const;
|
|
121
|
+
|
|
81
122
|
/** Default ralph loop settings */
|
|
82
123
|
export const RALPH_DEFAULTS = {
|
|
83
124
|
MAX_ITERATIONS: 50,
|
package/events.ts
CHANGED
|
@@ -28,6 +28,20 @@ export const UNIPI_EVENTS = {
|
|
|
28
28
|
MODULE_STATUS_REQUEST: "unipi:module:status:request",
|
|
29
29
|
/** Module status response */
|
|
30
30
|
MODULE_STATUS_RESPONSE: "unipi:module:status:response",
|
|
31
|
+
|
|
32
|
+
/** Info screen group registered */
|
|
33
|
+
INFO_GROUP_REGISTERED: "unipi:info:group:registered",
|
|
34
|
+
/** Info screen data updated */
|
|
35
|
+
INFO_DATA_UPDATED: "unipi:info:data:updated",
|
|
36
|
+
|
|
37
|
+
/** Memory stored/updated */
|
|
38
|
+
MEMORY_STORED: "unipi:memory:stored",
|
|
39
|
+
/** Memory deleted */
|
|
40
|
+
MEMORY_DELETED: "unipi:memory:deleted",
|
|
41
|
+
/** Memory search performed */
|
|
42
|
+
MEMORY_SEARCHED: "unipi:memory:searched",
|
|
43
|
+
/** Memory consolidation completed */
|
|
44
|
+
MEMORY_CONSOLIDATED: "unipi:memory:consolidated",
|
|
31
45
|
} as const;
|
|
32
46
|
|
|
33
47
|
/** Payload for MODULE_READY / MODULE_GONE */
|
|
@@ -96,6 +110,66 @@ export interface UnipiStatusResponseEvent {
|
|
|
96
110
|
status: Record<string, unknown>;
|
|
97
111
|
}
|
|
98
112
|
|
|
113
|
+
/** Payload for MEMORY_STORED */
|
|
114
|
+
export interface UnipiMemoryStoredEvent {
|
|
115
|
+
/** Memory ID */
|
|
116
|
+
id: string;
|
|
117
|
+
/** Memory title */
|
|
118
|
+
title: string;
|
|
119
|
+
/** Memory type */
|
|
120
|
+
type: string;
|
|
121
|
+
/** Project name */
|
|
122
|
+
project: string;
|
|
123
|
+
/** Whether this was an update or create */
|
|
124
|
+
action: "created" | "updated";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Payload for MEMORY_DELETED */
|
|
128
|
+
export interface UnipiMemoryDeletedEvent {
|
|
129
|
+
/** Memory ID */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Memory title */
|
|
132
|
+
title: string;
|
|
133
|
+
/** Project name */
|
|
134
|
+
project: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Payload for MEMORY_SEARCHED */
|
|
138
|
+
export interface UnipiMemorySearchedEvent {
|
|
139
|
+
/** Search query */
|
|
140
|
+
query: string;
|
|
141
|
+
/** Number of results */
|
|
142
|
+
resultCount: number;
|
|
143
|
+
/** Project scope */
|
|
144
|
+
project: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Payload for MEMORY_CONSOLIDATED */
|
|
148
|
+
export interface UnipiMemoryConsolidatedEvent {
|
|
149
|
+
/** Number of memories extracted */
|
|
150
|
+
count: number;
|
|
151
|
+
/** Project name */
|
|
152
|
+
projectName: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Payload for INFO_GROUP_REGISTERED */
|
|
156
|
+
export interface UnipiInfoGroupEvent {
|
|
157
|
+
/** Group id */
|
|
158
|
+
groupId: string;
|
|
159
|
+
/** Group display name */
|
|
160
|
+
groupName: string;
|
|
161
|
+
/** Module that registered the group */
|
|
162
|
+
module: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Payload for INFO_DATA_UPDATED */
|
|
166
|
+
export interface UnipiInfoDataEvent {
|
|
167
|
+
/** Group id */
|
|
168
|
+
groupId: string;
|
|
169
|
+
/** Updated data keys */
|
|
170
|
+
keys: string[];
|
|
171
|
+
}
|
|
172
|
+
|
|
99
173
|
/** Union of all unipi event payloads */
|
|
100
174
|
export type UnipiEventPayload =
|
|
101
175
|
| UnipiModuleEvent
|
|
@@ -103,4 +177,10 @@ export type UnipiEventPayload =
|
|
|
103
177
|
| UnipiRalphLoopEvent
|
|
104
178
|
| UnipiRalphIterationEvent
|
|
105
179
|
| UnipiStatusRequestEvent
|
|
106
|
-
| UnipiStatusResponseEvent
|
|
180
|
+
| UnipiStatusResponseEvent
|
|
181
|
+
| UnipiMemoryStoredEvent
|
|
182
|
+
| UnipiMemoryDeletedEvent
|
|
183
|
+
| UnipiMemorySearchedEvent
|
|
184
|
+
| UnipiMemoryConsolidatedEvent
|
|
185
|
+
| UnipiInfoGroupEvent
|
|
186
|
+
| UnipiInfoDataEvent;
|