crbro-memory 2.7.2 → 2.8.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.
@@ -0,0 +1,200 @@
1
+ import type { PendingLang } from '../types'
2
+
3
+ // Every word the mod shows, in one table per language. Nothing user-facing is
4
+ // written anywhere else: a new language is one more entry here.
5
+
6
+ /** A message ends here: the period it may carry already is not doubled. */
7
+ const bare = (reason: string) => reason.trim().replace(/\.+$/, '')
8
+
9
+ export type Strings = {
10
+ /** Short month names for «3 Oct» / «3-oct». */
11
+ months: readonly string[]
12
+ shortDate: (day: number, month: string) => string
13
+ noDate: string
14
+ today: string
15
+ yesterday: string
16
+ daysAgo: (n: number) => string
17
+ monthsAgo: (n: number) => string
18
+
19
+ commandDescription: string
20
+ aliasDescription: string
21
+ commandAnswer: (n: number) => string
22
+ paneTitle: string
23
+
24
+ bandCount: (n: number) => string
25
+ compact: string
26
+ readAll: string
27
+ seeAll: string
28
+ hide: string
29
+
30
+ heading: string
31
+ openCount: (n: number) => string
32
+ fresh: (n: number) => string
33
+ recent: (n: number) => string
34
+ old: (n: number) => string
35
+ /** reason: the engine's or the parser's own message, in its own words. */
36
+ readError: (reason: string) => string
37
+ filterPlaceholder: string
38
+ matches: (shown: number, total: number, query: string) => string
39
+ none: string
40
+ closing: string
41
+ askResolve: string
42
+ askDiscard: string
43
+ yes: string
44
+ no: string
45
+ workOn: string
46
+ done: string
47
+ discard: string
48
+ recentlyClosed: (isOpen: boolean, n: number) => string
49
+ closedOn: (date: string, id: string) => string
50
+ more: (n: number) => string
51
+ paneNoRoom: string
52
+ help: string
53
+ reload: string
54
+ showBand: string
55
+ hideBand: string
56
+ close: string
57
+ fromServer: (server: string) => string
58
+ fromFile: (path: string) => string
59
+
60
+ /** id is '' for an item stored without one (a v1 entry): the wording leaves it out. */
61
+ workPrompt: (id: string, text: string) => string
62
+ cannotFill: string
63
+ stillOpen: (id: string) => string
64
+ resolved: (id: string) => string
65
+ discarded: (id: string) => string
66
+ closeFailed: (reason: string) => string
67
+ noServer: string
68
+ noDetail: string
69
+ noHome: string
70
+ }
71
+
72
+ const en: Strings = {
73
+ months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
74
+ shortDate: (day, month) => `${day} ${month}`,
75
+ noDate: 'no date',
76
+ today: 'today',
77
+ yesterday: 'yesterday',
78
+ daysAgo: n => `${n} d ago`,
79
+ monthsAgo: n => `${n} months ago`,
80
+
81
+ commandDescription: 'CRBRO open items, in full and as cards (and shows the band again)',
82
+ aliasDescription: 'Same as /pending (Spanish name)',
83
+ commandAnswer: n => `CRBRO: ${n} open ${n === 1 ? 'item' : 'items'}.`,
84
+ paneTitle: 'CRBRO open items',
85
+
86
+ bandCount: n => `${n} open ${n === 1 ? 'item' : 'items'}`,
87
+ compact: 'Compact',
88
+ readAll: 'Read in full',
89
+ seeAll: 'See all',
90
+ hide: 'Hide',
91
+
92
+ heading: '◆ CRBRO open items',
93
+ openCount: n => `${n} open`,
94
+ fresh: n => `● ${n} from the last 3 days`,
95
+ recent: n => `● ${n} up to 2 weeks old`,
96
+ old: n => `● ${n} older than 2 weeks`,
97
+ readError: reason => `Could not read the CRBRO brain: ${bare(reason)}. Press Reload once it is available.`,
98
+ filterPlaceholder: 'Filter: a project, a word…',
99
+ matches: (shown, total, query) => `${shown} of ${total} match "${query}"`,
100
+ none: 'No open items in CRBRO.',
101
+ closing: 'Closing in CRBRO…',
102
+ askResolve: 'Mark it as done?',
103
+ askDiscard: 'Discard it without recording it?',
104
+ yes: 'Yes',
105
+ no: 'No',
106
+ workOn: 'Work on this',
107
+ done: 'Done',
108
+ discard: 'Discard',
109
+ recentlyClosed: (isOpen, n) => `${isOpen ? '▾' : '▸'} Recently closed (${n})`,
110
+ closedOn: (date, id) => ['✓ closed' + (date ? ` ${date}` : ''), id].filter(Boolean).join(' · '),
111
+ more: n => `${n} more: filter to narrow the list.`,
112
+ paneNoRoom: 'CRBRO: there is no room for the list here; widen the window.',
113
+ help: '"Done" closes it in CRBRO and keeps it under "recently closed"; "Discard" removes it without recording it.',
114
+ reload: 'Reload',
115
+ showBand: 'Show band',
116
+ hideBand: 'Hide band',
117
+ close: 'Close',
118
+ fromServer: server => `Read from the CRBRO server (${server}).`,
119
+ fromFile: path => `Read from ${path}: the CRBRO server is not reachable in this session.`,
120
+
121
+ workPrompt: (id, text) => `Let's work on this CRBRO open item${id ? ` (${id})` : ''}: ${text}`,
122
+ cannotFill: 'Cannot write in the prompt right now.',
123
+ stillOpen: id => `CRBRO answered, but ${id || 'the item'} is still open.`,
124
+ resolved: id => (id ? `${id} closed in CRBRO.` : 'Closed in CRBRO.'),
125
+ discarded: id => (id ? `${id} discarded in CRBRO.` : 'Discarded in CRBRO.'),
126
+ closeFailed: reason => `CRBRO could not close it: ${reason}`,
127
+ noServer: 'the CRBRO MCP server is not connected in this session',
128
+ noDetail: 'error with no detail',
129
+ noHome: 'cannot find the home folder (HOME/USERPROFILE)',
130
+ }
131
+
132
+ const es: Strings = {
133
+ months: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],
134
+ shortDate: (day, month) => `${day}-${month}`,
135
+ noDate: 'sin fecha',
136
+ today: 'hoy',
137
+ yesterday: 'ayer',
138
+ daysAgo: n => `hace ${n} d`,
139
+ monthsAgo: n => `hace ${n} meses`,
140
+
141
+ commandDescription: 'Pendientes abiertos de CRBRO, completos y en tarjetas (y vuelve a mostrar la banda)',
142
+ aliasDescription: 'Pendientes abiertos de CRBRO (igual que /pending)',
143
+ commandAnswer: n => `CRBRO: ${n} ${n === 1 ? 'pendiente abierto' : 'pendientes abiertos'}.`,
144
+ paneTitle: 'Pendientes CRBRO',
145
+
146
+ bandCount: n => `${n} ${n === 1 ? 'pendiente' : 'pendientes'}`,
147
+ compact: 'Compactar',
148
+ readAll: 'Leer entero',
149
+ seeAll: 'Ver todos',
150
+ hide: 'Ocultar',
151
+
152
+ heading: '◆ Pendientes de CRBRO',
153
+ openCount: n => `${n} ${n === 1 ? 'abierto' : 'abiertos'}`,
154
+ fresh: n => `● ${n} de los últimos 3 días`,
155
+ recent: n => `● ${n} de hasta 2 semanas`,
156
+ old: n => `● ${n} con más de 2 semanas`,
157
+ readError: reason => `No he podido leer el cerebro de CRBRO: ${bare(reason)}. Pulsa Recargar cuando esté disponible.`,
158
+ filterPlaceholder: 'Filtrar: un proyecto, una palabra…',
159
+ matches: (shown, total, query) => `${shown} de ${total} coinciden con «${query}»`,
160
+ none: 'No hay pendientes abiertos en CRBRO.',
161
+ closing: 'Cerrando en CRBRO…',
162
+ askResolve: '¿Lo marco como hecho?',
163
+ askDiscard: '¿Lo descarto sin registrarlo?',
164
+ yes: 'Sí',
165
+ no: 'No',
166
+ workOn: 'Trabajar en esto',
167
+ done: 'Hecho',
168
+ discard: 'Descartar',
169
+ recentlyClosed: (isOpen, n) => `${isOpen ? '▾' : '▸'} Cerrados hace poco (${n})`,
170
+ closedOn: (date, id) => [date ? `✓ cerrado el ${date}` : '✓ cerrado', id].filter(Boolean).join(' · '),
171
+ more: n => `${n} más: filtra para acotar la lista.`,
172
+ paneNoRoom: 'CRBRO: aquí no hay sitio para la lista; ensancha la ventana.',
173
+ help: '«Hecho» lo cierra en CRBRO y queda en «cerrados hace poco»; «Descartar» lo quita sin registrarlo.',
174
+ reload: 'Recargar',
175
+ showBand: 'Mostrar banda',
176
+ hideBand: 'Ocultar banda',
177
+ close: 'Cerrar',
178
+ fromServer: server => `Leído del servidor de CRBRO (${server}).`,
179
+ fromFile: path => `Leído de ${path}: el servidor de CRBRO no está accesible en esta sesión.`,
180
+
181
+ workPrompt: (id, text) => `Vamos con este pendiente de CRBRO${id ? ` (${id})` : ''}: ${text}`,
182
+ cannotFill: 'Ahora mismo no puedo escribir en el prompt.',
183
+ stillOpen: id => `CRBRO respondió, pero ${id || 'el pendiente'} sigue abierto.`,
184
+ resolved: id => (id ? `${id} cerrado en CRBRO.` : 'Cerrado en CRBRO.'),
185
+ discarded: id => (id ? `${id} descartado en CRBRO.` : 'Descartado en CRBRO.'),
186
+ closeFailed: reason => `CRBRO no ha podido cerrarlo: ${reason}`,
187
+ noServer: 'el servidor MCP de CRBRO no está conectado en esta sesión',
188
+ noDetail: 'error sin detalle',
189
+ noHome: 'no encuentro la carpeta del usuario (HOME/USERPROFILE)',
190
+ }
191
+
192
+ export const STRINGS: Record<PendingLang, Strings> = { en, es }
193
+
194
+ /**
195
+ * The language a locale string asks for: Spanish for `es`, `es_ES.UTF-8`,
196
+ * `es-419`…; English for anything else, `C` and `POSIX` included.
197
+ */
198
+ export function langOf(locale: string): PendingLang {
199
+ return /^es(?:$|[-_.@])/i.test(locale.trim()) ? 'es' : 'en'
200
+ }
@@ -0,0 +1,27 @@
1
+ export type PendingItem = { id: string; text: string; added: string }
2
+ export type PendingClosed = PendingItem & { closed: string }
3
+ export type PendingAction = 'resolve' | 'discard'
4
+ export type PendingLang = 'en' | 'es'
5
+ /** Where the list came from: the CRBRO MCP server, or the brain file read directly. */
6
+ export type PendingSource = { kind: 'mcp'; server: string } | { kind: 'file'; path: string }
7
+
8
+ declare module 'claude-code' {
9
+ interface PluginState {
10
+ 'crbro-pending': {
11
+ items: PendingItem[]
12
+ closed: PendingClosed[]
13
+ index: number
14
+ isHidden: boolean
15
+ isCompact: boolean
16
+ showClosed: boolean
17
+ filter: string
18
+ confirming: { id: string; action: PendingAction } | null
19
+ busy: string | null
20
+ error: string | null
21
+ lang: PendingLang
22
+ /** The CRBRO MCP server's name, as `$.tool.list()` spells it, once found. */
23
+ server: string | null
24
+ source: PendingSource | null
25
+ }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crbro-memory",
3
- "version": "2.7.2",
3
+ "version": "2.8.0",
4
4
  "mcpName": "io.github.Octonove/crbro-memory",
5
5
  "description": "CRBRO — Persistent neural memory for AI. A biological file-based MCP server that gives your AI long-term memory across sessions.",
6
6
  "main": "dist/index.js",
@@ -46,6 +46,7 @@
46
46
  "dist/",
47
47
  "bin/",
48
48
  "hooks/",
49
+ "mods/",
49
50
  "README.md",
50
51
  "SECURITY.md",
51
52
  "LICENSE"