@imenam/mcp-organizer 0.0.0-stage → 1.0.2

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.
Files changed (165) hide show
  1. package/README.md +548 -3
  2. package/dist/shared/logic/first-account.d.ts +13 -0
  3. package/dist/shared/logic/first-account.js +15 -0
  4. package/dist/shared/logic/labels.d.ts +5 -0
  5. package/dist/shared/logic/labels.js +17 -0
  6. package/dist/shared/logic/positions.d.ts +9 -0
  7. package/dist/shared/logic/positions.js +19 -0
  8. package/dist/shared/logic/spaces.d.ts +13 -0
  9. package/dist/shared/logic/spaces.js +48 -0
  10. package/dist/shared/logic/test-summary.d.ts +28 -0
  11. package/dist/shared/logic/test-summary.js +35 -0
  12. package/dist/shared/schemas/agent-api.schema.d.ts +269 -0
  13. package/dist/shared/schemas/agent-api.schema.js +97 -0
  14. package/dist/shared/schemas/agent-tools.schema.d.ts +818 -0
  15. package/dist/shared/schemas/agent-tools.schema.js +198 -0
  16. package/dist/shared/schemas/api.schema.d.ts +249 -0
  17. package/dist/shared/schemas/api.schema.js +116 -0
  18. package/dist/shared/schemas/entities.schema.d.ts +472 -0
  19. package/dist/shared/schemas/entities.schema.js +262 -0
  20. package/dist/shared/schemas/enums.schema.d.ts +135 -0
  21. package/dist/shared/schemas/enums.schema.js +58 -0
  22. package/dist/shared/schemas/gui-api.schema.d.ts +53 -0
  23. package/dist/shared/schemas/gui-api.schema.js +20 -0
  24. package/dist/shared/schemas/ideas-api.schema.d.ts +81 -0
  25. package/dist/shared/schemas/ideas-api.schema.js +40 -0
  26. package/dist/shared/schemas/notifications-api.schema.d.ts +87 -0
  27. package/dist/shared/schemas/notifications-api.schema.js +58 -0
  28. package/dist/shared/schemas/tasks-api.schema.d.ts +675 -0
  29. package/dist/shared/schemas/tasks-api.schema.js +225 -0
  30. package/dist/shared/schemas/tokens-api.schema.d.ts +106 -0
  31. package/dist/shared/schemas/tokens-api.schema.js +42 -0
  32. package/dist/shared/schemas/transcription-api.schema.d.ts +15 -0
  33. package/dist/shared/schemas/transcription-api.schema.js +12 -0
  34. package/dist/src/agent-api/checklist.d.ts +3 -0
  35. package/dist/src/agent-api/checklist.js +127 -0
  36. package/dist/src/agent-api/ideas.d.ts +3 -0
  37. package/dist/src/agent-api/ideas.js +93 -0
  38. package/dist/src/agent-api/notifications.d.ts +16 -0
  39. package/dist/src/agent-api/notifications.js +91 -0
  40. package/dist/src/agent-api/requests.d.ts +3 -0
  41. package/dist/src/agent-api/requests.js +60 -0
  42. package/dist/src/agent-api/router.d.ts +3 -0
  43. package/dist/src/agent-api/router.js +41 -0
  44. package/dist/src/agent-api/tasks.d.ts +2 -0
  45. package/dist/src/agent-api/tasks.js +290 -0
  46. package/dist/src/agent-api/types.d.ts +41 -0
  47. package/dist/src/agent-api/types.js +14 -0
  48. package/dist/src/cli/backup.d.ts +12 -0
  49. package/dist/src/cli/backup.js +126 -0
  50. package/dist/src/cli/prompt.d.ts +7 -0
  51. package/dist/src/cli/prompt.js +40 -0
  52. package/dist/src/cli/set-user.d.ts +2 -0
  53. package/dist/src/cli/set-user.js +114 -0
  54. package/dist/src/cli/setup-mcp.d.ts +10 -0
  55. package/dist/src/cli/setup-mcp.js +110 -0
  56. package/dist/src/cli/setup.d.ts +39 -0
  57. package/dist/src/cli/setup.js +626 -0
  58. package/dist/src/cli/watch.d.ts +4 -0
  59. package/dist/src/cli/watch.js +62 -0
  60. package/dist/src/core/accounts.d.ts +129 -0
  61. package/dist/src/core/accounts.js +284 -0
  62. package/dist/src/core/agent-tokens.d.ts +31 -0
  63. package/dist/src/core/agent-tokens.js +120 -0
  64. package/dist/src/core/agent.d.ts +71 -0
  65. package/dist/src/core/agent.js +358 -0
  66. package/dist/src/core/attachments.d.ts +21 -0
  67. package/dist/src/core/attachments.js +44 -0
  68. package/dist/src/core/data-dir.d.ts +5 -0
  69. package/dist/src/core/data-dir.js +11 -0
  70. package/dist/src/core/db.d.ts +13 -0
  71. package/dist/src/core/db.js +38 -0
  72. package/dist/src/core/env-file.d.ts +11 -0
  73. package/dist/src/core/env-file.js +36 -0
  74. package/dist/src/core/errors.d.ts +24 -0
  75. package/dist/src/core/errors.js +42 -0
  76. package/dist/src/core/history.d.ts +34 -0
  77. package/dist/src/core/history.js +279 -0
  78. package/dist/src/core/ideas.d.ts +16 -0
  79. package/dist/src/core/ideas.js +100 -0
  80. package/dist/src/core/ids.d.ts +2 -0
  81. package/dist/src/core/ids.js +5 -0
  82. package/dist/src/core/log-dir.d.ts +2 -0
  83. package/dist/src/core/log-dir.js +9 -0
  84. package/dist/src/core/logger.d.ts +14 -0
  85. package/dist/src/core/logger.js +37 -0
  86. package/dist/src/core/mail.d.ts +43 -0
  87. package/dist/src/core/mail.js +44 -0
  88. package/dist/src/core/mcp-entry.d.ts +20 -0
  89. package/dist/src/core/mcp-entry.js +15 -0
  90. package/dist/src/core/migrations.d.ts +18 -0
  91. package/dist/src/core/migrations.js +404 -0
  92. package/dist/src/core/native-sqlite.d.ts +2 -0
  93. package/dist/src/core/native-sqlite.js +23 -0
  94. package/dist/src/core/notifications.d.ts +46 -0
  95. package/dist/src/core/notifications.js +173 -0
  96. package/dist/src/core/project-root.d.ts +2 -0
  97. package/dist/src/core/project-root.js +13 -0
  98. package/dist/src/core/requests.d.ts +50 -0
  99. package/dist/src/core/requests.js +240 -0
  100. package/dist/src/core/snapshots.d.ts +32 -0
  101. package/dist/src/core/snapshots.js +35 -0
  102. package/dist/src/core/spaces.d.ts +66 -0
  103. package/dist/src/core/spaces.js +252 -0
  104. package/dist/src/core/store.d.ts +577 -0
  105. package/dist/src/core/store.js +2119 -0
  106. package/dist/src/core/task-history.d.ts +7 -0
  107. package/dist/src/core/task-history.js +41 -0
  108. package/dist/src/core/tasks.d.ts +58 -0
  109. package/dist/src/core/tasks.js +389 -0
  110. package/dist/src/core/test-tasks.d.ts +19 -0
  111. package/dist/src/core/test-tasks.js +135 -0
  112. package/dist/src/core/transcription.d.ts +45 -0
  113. package/dist/src/core/transcription.js +92 -0
  114. package/dist/src/core/watchers.d.ts +30 -0
  115. package/dist/src/core/watchers.js +50 -0
  116. package/dist/src/deploy/env-render.d.ts +26 -0
  117. package/dist/src/deploy/env-render.js +98 -0
  118. package/dist/src/deploy/templates.d.ts +38 -0
  119. package/dist/src/deploy/templates.js +130 -0
  120. package/dist/src/gui-api.d.ts +37 -0
  121. package/dist/src/gui-api.js +383 -0
  122. package/dist/src/index.d.ts +2 -0
  123. package/dist/src/index.js +110 -0
  124. package/dist/src/mcp/client.d.ts +38 -0
  125. package/dist/src/mcp/client.js +106 -0
  126. package/dist/src/mcp/notifications.d.ts +13 -0
  127. package/dist/src/mcp/notifications.js +54 -0
  128. package/dist/src/mcp/start.d.ts +14 -0
  129. package/dist/src/mcp/start.js +123 -0
  130. package/dist/src/mcp/tools.d.ts +46 -0
  131. package/dist/src/mcp/tools.js +348 -0
  132. package/dist/src/mcp/watch-handoff.d.ts +35 -0
  133. package/dist/src/mcp/watch-handoff.js +91 -0
  134. package/dist/src/server/app.d.ts +25 -0
  135. package/dist/src/server/app.js +305 -0
  136. package/dist/src/server/config.d.ts +23 -0
  137. package/dist/src/server/config.js +75 -0
  138. package/dist/src/server/limits.d.ts +2 -0
  139. package/dist/src/server/limits.js +4 -0
  140. package/dist/src/server/login-limiter.d.ts +36 -0
  141. package/dist/src/server/login-limiter.js +81 -0
  142. package/dist/src/server/start.d.ts +5 -0
  143. package/dist/src/server/start.js +88 -0
  144. package/dist/src/version.d.ts +1 -0
  145. package/dist/src/version.js +16 -0
  146. package/gui/dist/assets/index-BVN0agCc.css +1 -0
  147. package/gui/dist/assets/index-DI1_kr81.js +70 -0
  148. package/gui/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  149. package/gui/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  150. package/gui/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  151. package/gui/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  152. package/gui/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  153. package/gui/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  154. package/gui/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  155. package/gui/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  156. package/gui/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  157. package/gui/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  158. package/gui/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  159. package/gui/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  160. package/gui/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  161. package/gui/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  162. package/gui/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  163. package/gui/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  164. package/gui/dist/index.html +13 -0
  165. package/package.json +66 -4
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ /** Corps des requêtes et des réponses des notifications et des paramètres de la GUI. */
3
+ /** Nombre de notifications renvoyées par défaut, et au plus, par page. */
4
+ export declare const NOTIFICATIONS_PAGE_SIZE = 20;
5
+ export declare const MAX_NOTIFICATIONS_PAGE_SIZE = 50;
6
+ /** Notification telle que l'affiche le menu de la cloche. */
7
+ export declare const NotificationViewSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ type: z.ZodEnum<{
10
+ assigned: "assigned";
11
+ comment: "comment";
12
+ }>;
13
+ taskId: z.ZodString;
14
+ taskKey: z.ZodString;
15
+ taskTitle: z.ZodString;
16
+ actorType: z.ZodEnum<{
17
+ agent: "agent";
18
+ user: "user";
19
+ }>;
20
+ actorId: z.ZodNullable<z.ZodString>;
21
+ actorName: z.ZodNullable<z.ZodString>;
22
+ commentExcerpt: z.ZodNullable<z.ZodString>;
23
+ createdAt: z.ZodISODateTime;
24
+ readAt: z.ZodNullable<z.ZodISODateTime>;
25
+ emailedAt: z.ZodNullable<z.ZodISODateTime>;
26
+ emailError: z.ZodNullable<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ export type NotificationView = z.infer<typeof NotificationViewSchema>;
29
+ /** Page de notifications (non lues d'abord) et nombre total de non lues. */
30
+ export declare const NotificationListResponseSchema: z.ZodObject<{
31
+ notifications: z.ZodArray<z.ZodObject<{
32
+ id: z.ZodString;
33
+ type: z.ZodEnum<{
34
+ assigned: "assigned";
35
+ comment: "comment";
36
+ }>;
37
+ taskId: z.ZodString;
38
+ taskKey: z.ZodString;
39
+ taskTitle: z.ZodString;
40
+ actorType: z.ZodEnum<{
41
+ agent: "agent";
42
+ user: "user";
43
+ }>;
44
+ actorId: z.ZodNullable<z.ZodString>;
45
+ actorName: z.ZodNullable<z.ZodString>;
46
+ commentExcerpt: z.ZodNullable<z.ZodString>;
47
+ createdAt: z.ZodISODateTime;
48
+ readAt: z.ZodNullable<z.ZodISODateTime>;
49
+ emailedAt: z.ZodNullable<z.ZodISODateTime>;
50
+ emailError: z.ZodNullable<z.ZodString>;
51
+ }, z.core.$strip>>;
52
+ unreadCount: z.ZodNumber;
53
+ hasMore: z.ZodBoolean;
54
+ }, z.core.$strip>;
55
+ export type NotificationListResponse = z.infer<typeof NotificationListResponseSchema>;
56
+ export declare const NotificationListQuerySchema: z.ZodObject<{
57
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
58
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
59
+ }, z.core.$strip>;
60
+ export type NotificationListQuery = z.infer<typeof NotificationListQuerySchema>;
61
+ export declare const UnreadCountResponseSchema: z.ZodObject<{
62
+ unreadCount: z.ZodNumber;
63
+ }, z.core.$strip>;
64
+ export type UnreadCountResponse = z.infer<typeof UnreadCountResponseSchema>;
65
+ /** Préférences de l'utilisateur, disponibilité de l'e-mail et de la dictée. */
66
+ export declare const SettingsResponseSchema: z.ZodObject<{
67
+ notifyAssignApp: z.ZodBoolean;
68
+ notifyAssignEmail: z.ZodBoolean;
69
+ notifyCommentApp: z.ZodBoolean;
70
+ notifyCommentEmail: z.ZodBoolean;
71
+ email: z.ZodObject<{
72
+ enabled: z.ZodBoolean;
73
+ reason: z.ZodNullable<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ transcription: z.ZodObject<{
76
+ enabled: z.ZodBoolean;
77
+ reason: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ }, z.core.$strip>;
80
+ export type SettingsResponse = z.infer<typeof SettingsResponseSchema>;
81
+ export declare const UpdateSettingsRequestSchema: z.ZodObject<{
82
+ notifyAssignApp: z.ZodOptional<z.ZodBoolean>;
83
+ notifyAssignEmail: z.ZodOptional<z.ZodBoolean>;
84
+ notifyCommentApp: z.ZodOptional<z.ZodBoolean>;
85
+ notifyCommentEmail: z.ZodOptional<z.ZodBoolean>;
86
+ }, z.core.$strict>;
87
+ export type UpdateSettingsRequest = z.infer<typeof UpdateSettingsRequestSchema>;
@@ -0,0 +1,58 @@
1
+ import { z } from "zod";
2
+ import { ActorTypeSchema, NotificationTypeSchema } from "./enums.schema.js";
3
+ import { IdSchema, TimestampSchema } from "./entities.schema.js";
4
+ /** Corps des requêtes et des réponses des notifications et des paramètres de la GUI. */
5
+ /** Nombre de notifications renvoyées par défaut, et au plus, par page. */
6
+ export const NOTIFICATIONS_PAGE_SIZE = 20;
7
+ export const MAX_NOTIFICATIONS_PAGE_SIZE = 50;
8
+ /** Notification telle que l'affiche le menu de la cloche. */
9
+ export const NotificationViewSchema = z.object({
10
+ id: IdSchema,
11
+ type: NotificationTypeSchema,
12
+ taskId: IdSchema,
13
+ /** Identifiant lisible de la tâche : `ORG-41`. */
14
+ taskKey: z.string(),
15
+ taskTitle: z.string(),
16
+ actorType: ActorTypeSchema,
17
+ actorId: IdSchema.nullable(),
18
+ /** Nom affiché de l'utilisateur à l'origine de la notification ; null pour l'agent. */
19
+ actorName: z.string().nullable(),
20
+ /** Première ligne du commentaire, abrégée. */
21
+ commentExcerpt: z.string().nullable(),
22
+ createdAt: TimestampSchema,
23
+ readAt: TimestampSchema.nullable(),
24
+ emailedAt: TimestampSchema.nullable(),
25
+ /** Raison de l'échec de l'envoi de l'e-mail. */
26
+ emailError: z.string().nullable(),
27
+ });
28
+ /** Page de notifications (non lues d'abord) et nombre total de non lues. */
29
+ export const NotificationListResponseSchema = z.object({
30
+ notifications: z.array(NotificationViewSchema),
31
+ unreadCount: z.number().int().min(0),
32
+ hasMore: z.boolean(),
33
+ });
34
+ export const NotificationListQuerySchema = z.object({
35
+ limit: z.coerce.number().int().min(1).max(MAX_NOTIFICATIONS_PAGE_SIZE).default(NOTIFICATIONS_PAGE_SIZE),
36
+ offset: z.coerce.number().int().min(0).default(0),
37
+ });
38
+ export const UnreadCountResponseSchema = z.object({ unreadCount: z.number().int().min(0) });
39
+ /** Préférences de l'utilisateur, disponibilité de l'e-mail et de la dictée. */
40
+ export const SettingsResponseSchema = z.object({
41
+ notifyAssignApp: z.boolean(),
42
+ notifyAssignEmail: z.boolean(),
43
+ notifyCommentApp: z.boolean(),
44
+ notifyCommentEmail: z.boolean(),
45
+ /** Envoi des e-mails de notification : `reason` dit pourquoi il n'a pas lieu. */
46
+ email: z.object({ enabled: z.boolean(), reason: z.string().nullable() }),
47
+ /** Dictée vocale : `reason` dit pourquoi elle est indisponible. */
48
+ transcription: z.object({ enabled: z.boolean(), reason: z.string().nullable() }),
49
+ });
50
+ export const UpdateSettingsRequestSchema = z
51
+ .object({
52
+ notifyAssignApp: z.boolean().optional(),
53
+ notifyAssignEmail: z.boolean().optional(),
54
+ notifyCommentApp: z.boolean().optional(),
55
+ notifyCommentEmail: z.boolean().optional(),
56
+ })
57
+ .strict()
58
+ .refine((patch) => Object.values(patch).some((value) => value !== undefined), "Aucune modification demandée.");