agentlife 1.1.9 → 1.2.1

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/index.js +55 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1339,6 +1339,48 @@ If you receive \`[event:dismissed] surfaceId=vision-{slug}\` afterwards, the sur
1339
1339
 
1340
1340
  When you receive \`[action:*]\` on a confirmation widget: the user wants to use the agent you just created. Delegate the request to the new agent via \`sessions_send\` with the original user intent from your context. Delete your confirmation widget — the new agent takes over.
1341
1341
 
1342
+ ## Onboarding (Cold Start)
1343
+
1344
+ When you receive \`[system:onboarding]\` — the user has no agents yet. This is a fresh install. Your job is to help them create their FIRST agent with minimal friction. One question, one agent, break the cold start.
1345
+
1346
+ ### Step 1 — Push a guided input surface
1347
+
1348
+ Push a single \`input\` surface with life-domain choices. One question, one tap. The user picks a domain; you create an agent for it.
1349
+
1350
+ \`\`\`
1351
+ surface onboarding input
1352
+ card
1353
+ column
1354
+ text "What area of your life should your first agent focus on?" h4
1355
+ button "Health & fitness" action=choice
1356
+ button "Business & work" action=choice
1357
+ button "Home & automation" action=choice
1358
+ button "Finance & money" action=choice
1359
+ button "Something else" action=choice
1360
+ goal: User picks a life domain for their first agent
1361
+ followup: +5m "User did not respond to onboarding. Say done."
1362
+ \`\`\`
1363
+
1364
+ Detect the user's language from the gateway context (session transcript, locale). If the user writes in Spanish, push the widget in Spanish. Match the user's language — do NOT default to English.
1365
+
1366
+ ### Step 2 — On the user's choice, create the agent
1367
+
1368
+ When the user taps a choice, follow your standard agent creation flow (Steps 1–6 above) but SKIP the interactive question phase — the user already told you the domain. Go straight to:
1369
+
1370
+ 1. Environment discovery (exec checks relevant to the domain)
1371
+ 2. Create workspace + all files (AGENTS.md, SOUL.md, IDENTITY.md, USER.md, HEARTBEAT.md)
1372
+ 3. Register via agentlife.createAgent
1373
+ 4. Push the confirmation widget
1374
+ 5. Delete the onboarding input surface
1375
+
1376
+ If the user taps "Something else," push ONE follow-up textfield input asking them to describe the domain in a sentence. Then proceed with creation.
1377
+
1378
+ ### What this is NOT
1379
+
1380
+ - Not a comprehensive onboarding wizard. One question. One agent. The user can create more later by chatting normally.
1381
+ - Not a place to explain what AgentLife is. The user installed the plugin — they know.
1382
+ - Not a place to push multiple widgets. One input, one confirmation, done.
1383
+
1342
1384
  ## What You Are Not
1343
1385
 
1344
1386
  - Not an orchestrator — you don't route messages
@@ -1797,6 +1839,19 @@ async function provisionAgents(state, cfg, runtime, log) {
1797
1839
  log(`[agentlife] backfilled subagents for ${agent.id}`);
1798
1840
  }
1799
1841
  }
1842
+ const rawCfgForVisibility = JSON.parse(readFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), "utf-8"));
1843
+ const currentVisibility = rawCfgForVisibility?.tools?.sessions?.visibility;
1844
+ if (currentVisibility !== "all") {
1845
+ if (!rawCfgForVisibility.tools)
1846
+ rawCfgForVisibility.tools = {};
1847
+ if (!rawCfgForVisibility.tools.sessions)
1848
+ rawCfgForVisibility.tools.sessions = {};
1849
+ rawCfgForVisibility.tools.sessions.visibility = "all";
1850
+ writeFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), JSON.stringify(rawCfgForVisibility, null, 2) + `
1851
+ `, "utf-8");
1852
+ configChanged = true;
1853
+ log("[agentlife] set tools.sessions.visibility=all (cross-agent delegation)");
1854
+ }
1800
1855
  if (configChanged) {
1801
1856
  const configPath = path3.join(os.homedir(), ".openclaw", "openclaw.json");
1802
1857
  const rawCfg = JSON.parse(readFileSync(configPath, "utf-8"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bun build index.ts --outfile dist/index.js --target node --external openclaw/plugin-sdk",