@awareness-sdk/local 0.1.10 → 0.1.11

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.
@@ -237,6 +237,19 @@ async function cmdStart(flags) {
237
237
  console.log(` MCP endpoint: http://localhost:${port}/mcp`);
238
238
  console.log(` Dashboard: http://localhost:${port}/`);
239
239
  console.log(` Log file: ${logPath}`);
240
+
241
+ // Auto-open dashboard on first daemon start
242
+ const firstRunFlag = path.join(awarenessDir, '.first-run-done');
243
+ if (!fs.existsSync(firstRunFlag)) {
244
+ try {
245
+ fs.writeFileSync(firstRunFlag, new Date().toISOString());
246
+ const url = `http://localhost:${port}/`;
247
+ const { exec } = await import('node:child_process');
248
+ if (process.platform === 'darwin') exec(`open "${url}"`);
249
+ else if (process.platform === 'linux') exec(`xdg-open "${url}"`);
250
+ else if (process.platform === 'win32') exec(`start "" "${url}"`);
251
+ } catch { /* ignore open failures */ }
252
+ }
240
253
  } else {
241
254
  console.error('Failed to start daemon. Check log file:');
242
255
  console.error(` ${logPath}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awareness-sdk/local",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Local-first AI agent memory system. No account needed.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/daemon.mjs CHANGED
@@ -1422,14 +1422,19 @@ export class AwarenessLocalDaemon {
1422
1422
  return { error: 'items array is required for remember_batch' };
1423
1423
  }
1424
1424
 
1425
+ // Batch-level insights go to the last item (summary item)
1426
+ const batchInsights = params.insights || null;
1427
+
1425
1428
  const results = [];
1426
- for (const item of items) {
1429
+ for (let i = 0; i < items.length; i++) {
1430
+ const item = items[i];
1431
+ const isLast = i === items.length - 1;
1427
1432
  const result = await this._remember({
1428
1433
  content: item.content,
1429
1434
  title: item.title,
1430
1435
  event_type: item.event_type,
1431
1436
  tags: item.tags,
1432
- insights: item.insights,
1437
+ insights: item.insights || (isLast ? batchInsights : null),
1433
1438
  session_id: params.session_id,
1434
1439
  agent_role: params.agent_role,
1435
1440
  });