@memnexus-ai/cli 1.7.232 → 1.7.234
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/commands/memories.d.ts.map +1 -1
- package/dist/commands/memories.js +33 -8
- package/dist/commands/memories.js.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-help.d.ts.map +1 -1
- package/dist/lib/agent-help.js +6 -0
- package/dist/lib/agent-help.js.map +1 -1
- package/dist/lib/cli-parsing.d.ts +45 -0
- package/dist/lib/cli-parsing.d.ts.map +1 -0
- package/dist/lib/cli-parsing.js +82 -0
- package/dist/lib/cli-parsing.js.map +1 -0
- package/dist/lib/commit-context/privacy-filter.d.ts.map +1 -1
- package/dist/lib/commit-context/privacy-filter.js +37 -0
- package/dist/lib/commit-context/privacy-filter.js.map +1 -1
- package/dist/lib/content-input.d.ts +87 -0
- package/dist/lib/content-input.d.ts.map +1 -0
- package/dist/lib/content-input.js +320 -0
- package/dist/lib/content-input.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CONTENT_FILE_STDIN = exports.MAX_CONTENT_FILE_BYTES = exports.MAX_MEMORY_CONTENT_LENGTH = void 0;
|
|
37
|
+
exports.readStreamBounded = readStreamBounded;
|
|
38
|
+
exports.resolveContentInput = resolveContentInput;
|
|
39
|
+
/**
|
|
40
|
+
* Shell-safe content input for `mx memories create` / `mx memories update`.
|
|
41
|
+
*
|
|
42
|
+
* Why this exists: agent-authored prose passed as `--content "..."` in a
|
|
43
|
+
* double-quoted shell argument has backticks and `$(...)` expanded by the shell
|
|
44
|
+
* BEFORE `mx` is invoked, so the stored memory silently contains command output
|
|
45
|
+
* instead of the author's text. The CLI never sees the original bytes, so it
|
|
46
|
+
* cannot detect or repair the damage. `--content-file <path>` gives callers an
|
|
47
|
+
* input path the shell never parses: the file (or stdin) is read verbatim.
|
|
48
|
+
*
|
|
49
|
+
* Guarantees:
|
|
50
|
+
* - Byte-exact: the decoded UTF-8 content is used as-is. No trimming, no
|
|
51
|
+
* newline normalization, no interpolation of any kind.
|
|
52
|
+
* - Fail-loud: a missing, unreadable, empty, oversized, non-regular, or blank
|
|
53
|
+
* path is a non-zero exit with the path named. Never a silent success, and
|
|
54
|
+
* never a silent hang.
|
|
55
|
+
* - Fail-early: the 50,000-character server cap is enforced before the network
|
|
56
|
+
* call, so an oversized body reports a clear local error rather than a 413.
|
|
57
|
+
*
|
|
58
|
+
* Stdin is read through the stream API and completes only on the stream's `end`
|
|
59
|
+
* event, because a pipe delivers its data in as many writes as the producer
|
|
60
|
+
* chooses. An earlier revision read fd 0 in a synchronous loop and stopped on
|
|
61
|
+
* EAGAIN, which returned a prefix of the input as though it were the whole
|
|
62
|
+
* input whenever the producer paused between writes.
|
|
63
|
+
*
|
|
64
|
+
* Reads are bounded at every step. Neither the size check nor the read may be
|
|
65
|
+
* skipped by pointing the flag at something that is not a regular file: an
|
|
66
|
+
* earlier revision checked only `st_size`, which is 0 for FIFOs and character
|
|
67
|
+
* devices, so `--content-file <fifo>` blocked forever and `--content-file
|
|
68
|
+
* /dev/zero` allocated until the heap died. Both are now rejected before a
|
|
69
|
+
* single byte is read, and the read itself is chunk-bounded as a backstop
|
|
70
|
+
* against a file that grows after it is measured.
|
|
71
|
+
*/
|
|
72
|
+
const fs = __importStar(require("fs"));
|
|
73
|
+
const path = __importStar(require("path"));
|
|
74
|
+
const errors_1 = require("./errors");
|
|
75
|
+
/**
|
|
76
|
+
* Maximum memory content length, in JavaScript String.length units (UTF-16 code
|
|
77
|
+
* units) — NOT bytes. Mirrors MAX_NAMED_MEMORY_CONTENT_LENGTH in
|
|
78
|
+
* core-api/src/schemas/memory.schema.ts, which is enforced by Zod `.max()` on
|
|
79
|
+
* every server-side content write path. Enforced locally so an oversized file
|
|
80
|
+
* fails before the request instead of returning a 413. The server still
|
|
81
|
+
* enforces its own limit — this is a usability guard, not a trust boundary.
|
|
82
|
+
*/
|
|
83
|
+
exports.MAX_MEMORY_CONTENT_LENGTH = 50000;
|
|
84
|
+
/**
|
|
85
|
+
* Byte ceiling on the file/stdin read. 50,000 characters is at most 200,000
|
|
86
|
+
* UTF-8 bytes, so 1 MB leaves generous headroom while bounding memory (CWE-400).
|
|
87
|
+
* Applied three ways: to the stat size of a regular file, to the running total
|
|
88
|
+
* of the chunked read, and to stdin. Mirrors BATCH_CREATE_MAX_LINE_BYTES.
|
|
89
|
+
*/
|
|
90
|
+
exports.MAX_CONTENT_FILE_BYTES = 1024 * 1024;
|
|
91
|
+
/** Chunk size for the bounded read. */
|
|
92
|
+
const READ_CHUNK_BYTES = 64 * 1024;
|
|
93
|
+
/** Sentinel path meaning "read stdin". */
|
|
94
|
+
exports.CONTENT_FILE_STDIN = '-';
|
|
95
|
+
/**
|
|
96
|
+
* Read a whole REGULAR-FILE descriptor with a hard byte ceiling, in chunks.
|
|
97
|
+
*
|
|
98
|
+
* Only ever called on a descriptor already asserted to be a regular file, which
|
|
99
|
+
* is why a short read here means end-of-file and nothing else. The ceiling is
|
|
100
|
+
* enforced on the running total, so a file that grows after it was measured
|
|
101
|
+
* still cannot exceed it.
|
|
102
|
+
*
|
|
103
|
+
* No read error is swallowed. An earlier revision treated EAGAIN as
|
|
104
|
+
* end-of-input, which is only true on a blocking descriptor: on a non-blocking
|
|
105
|
+
* one it means "no bytes available right now, the writer has not closed", and
|
|
106
|
+
* returning at that point yields a prefix of the input as though it were all of
|
|
107
|
+
* it. Stdin — the descriptor that is actually non-blocking — no longer goes
|
|
108
|
+
* through this function at all; see readStreamBounded.
|
|
109
|
+
*/
|
|
110
|
+
function readFdBounded(fd, maxBytes, label) {
|
|
111
|
+
const chunks = [];
|
|
112
|
+
const buf = Buffer.allocUnsafe(READ_CHUNK_BYTES);
|
|
113
|
+
let total = 0;
|
|
114
|
+
for (;;) {
|
|
115
|
+
let n;
|
|
116
|
+
try {
|
|
117
|
+
n = fs.readSync(fd, buf, 0, buf.length, null);
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
throw (0, errors_1.validationError)(`${label}: read failed (${err?.code || err?.message}).`);
|
|
121
|
+
}
|
|
122
|
+
if (n === 0)
|
|
123
|
+
break;
|
|
124
|
+
total += n;
|
|
125
|
+
if (total > maxBytes) {
|
|
126
|
+
throw (0, errors_1.validationError)(`${label}: input exceeds the ${maxBytes}-byte limit. Nothing was sent.`);
|
|
127
|
+
}
|
|
128
|
+
chunks.push(Buffer.from(buf.subarray(0, n)));
|
|
129
|
+
}
|
|
130
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Read a readable stream to completion with a hard byte ceiling.
|
|
134
|
+
*
|
|
135
|
+
* This is how stdin is read. A pipe delivers its data in as many writes as the
|
|
136
|
+
* producer chooses — a script writing line by line, `jq`, `git log`, one `mx`
|
|
137
|
+
* piped into another — and the only correct end-of-input signal is the stream's
|
|
138
|
+
* own `end` event. A synchronous read loop over fd 0 cannot see that: fd 0 is
|
|
139
|
+
* non-blocking in the shipped binary (libuv attaches a Pipe handle with
|
|
140
|
+
* O_NONBLOCK as soon as anything touches `process.stdin`, which `chalk` does
|
|
141
|
+
* transitively), so a gap between two writes surfaces as EAGAIN and any
|
|
142
|
+
* treatment of EAGAIN as EOF truncates the input silently.
|
|
143
|
+
*
|
|
144
|
+
* Bytes are accumulated as Buffers and decoded once at the end, so a multi-byte
|
|
145
|
+
* UTF-8 sequence split across two chunks is not corrupted.
|
|
146
|
+
*
|
|
147
|
+
* A TTY returns '' immediately rather than waiting for input that is not
|
|
148
|
+
* coming: the caller reports that as the empty-content error, so
|
|
149
|
+
* `mx ... --content-file -` at an interactive prompt fails fast instead of
|
|
150
|
+
* hanging.
|
|
151
|
+
*/
|
|
152
|
+
function readStreamBounded(stream, maxBytes, label) {
|
|
153
|
+
if (stream.isTTY)
|
|
154
|
+
return Promise.resolve('');
|
|
155
|
+
return new Promise((resolve, reject) => {
|
|
156
|
+
const chunks = [];
|
|
157
|
+
let total = 0;
|
|
158
|
+
let settled = false;
|
|
159
|
+
const settle = (fn) => {
|
|
160
|
+
if (settled)
|
|
161
|
+
return;
|
|
162
|
+
settled = true;
|
|
163
|
+
fn();
|
|
164
|
+
};
|
|
165
|
+
stream.on('data', (chunk) => {
|
|
166
|
+
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
167
|
+
total += buf.length;
|
|
168
|
+
if (total > maxBytes) {
|
|
169
|
+
settle(() => {
|
|
170
|
+
// Stop draining rather than keep buffering a runaway producer.
|
|
171
|
+
stream.destroy?.();
|
|
172
|
+
reject((0, errors_1.validationError)(`${label}: input exceeds the ${maxBytes}-byte limit. Nothing was sent.`));
|
|
173
|
+
});
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
chunks.push(buf);
|
|
177
|
+
});
|
|
178
|
+
// `end` is the ONLY success signal. Anything earlier is a partial read.
|
|
179
|
+
stream.on('end', () => settle(() => resolve(Buffer.concat(chunks).toString('utf8'))));
|
|
180
|
+
stream.on('error', (err) => settle(() => reject((0, errors_1.validationError)(`${label}: read failed (${err?.code || err?.message}).`))));
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function readStdin() {
|
|
184
|
+
return readStreamBounded(process.stdin, exports.MAX_CONTENT_FILE_BYTES, '--content-file -');
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Read the content a create/update should send.
|
|
188
|
+
*
|
|
189
|
+
* Returns `undefined` only when NEITHER flag was supplied (the caller decides
|
|
190
|
+
* whether that is an error, an interactive prompt, or a no-op update). A flag
|
|
191
|
+
* that is present but carries an empty value is an error, never a silent
|
|
192
|
+
* `undefined` — `--content-file "$BODY_FILE"` with the variable unset is
|
|
193
|
+
* exactly the shell accident this flag exists to defend against, and on
|
|
194
|
+
* `update` a silent `undefined` reports success while the body stays stale.
|
|
195
|
+
*
|
|
196
|
+
* Throws a CLIError — which `handleError` turns into exit 2 — for every failure
|
|
197
|
+
* mode below.
|
|
198
|
+
*
|
|
199
|
+
* The path is used only as a filesystem path: it is resolved with
|
|
200
|
+
* `path.resolve` and passed to `fs.openSync`. It is never interpolated into a
|
|
201
|
+
* shell command and no process is spawned, so a path containing shell
|
|
202
|
+
* metacharacters is inert. Reads run with the invoking user's privileges and no
|
|
203
|
+
* path is privileged by the CLI, so this grants no read the caller did not
|
|
204
|
+
* already have; symlinks are followed deliberately (pointing at a symlink to
|
|
205
|
+
* your own note is a legitimate use, and refusing them closes nothing, since
|
|
206
|
+
* the caller could read the target directly).
|
|
207
|
+
*/
|
|
208
|
+
async function resolveContentInput(options, deps = {}) {
|
|
209
|
+
const hasContent = typeof options.content === 'string';
|
|
210
|
+
// Presence, not usability: an empty --content-file value is a present flag
|
|
211
|
+
// with a bad value and must be reported, not treated as absent.
|
|
212
|
+
const hasFile = typeof options.contentFile === 'string';
|
|
213
|
+
if (hasContent && hasFile) {
|
|
214
|
+
throw (0, errors_1.validationError)('Cannot use --content and --content-file together. Pass exactly one.\n' +
|
|
215
|
+
' --content <text> inline text (the shell interprets backticks and $(...) in double quotes)\n' +
|
|
216
|
+
' --content-file <path> read the content verbatim from a file, or "-" for stdin');
|
|
217
|
+
}
|
|
218
|
+
if (hasFile && options.interactive) {
|
|
219
|
+
throw (0, errors_1.validationError)('Cannot use --content-file with --interactive. Interactive mode would print the ' +
|
|
220
|
+
"file's contents to the terminal as the prompt default, which defeats the point of " +
|
|
221
|
+
'passing content by file. Drop --interactive, or use --content for text you are ' +
|
|
222
|
+
'willing to see echoed.');
|
|
223
|
+
}
|
|
224
|
+
if (!hasFile) {
|
|
225
|
+
if (hasContent)
|
|
226
|
+
assertWithinContentLimit(options.content, '--content');
|
|
227
|
+
return options.content;
|
|
228
|
+
}
|
|
229
|
+
const rawPath = options.contentFile;
|
|
230
|
+
if (rawPath.trim().length === 0) {
|
|
231
|
+
throw (0, errors_1.validationError)('--content-file was given an empty path. If this came from a shell variable ' +
|
|
232
|
+
'(--content-file "$BODY_FILE"), the variable is unset or misspelled. ' +
|
|
233
|
+
'Nothing was read and nothing was sent.');
|
|
234
|
+
}
|
|
235
|
+
const label = rawPath === exports.CONTENT_FILE_STDIN ? '--content-file -' : `--content-file ${rawPath}`;
|
|
236
|
+
const content = rawPath === exports.CONTENT_FILE_STDIN
|
|
237
|
+
? await (deps.readStdin ?? readStdin)()
|
|
238
|
+
: readContentFile(rawPath);
|
|
239
|
+
if (content.trim().length === 0) {
|
|
240
|
+
throw (0, errors_1.validationError)(`${label}: file is empty (no non-whitespace content). Refusing to create an empty memory.`);
|
|
241
|
+
}
|
|
242
|
+
assertWithinContentLimit(content, label);
|
|
243
|
+
return content;
|
|
244
|
+
}
|
|
245
|
+
function readContentFile(rawPath) {
|
|
246
|
+
const resolved = path.resolve(rawPath);
|
|
247
|
+
const label = `--content-file ${rawPath}`;
|
|
248
|
+
// Pre-open classification. Opening a FIFO read-only blocks until a writer
|
|
249
|
+
// appears, so the kind of the path must be known BEFORE the open. O_NONBLOCK
|
|
250
|
+
// below makes the open safe even if the path is swapped after this check.
|
|
251
|
+
let preStat;
|
|
252
|
+
try {
|
|
253
|
+
preStat = fs.statSync(resolved);
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
if (err?.code === 'ENOENT') {
|
|
257
|
+
throw (0, errors_1.validationError)(`${label}: file not found (resolved to ${resolved}).`);
|
|
258
|
+
}
|
|
259
|
+
throw (0, errors_1.validationError)(`${label}: cannot stat file (${err?.code || err?.message}).`);
|
|
260
|
+
}
|
|
261
|
+
assertRegularFile(preStat, label, resolved);
|
|
262
|
+
// O_NONBLOCK: on a FIFO or a device this returns immediately instead of
|
|
263
|
+
// blocking, closing the window where the path is replaced between the stat
|
|
264
|
+
// above and this open. It has no effect on a regular file.
|
|
265
|
+
const nonBlock = fs.constants.O_NONBLOCK ?? 0;
|
|
266
|
+
let fd;
|
|
267
|
+
try {
|
|
268
|
+
fd = fs.openSync(resolved, fs.constants.O_RDONLY | nonBlock);
|
|
269
|
+
}
|
|
270
|
+
catch (err) {
|
|
271
|
+
if (err?.code === 'ENOENT') {
|
|
272
|
+
throw (0, errors_1.validationError)(`${label}: file not found (resolved to ${resolved}).`);
|
|
273
|
+
}
|
|
274
|
+
throw (0, errors_1.validationError)(`${label}: cannot open file (${err?.code || err?.message}).`);
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
// Re-assert on the descriptor actually opened, not on the path. This is
|
|
278
|
+
// what closes the time-of-check/time-of-use gap: every check from here on
|
|
279
|
+
// describes the same inode the bytes come from.
|
|
280
|
+
const stat = fs.fstatSync(fd);
|
|
281
|
+
assertRegularFile(stat, label, resolved);
|
|
282
|
+
if (stat.size > exports.MAX_CONTENT_FILE_BYTES) {
|
|
283
|
+
throw (0, errors_1.validationError)(`${label}: file is ${stat.size} bytes, over the ${exports.MAX_CONTENT_FILE_BYTES}-byte limit.`);
|
|
284
|
+
}
|
|
285
|
+
return readFdBounded(fd, exports.MAX_CONTENT_FILE_BYTES, label);
|
|
286
|
+
}
|
|
287
|
+
finally {
|
|
288
|
+
try {
|
|
289
|
+
fs.closeSync(fd);
|
|
290
|
+
}
|
|
291
|
+
catch {
|
|
292
|
+
// Nothing useful to do if the descriptor is already gone.
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Positive assertion that the target is a regular file.
|
|
298
|
+
*
|
|
299
|
+
* `st_size` is 0 for FIFOs, sockets, and character devices, so a size-only
|
|
300
|
+
* check is not a weak bound on those — it is no bound. Note that procfs entries
|
|
301
|
+
* ARE regular files reporting size 0, so this does not make them unreadable;
|
|
302
|
+
* they are still bounded by the chunked read.
|
|
303
|
+
*/
|
|
304
|
+
function assertRegularFile(stat, label, resolved) {
|
|
305
|
+
if (stat.isDirectory()) {
|
|
306
|
+
throw (0, errors_1.validationError)(`${label}: path is a directory, not a file.`);
|
|
307
|
+
}
|
|
308
|
+
if (!stat.isFile()) {
|
|
309
|
+
throw (0, errors_1.validationError)(`${label}: not a regular file (resolved to ${resolved}). ` +
|
|
310
|
+
'Named pipes, sockets and devices are refused because they have no bounded size — ' +
|
|
311
|
+
'reading one would hang or exhaust memory. Write the content to a real file first.');
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function assertWithinContentLimit(content, label) {
|
|
315
|
+
if (content.length > exports.MAX_MEMORY_CONTENT_LENGTH) {
|
|
316
|
+
throw (0, errors_1.validationError)(`${label}: content is ${content.length} characters, over the ${exports.MAX_MEMORY_CONTENT_LENGTH}-character server limit. ` +
|
|
317
|
+
'Split it into multiple memories, or shorten it. Nothing was sent.');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
//# sourceMappingURL=content-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-input.js","sourceRoot":"","sources":["../../src/lib/content-input.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8IA,8CAqCC;AA4BD,kDAsDC;AArQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA2C;AAE3C;;;;;;;GAOG;AACU,QAAA,yBAAyB,GAAG,KAAK,CAAC;AAE/C;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,uCAAuC;AACvC,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnC,0CAA0C;AAC7B,QAAA,kBAAkB,GAAG,GAAG,CAAC;AAyBtC;;;;;;;;;;;;;;GAcG;AACH,SAAS,aAAa,CAAC,EAAU,EAAE,QAAgB,EAAE,KAAa;IAChE,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACjD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,SAAS,CAAC;QACR,IAAI,CAAS,CAAC;QACd,IAAI,CAAC;YACH,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,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AA,wBAAe,EACnB,GAAG,KAAK,gBAAgB,OAAO,CAAC,MAAM,yBAAyB,iCAAyB,2BAA2B;YACjH,mEAAmE,CACtE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memnexus-ai/cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.234",
|
|
4
4
|
"description": "Command-line interface for MemNexus Core API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"node": ">=18.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@memnexus-ai/typescript-sdk": "^1.
|
|
37
|
+
"@memnexus-ai/typescript-sdk": "^1.75.3",
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
39
39
|
"axios": "^1.13.6",
|
|
40
40
|
"chalk": "^5.3.0",
|