engrm 0.3.0 → 0.3.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 (2) hide show
  1. package/dist/cli.js +12 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2166,6 +2166,7 @@ switch (command) {
2166
2166
  printUsage();
2167
2167
  break;
2168
2168
  }
2169
+ process.exit(0);
2169
2170
  async function handleInit(flags) {
2170
2171
  const tokenFlag = flags.find((f) => f.startsWith("--token"));
2171
2172
  if (tokenFlag) {
@@ -2299,6 +2300,15 @@ Authorization failed: ${error instanceof Error ? error.message : String(error)}`
2299
2300
  }
2300
2301
  function writeConfigFromProvision(baseUrl, result) {
2301
2302
  ensureConfigDir();
2303
+ let existingDeviceId;
2304
+ let existingSentinel;
2305
+ if (configExists()) {
2306
+ try {
2307
+ const existing = loadConfig();
2308
+ existingDeviceId = existing.device_id;
2309
+ existingSentinel = existing.sentinel;
2310
+ } catch {}
2311
+ }
2302
2312
  const config = {
2303
2313
  candengo_url: baseUrl,
2304
2314
  candengo_api_key: result.api_key,
@@ -2306,7 +2316,7 @@ function writeConfigFromProvision(baseUrl, result) {
2306
2316
  namespace: result.namespace,
2307
2317
  user_id: result.user_id,
2308
2318
  user_email: result.user_email,
2309
- device_id: generateDeviceId2(),
2319
+ device_id: existingDeviceId || generateDeviceId2(),
2310
2320
  teams: result.teams ?? [],
2311
2321
  sync: {
2312
2322
  enabled: true,
@@ -2323,7 +2333,7 @@ function writeConfigFromProvision(baseUrl, result) {
2323
2333
  custom_patterns: [],
2324
2334
  default_sensitivity: "shared"
2325
2335
  },
2326
- sentinel: {
2336
+ sentinel: existingSentinel ?? {
2327
2337
  enabled: false,
2328
2338
  mode: "advisory",
2329
2339
  provider: "openai",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engrm",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Cross-device, team-shared memory layer for AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",