@stoneforge/shared-routes 0.1.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 +13 -0
- package/README.md +69 -0
- package/dist/channels.d.ts +9 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +413 -0
- package/dist/channels.js.map +1 -0
- package/dist/documents.d.ts +9 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +1205 -0
- package/dist/documents.js.map +1 -0
- package/dist/elements.d.ts +9 -0
- package/dist/elements.d.ts.map +1 -0
- package/dist/elements.js +87 -0
- package/dist/elements.js.map +1 -0
- package/dist/entities.d.ts +9 -0
- package/dist/entities.d.ts.map +1 -0
- package/dist/entities.js +92 -0
- package/dist/entities.js.map +1 -0
- package/dist/inbox.d.ts +10 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +538 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/libraries.d.ts +9 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +467 -0
- package/dist/libraries.js.map +1 -0
- package/dist/messages.d.ts +9 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +338 -0
- package/dist/messages.js.map +1 -0
- package/dist/plans.d.ts +10 -0
- package/dist/plans.d.ts.map +1 -0
- package/dist/plans.js +495 -0
- package/dist/plans.js.map +1 -0
- package/dist/types.d.ts +128 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/ws/broadcaster.d.ts +62 -0
- package/dist/ws/broadcaster.d.ts.map +1 -0
- package/dist/ws/broadcaster.js +146 -0
- package/dist/ws/broadcaster.js.map +1 -0
- package/dist/ws/handler.d.ts +11 -0
- package/dist/ws/handler.d.ts.map +1 -0
- package/dist/ws/handler.js +38 -0
- package/dist/ws/handler.js.map +1 -0
- package/dist/ws/index.d.ts +11 -0
- package/dist/ws/index.d.ts.map +1 -0
- package/dist/ws/index.js +11 -0
- package/dist/ws/index.js.map +1 -0
- package/dist/ws/types.d.ts +85 -0
- package/dist/ws/types.d.ts.map +1 -0
- package/dist/ws/types.js +63 -0
- package/dist/ws/types.js.map +1 -0
- package/package.json +40 -0
package/dist/messages.js
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Routes Factory
|
|
3
|
+
*
|
|
4
|
+
* Message creation, search, and thread replies.
|
|
5
|
+
*/
|
|
6
|
+
import { Hono } from 'hono';
|
|
7
|
+
import { createDocument, createMessage, DocumentCategory } from '@stoneforge/core';
|
|
8
|
+
export function createMessageRoutes(services) {
|
|
9
|
+
const { api, inboxService, broadcastInboxEvent } = services;
|
|
10
|
+
const app = new Hono();
|
|
11
|
+
// POST /api/messages - Create a new message
|
|
12
|
+
app.post('/api/messages', async (c) => {
|
|
13
|
+
try {
|
|
14
|
+
const body = await c.req.json();
|
|
15
|
+
// Validate required fields
|
|
16
|
+
if (!body.channelId || typeof body.channelId !== 'string') {
|
|
17
|
+
return c.json({ error: { code: 'VALIDATION_ERROR', message: 'channelId is required' } }, 400);
|
|
18
|
+
}
|
|
19
|
+
if (!body.sender || typeof body.sender !== 'string') {
|
|
20
|
+
return c.json({ error: { code: 'VALIDATION_ERROR', message: 'sender is required' } }, 400);
|
|
21
|
+
}
|
|
22
|
+
if (!body.content || typeof body.content !== 'string') {
|
|
23
|
+
return c.json({ error: { code: 'VALIDATION_ERROR', message: 'content is required' } }, 400);
|
|
24
|
+
}
|
|
25
|
+
// Verify channel exists
|
|
26
|
+
const channel = await api.get(body.channelId);
|
|
27
|
+
if (!channel || channel.type !== 'channel') {
|
|
28
|
+
return c.json({ error: { code: 'NOT_FOUND', message: 'Channel not found' } }, 404);
|
|
29
|
+
}
|
|
30
|
+
// Verify sender entity exists
|
|
31
|
+
const senderEntity = await api.get(body.sender);
|
|
32
|
+
if (!senderEntity || senderEntity.type !== 'entity') {
|
|
33
|
+
return c.json({ error: { code: 'NOT_FOUND', message: 'Sender entity not found' } }, 404);
|
|
34
|
+
}
|
|
35
|
+
// For group channels, verify sender is a member
|
|
36
|
+
const typedChannelCheck = channel;
|
|
37
|
+
if (typedChannelCheck.channelType === 'group') {
|
|
38
|
+
if (!typedChannelCheck.members.includes(body.sender)) {
|
|
39
|
+
return c.json({ error: { code: 'FORBIDDEN', message: 'You must be a member of this channel to send messages' } }, 403);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Create a document for the message content
|
|
43
|
+
const contentDoc = await createDocument({
|
|
44
|
+
contentType: 'text',
|
|
45
|
+
content: body.content,
|
|
46
|
+
createdBy: body.sender,
|
|
47
|
+
category: DocumentCategory.MESSAGE_CONTENT,
|
|
48
|
+
immutable: true,
|
|
49
|
+
});
|
|
50
|
+
const createdDoc = await api.create(contentDoc);
|
|
51
|
+
// Create the message with the content document reference
|
|
52
|
+
const messageInput = {
|
|
53
|
+
channelId: body.channelId,
|
|
54
|
+
sender: body.sender,
|
|
55
|
+
contentRef: createdDoc.id,
|
|
56
|
+
...(body.threadId && { threadId: body.threadId }),
|
|
57
|
+
...(body.tags && { tags: body.tags }),
|
|
58
|
+
};
|
|
59
|
+
const message = await createMessage(messageInput);
|
|
60
|
+
const createdMessage = await api.create(message);
|
|
61
|
+
// Handle attachments if provided
|
|
62
|
+
const attachments = [];
|
|
63
|
+
if (body.attachmentIds && Array.isArray(body.attachmentIds)) {
|
|
64
|
+
for (const docId of body.attachmentIds) {
|
|
65
|
+
// Verify document exists
|
|
66
|
+
const doc = await api.get(docId);
|
|
67
|
+
if (!doc || doc.type !== 'document') {
|
|
68
|
+
return c.json({ error: { code: 'NOT_FOUND', message: `Document ${docId} not found` } }, 404);
|
|
69
|
+
}
|
|
70
|
+
// Create references dependency from message to document
|
|
71
|
+
await api.addDependency({
|
|
72
|
+
blockedId: createdMessage.id,
|
|
73
|
+
blockerId: docId,
|
|
74
|
+
type: 'references',
|
|
75
|
+
actor: body.sender,
|
|
76
|
+
});
|
|
77
|
+
attachments.push(doc);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// TB89: Add inbox items for channel members (except sender)
|
|
81
|
+
const typedChannel = channel;
|
|
82
|
+
const senderId = body.sender;
|
|
83
|
+
const messageId = createdMessage.id;
|
|
84
|
+
const channelIdStr = body.channelId;
|
|
85
|
+
// Track entities that have already received inbox items (to avoid duplicates)
|
|
86
|
+
const notifiedEntities = new Set();
|
|
87
|
+
// For direct channels: notify all members except sender
|
|
88
|
+
if (typedChannel.channelType === 'direct') {
|
|
89
|
+
for (const memberId of typedChannel.members) {
|
|
90
|
+
if (memberId !== senderId && !notifiedEntities.has(memberId)) {
|
|
91
|
+
try {
|
|
92
|
+
inboxService.addToInbox({
|
|
93
|
+
recipientId: memberId,
|
|
94
|
+
messageId: messageId,
|
|
95
|
+
channelId: channelIdStr,
|
|
96
|
+
sourceType: 'direct',
|
|
97
|
+
createdBy: senderId,
|
|
98
|
+
});
|
|
99
|
+
notifiedEntities.add(memberId);
|
|
100
|
+
// Broadcast inbox event for real-time updates (if available)
|
|
101
|
+
if (broadcastInboxEvent) {
|
|
102
|
+
broadcastInboxEvent(`inbox-${memberId}-${messageId}`, memberId, 'created', null, { recipientId: memberId, messageId, channelId: channelIdStr, sourceType: 'direct' }, senderId);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
// Ignore duplicate inbox errors
|
|
107
|
+
if (error.code !== 'ALREADY_EXISTS') {
|
|
108
|
+
console.error(`[stoneforge] Failed to create inbox item for ${memberId}:`, error);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Parse @mentions from message content and add inbox items
|
|
115
|
+
const mentionPattern = /@(el-[a-z0-9]+)/gi;
|
|
116
|
+
const mentions = body.content.match(mentionPattern) || [];
|
|
117
|
+
for (const mention of mentions) {
|
|
118
|
+
// Extract the entity ID from the mention (remove the @ prefix)
|
|
119
|
+
const mentionedId = mention.substring(1);
|
|
120
|
+
// Skip if it's the sender mentioning themselves or already notified
|
|
121
|
+
if (mentionedId === senderId || notifiedEntities.has(mentionedId)) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
// Verify the mentioned entity exists
|
|
125
|
+
try {
|
|
126
|
+
const mentionedEntity = await api.get(mentionedId);
|
|
127
|
+
if (mentionedEntity && mentionedEntity.type === 'entity') {
|
|
128
|
+
inboxService.addToInbox({
|
|
129
|
+
recipientId: mentionedId,
|
|
130
|
+
messageId: messageId,
|
|
131
|
+
channelId: channelIdStr,
|
|
132
|
+
sourceType: 'mention',
|
|
133
|
+
createdBy: senderId,
|
|
134
|
+
});
|
|
135
|
+
notifiedEntities.add(mentionedId);
|
|
136
|
+
// Broadcast inbox event for real-time updates (if available)
|
|
137
|
+
if (broadcastInboxEvent) {
|
|
138
|
+
broadcastInboxEvent(`inbox-${mentionedId}-${messageId}`, mentionedId, 'created', null, { recipientId: mentionedId, messageId, channelId: channelIdStr, sourceType: 'mention' }, senderId);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
// Ignore errors for mentions
|
|
144
|
+
if (error.code !== 'ALREADY_EXISTS') {
|
|
145
|
+
console.error(`[stoneforge] Failed to process mention ${mentionedId}:`, error);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// For thread replies: Notify the parent message sender
|
|
150
|
+
if (body.threadId) {
|
|
151
|
+
try {
|
|
152
|
+
const parentMessage = await api.get(body.threadId);
|
|
153
|
+
if (parentMessage && parentMessage.type === 'message') {
|
|
154
|
+
const parentSender = parentMessage.sender;
|
|
155
|
+
// Notify parent message sender (if not replying to yourself and not already notified)
|
|
156
|
+
if (parentSender !== senderId && !notifiedEntities.has(parentSender)) {
|
|
157
|
+
inboxService.addToInbox({
|
|
158
|
+
recipientId: parentSender,
|
|
159
|
+
messageId: messageId,
|
|
160
|
+
channelId: channelIdStr,
|
|
161
|
+
sourceType: 'thread_reply',
|
|
162
|
+
createdBy: senderId,
|
|
163
|
+
});
|
|
164
|
+
notifiedEntities.add(parentSender);
|
|
165
|
+
// Broadcast inbox event for real-time updates (if available)
|
|
166
|
+
if (broadcastInboxEvent) {
|
|
167
|
+
broadcastInboxEvent(`inbox-${parentSender}-${messageId}`, parentSender, 'created', null, { recipientId: parentSender, messageId, channelId: channelIdStr, sourceType: 'thread_reply' }, senderId);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
// Ignore errors
|
|
174
|
+
if (error.code !== 'ALREADY_EXISTS') {
|
|
175
|
+
console.error(`[stoneforge] Failed to create thread reply inbox item:`, error);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Return the message with content and attachments hydrated
|
|
180
|
+
return c.json({
|
|
181
|
+
...createdMessage,
|
|
182
|
+
_content: body.content,
|
|
183
|
+
_attachments: attachments,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
if (error.code === 'VALIDATION_ERROR') {
|
|
188
|
+
return c.json({ error: { code: 'VALIDATION_ERROR', message: error.message } }, 400);
|
|
189
|
+
}
|
|
190
|
+
if (error.code === 'NOT_FOUND') {
|
|
191
|
+
return c.json({ error: { code: 'NOT_FOUND', message: error.message } }, 404);
|
|
192
|
+
}
|
|
193
|
+
if (error.code === 'MEMBER_REQUIRED') {
|
|
194
|
+
return c.json({ error: { code: 'FORBIDDEN', message: 'Sender must be a channel member' } }, 403);
|
|
195
|
+
}
|
|
196
|
+
console.error('[stoneforge] Failed to create message:', error);
|
|
197
|
+
return c.json({ error: { code: 'INTERNAL_ERROR', message: 'Failed to create message' } }, 500);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* GET /api/messages/search
|
|
202
|
+
* Search messages by content across all channels or within a specific channel (TB103)
|
|
203
|
+
*
|
|
204
|
+
* Query params:
|
|
205
|
+
* - q: Search query (required)
|
|
206
|
+
* - channelId: Optional channel ID to limit search to
|
|
207
|
+
* - limit: Max number of results (default: 20)
|
|
208
|
+
*
|
|
209
|
+
* NOTE: This route must come BEFORE /api/messages/:id/replies to avoid route matching issues
|
|
210
|
+
*/
|
|
211
|
+
app.get('/api/messages/search', async (c) => {
|
|
212
|
+
try {
|
|
213
|
+
const url = new URL(c.req.url);
|
|
214
|
+
const query = url.searchParams.get('q');
|
|
215
|
+
const channelId = url.searchParams.get('channelId');
|
|
216
|
+
const limitParam = url.searchParams.get('limit');
|
|
217
|
+
const limit = limitParam ? parseInt(limitParam, 10) : 20;
|
|
218
|
+
if (!query || query.trim().length === 0) {
|
|
219
|
+
return c.json({ results: [], query: '' });
|
|
220
|
+
}
|
|
221
|
+
const searchQuery = query.trim().toLowerCase();
|
|
222
|
+
// Get all messages (with reasonable limit to avoid performance issues)
|
|
223
|
+
const filter = {
|
|
224
|
+
type: 'message',
|
|
225
|
+
limit: 1000,
|
|
226
|
+
orderBy: 'created_at',
|
|
227
|
+
orderDir: 'desc',
|
|
228
|
+
};
|
|
229
|
+
if (channelId) {
|
|
230
|
+
filter.channelId = channelId;
|
|
231
|
+
}
|
|
232
|
+
const allMessages = await api.list(filter);
|
|
233
|
+
// Filter messages with matching channelId if specified
|
|
234
|
+
let filteredMessages = allMessages;
|
|
235
|
+
if (channelId) {
|
|
236
|
+
filteredMessages = allMessages.filter((msg) => {
|
|
237
|
+
const message = msg;
|
|
238
|
+
return message.channelId === channelId;
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
const results = [];
|
|
242
|
+
for (const msg of filteredMessages) {
|
|
243
|
+
const message = msg;
|
|
244
|
+
// Hydrate content
|
|
245
|
+
let content = '';
|
|
246
|
+
if (message.contentRef) {
|
|
247
|
+
const contentDoc = await api.get(message.contentRef);
|
|
248
|
+
if (contentDoc && contentDoc.type === 'document') {
|
|
249
|
+
content = contentDoc.content || '';
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const contentLower = content.toLowerCase();
|
|
253
|
+
if (contentLower.includes(searchQuery)) {
|
|
254
|
+
// Generate snippet with surrounding context
|
|
255
|
+
const matchIndex = contentLower.indexOf(searchQuery);
|
|
256
|
+
const snippetStart = Math.max(0, matchIndex - 50);
|
|
257
|
+
const snippetEnd = Math.min(content.length, matchIndex + searchQuery.length + 50);
|
|
258
|
+
let snippetText = content.slice(snippetStart, snippetEnd);
|
|
259
|
+
// Add ellipsis if truncated
|
|
260
|
+
if (snippetStart > 0)
|
|
261
|
+
snippetText = '...' + snippetText;
|
|
262
|
+
if (snippetEnd < content.length)
|
|
263
|
+
snippetText = snippetText + '...';
|
|
264
|
+
// Clean up markdown/HTML for display
|
|
265
|
+
snippetText = snippetText
|
|
266
|
+
.replace(/#{1,6}\s*/g, '') // Remove heading markers
|
|
267
|
+
.replace(/\*\*/g, '') // Remove bold markers
|
|
268
|
+
.replace(/\*/g, '') // Remove italic markers
|
|
269
|
+
.replace(/`/g, '') // Remove code markers
|
|
270
|
+
.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') // Remove link syntax
|
|
271
|
+
.replace(/<[^>]+>/g, '') // Remove HTML tags
|
|
272
|
+
.replace(/!\[([^\]]*)\]\([^)]+\)/g, '') // Remove image syntax
|
|
273
|
+
.replace(/\n+/g, ' ') // Replace newlines with spaces
|
|
274
|
+
.trim();
|
|
275
|
+
results.push({
|
|
276
|
+
id: message.id,
|
|
277
|
+
channelId: message.channelId || '',
|
|
278
|
+
sender: message.sender || '',
|
|
279
|
+
content,
|
|
280
|
+
snippet: snippetText,
|
|
281
|
+
createdAt: message.createdAt,
|
|
282
|
+
threadId: message.threadId || null,
|
|
283
|
+
});
|
|
284
|
+
// Stop when we have enough results
|
|
285
|
+
if (results.length >= limit)
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return c.json({ results, query: query.trim() });
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
console.error('[stoneforge] Failed to search messages:', error);
|
|
293
|
+
return c.json({ error: { code: 'INTERNAL_ERROR', message: 'Failed to search messages' } }, 500);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
// GET /api/messages/:id/replies - Get thread replies
|
|
297
|
+
app.get('/api/messages/:id/replies', async (c) => {
|
|
298
|
+
try {
|
|
299
|
+
const id = c.req.param('id');
|
|
300
|
+
const url = new URL(c.req.url);
|
|
301
|
+
const hydrateContent = url.searchParams.get('hydrate.content') === 'true';
|
|
302
|
+
// Verify the parent message exists
|
|
303
|
+
const parentMessage = await api.get(id);
|
|
304
|
+
if (!parentMessage || parentMessage.type !== 'message') {
|
|
305
|
+
return c.json({ error: { code: 'NOT_FOUND', message: 'Message not found' } }, 404);
|
|
306
|
+
}
|
|
307
|
+
// Get all messages that have this message as their threadId
|
|
308
|
+
const filter = {
|
|
309
|
+
type: 'message',
|
|
310
|
+
threadId: id,
|
|
311
|
+
orderBy: 'created_at',
|
|
312
|
+
orderDir: 'asc',
|
|
313
|
+
};
|
|
314
|
+
const replies = await api.list(filter);
|
|
315
|
+
// Optionally hydrate content
|
|
316
|
+
if (hydrateContent) {
|
|
317
|
+
const hydratedReplies = await Promise.all(replies.map(async (msg) => {
|
|
318
|
+
const message = msg;
|
|
319
|
+
if (message.contentRef) {
|
|
320
|
+
const content = await api.get(message.contentRef);
|
|
321
|
+
if (content && content.type === 'document') {
|
|
322
|
+
return { ...msg, _content: content.content };
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return msg;
|
|
326
|
+
}));
|
|
327
|
+
return c.json(hydratedReplies);
|
|
328
|
+
}
|
|
329
|
+
return c.json(replies);
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
console.error('[stoneforge] Failed to get thread replies:', error);
|
|
333
|
+
return c.json({ error: { code: 'INTERNAL_ERROR', message: 'Failed to get thread replies' } }, 500);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
return app;
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGnF,MAAM,UAAU,mBAAmB,CAAC,QAA0C;IAC5E,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,QAAQ,CAAC;IAC5D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,4CAA4C;IAC5C,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAEhC,2BAA2B;YAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;gBAC1D,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;YAChG,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACpD,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,EAAE,G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C;AACb,CAAC"}
|
package/dist/plans.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plans Routes Factory
|
|
3
|
+
*
|
|
4
|
+
* Plan management endpoints for listing, viewing, creating, and updating plans.
|
|
5
|
+
* Includes task association and progress tracking (TB24, TB86, TB121).
|
|
6
|
+
*/
|
|
7
|
+
import { Hono } from 'hono';
|
|
8
|
+
import type { CollaborateServices } from './types.js';
|
|
9
|
+
export declare function createPlanRoutes(services: CollaborateServices): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
10
|
+
//# sourceMappingURL=plans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAY5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,8EAiiB7D"}
|