@xmemo/client 0.4.133 → 0.4.134
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/README.md +21 -24
- package/package.json +1 -1
- package/src/cli.js +8 -7
package/README.md
CHANGED
|
@@ -30,9 +30,9 @@ to print the exact command without changing anything.
|
|
|
30
30
|
```bash
|
|
31
31
|
xmemo update
|
|
32
32
|
xmemo setup codex
|
|
33
|
-
xmemo setup codex --
|
|
33
|
+
xmemo setup codex --dry-run
|
|
34
34
|
xmemo setup cursor
|
|
35
|
-
xmemo setup cursor --
|
|
35
|
+
xmemo setup cursor --dry-run
|
|
36
36
|
xmemo setup copilot
|
|
37
37
|
xmemo doctor
|
|
38
38
|
xmemo discovery show
|
|
@@ -142,24 +142,23 @@ accepted as a compatibility alias.
|
|
|
142
142
|
Generate and write a client config from discovery:
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
xmemo setup codex
|
|
146
|
-
xmemo setup codex --url "https://your-private-service.example"
|
|
147
|
-
xmemo setup cursor
|
|
145
|
+
xmemo setup codex
|
|
146
|
+
xmemo setup codex --url "https://your-private-service.example"
|
|
147
|
+
xmemo setup cursor
|
|
148
148
|
xmemo setup copilot
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
`xmemo setup <client>` is the unified setup entry point.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
`xmemo setup <client>` is the unified setup entry point. For write-capable
|
|
152
|
+
clients, it applies the user-scoped config directly; use `--dry-run` to preview
|
|
153
|
+
without writing. Generated config references `XMEMO_KEY`; it does not embed the
|
|
154
|
+
token value. Write-capable client configs also include stable non-secret agent
|
|
155
|
+
identity headers where the client format supports them. `--yes` remains accepted
|
|
156
|
+
for Codex and Cursor as a compatibility no-op.
|
|
156
157
|
|
|
157
|
-
`xmemo setup codex` is the recommended Codex path.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
choose a different project instruction file, or `--no-profile` to configure MCP
|
|
162
|
-
only.
|
|
158
|
+
`xmemo setup codex` is the recommended Codex path. It writes the Codex MCP
|
|
159
|
+
config and installs the profile into the current project's `AGENTS.md` marker
|
|
160
|
+
block. Use `--dry-run` to preview, `--profile-target <path>` to choose a
|
|
161
|
+
different project instruction file, or `--no-profile` to configure MCP only.
|
|
163
162
|
|
|
164
163
|
## MCP setup
|
|
165
164
|
|
|
@@ -218,14 +217,12 @@ Recommended Codex setup:
|
|
|
218
217
|
|
|
219
218
|
```bash
|
|
220
219
|
xmemo setup codex
|
|
221
|
-
xmemo setup codex --yes
|
|
222
220
|
xmemo smoke --client codex
|
|
223
221
|
```
|
|
224
222
|
|
|
225
|
-
`setup codex`
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
`AGENTS.md` between these markers:
|
|
223
|
+
`setup codex` writes the MCP config to user-scoped Codex config and installs the
|
|
224
|
+
XMemo Codex behavior profile into the current project's `AGENTS.md` between
|
|
225
|
+
these markers. Use `xmemo setup codex --dry-run` to preview without writing.
|
|
229
226
|
|
|
230
227
|
```html
|
|
231
228
|
<!-- memory-os:codex-profile:start -->
|
|
@@ -277,11 +274,11 @@ Recommended Cursor setup:
|
|
|
277
274
|
|
|
278
275
|
```bash
|
|
279
276
|
xmemo setup cursor
|
|
280
|
-
xmemo setup cursor --yes
|
|
281
277
|
```
|
|
282
278
|
|
|
283
|
-
`setup cursor`
|
|
284
|
-
|
|
279
|
+
`setup cursor` merges the Cursor MCP config into the default Cursor user config
|
|
280
|
+
path. Use `xmemo setup cursor --dry-run` to preview without writing. The
|
|
281
|
+
lower-level equivalent remains:
|
|
285
282
|
|
|
286
283
|
```bash
|
|
287
284
|
xmemo mcp add cursor --url "$XMEMO_URL" --write
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ const PACKAGE_NAME = '@xmemo/client';
|
|
|
10
10
|
const FALLBACK_PACKAGE_NAME = '@yonro/xmemo-client';
|
|
11
11
|
const COMMAND_NAME = 'xmemo';
|
|
12
12
|
const LEGACY_COMMAND_NAME = 'memory-os';
|
|
13
|
-
const CLI_VERSION = '0.4.
|
|
13
|
+
const CLI_VERSION = '0.4.134';
|
|
14
14
|
const DEFAULT_SERVICE_URL = 'https://xmemo.dev';
|
|
15
15
|
const TOKEN_ENV_VAR = 'XMEMO_KEY';
|
|
16
16
|
const LEGACY_TOKEN_ENV_VAR = 'MEMORY_OS_MCP_TOKEN';
|
|
@@ -157,7 +157,7 @@ function writeHelp(io) {
|
|
|
157
157
|
writeLine(io.stdout, ` ${COMMAND_NAME} update [--dry-run] [--json]`);
|
|
158
158
|
writeLine(io.stdout, ` ${COMMAND_NAME} doctor [--base-url <https://api.example.com>] [--json]`);
|
|
159
159
|
writeLine(io.stdout, ` ${COMMAND_NAME} discovery show [--base-url <https://api.example.com>] [--json]`);
|
|
160
|
-
writeLine(io.stdout, ` ${COMMAND_NAME} setup <codex|cursor|copilot> [--url <https://api.example.com>] [--
|
|
160
|
+
writeLine(io.stdout, ` ${COMMAND_NAME} setup <codex|cursor|copilot> [--url <https://api.example.com>] [--dry-run] [--json]`);
|
|
161
161
|
writeLine(io.stdout, ` ${COMMAND_NAME} login [--from-stdin] [--base-url <url>] [--timeout-ms <ms>] [--http-timeout-ms <ms>] [--json]`);
|
|
162
162
|
writeLine(io.stdout, ` ${COMMAND_NAME} auth status [--verify] [--base-url <url>] [--json]`);
|
|
163
163
|
writeLine(io.stdout, ` ${COMMAND_NAME} status [--url <https://api.example.com>] [--json]`);
|
|
@@ -367,8 +367,9 @@ async function setupCommand(args, io) {
|
|
|
367
367
|
const baseUrl = normalizeBaseUrl(baseUrlOption(optionArgs, io.env));
|
|
368
368
|
const outputJson = hasFlag(optionArgs, '--json');
|
|
369
369
|
const shortClientSetup = Boolean(positionalClientId);
|
|
370
|
-
const writeConfig = hasFlag(optionArgs, '--write') || (shortClientSetup && hasFlag(optionArgs, '--yes'));
|
|
371
370
|
const clientId = normalizeSetupClientId(positionalClientId ?? optionValue(optionArgs, '--client'));
|
|
371
|
+
const dryRun = hasFlag(optionArgs, '--dry-run') || hasFlag(optionArgs, '--preview');
|
|
372
|
+
const writeConfig = !dryRun && (hasFlag(optionArgs, '--write') || (shortClientSetup && clientId !== 'copilot-cli'));
|
|
372
373
|
const timeoutMs = parsePositiveInteger(optionValue(optionArgs, '--timeout-ms') ?? '5000', '--timeout-ms');
|
|
373
374
|
const installProfile = shortClientSetup
|
|
374
375
|
&& clientId === 'codex'
|
|
@@ -391,7 +392,7 @@ async function setupCommand(args, io) {
|
|
|
391
392
|
|
|
392
393
|
if (clientId) {
|
|
393
394
|
if (clientId === 'copilot-cli') {
|
|
394
|
-
if (
|
|
395
|
+
if (hasFlag(optionArgs, '--write') || hasFlag(optionArgs, '--yes')) {
|
|
395
396
|
throw new UsageError(`Copilot CLI setup cannot be written automatically yet. Run \`${COMMAND_NAME} setup copilot\` to print the local proxy template, then add it with Copilot CLI MCP management.`);
|
|
396
397
|
}
|
|
397
398
|
const proxyPort = parsePositiveInteger(optionValue(optionArgs, '--port') ?? String(DEFAULT_PROXY_PORT), '--port');
|
|
@@ -1493,7 +1494,7 @@ function writeSetupSummary(plan, io) {
|
|
|
1493
1494
|
}
|
|
1494
1495
|
}
|
|
1495
1496
|
if (!plan.selectedClient.written) {
|
|
1496
|
-
writeLine(io.stdout, ` Next: ${COMMAND_NAME} setup ${plan.selectedClient.id} --url ${plan.baseUrl}
|
|
1497
|
+
writeLine(io.stdout, ` Next: ${COMMAND_NAME} setup ${plan.selectedClient.id} --url ${plan.baseUrl}`);
|
|
1497
1498
|
}
|
|
1498
1499
|
return;
|
|
1499
1500
|
}
|
|
@@ -1501,7 +1502,7 @@ function writeSetupSummary(plan, io) {
|
|
|
1501
1502
|
writeLine(io.stdout, '');
|
|
1502
1503
|
writeLine(io.stdout, 'Next steps:');
|
|
1503
1504
|
writeLine(io.stdout, ` 1. Create a scoped token in the token portal and store it in ${plan.tokenEnvVar}.`);
|
|
1504
|
-
writeLine(io.stdout, ` 2. Configure a client, for example: ${COMMAND_NAME} setup codex --url ${plan.baseUrl}
|
|
1505
|
+
writeLine(io.stdout, ` 2. Configure a client, for example: ${COMMAND_NAME} setup codex --url ${plan.baseUrl}`);
|
|
1505
1506
|
writeLine(io.stdout, ` 3. Run ${COMMAND_NAME} status to smoke-test the service without sending the token.`);
|
|
1506
1507
|
}
|
|
1507
1508
|
|
|
@@ -1566,7 +1567,7 @@ function codexMemoryProfile() {
|
|
|
1566
1567
|
'For routine or low-signal output, skip durable writes. Prefer summarized procedural or semantic memories over verbose logs.',
|
|
1567
1568
|
'Keep XMemo authentication through the XMEMO_KEY environment variable; do not paste token values into prompts, config files, or logs.'
|
|
1568
1569
|
],
|
|
1569
|
-
setupCommand: `${COMMAND_NAME} setup codex --url "$XMEMO_URL"
|
|
1570
|
+
setupCommand: `${COMMAND_NAME} setup codex --url "$XMEMO_URL"`,
|
|
1570
1571
|
smokeCommand: `${COMMAND_NAME} smoke --client codex`
|
|
1571
1572
|
};
|
|
1572
1573
|
}
|