@agentvault/agentvault 0.19.66 → 0.19.68

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/cli.js CHANGED
@@ -88250,7 +88250,7 @@ var init_index = __esm({
88250
88250
  init_skill_invoker();
88251
88251
  await init_skill_telemetry();
88252
88252
  await init_policy_enforcer();
88253
- VERSION = true ? "0.19.66" : "0.0.0-dev";
88253
+ VERSION = true ? "0.19.68" : "0.0.0-dev";
88254
88254
  }
88255
88255
  });
88256
88256
 
@@ -88778,7 +88778,7 @@ async function runCreateCommand(options) {
88778
88778
  }
88779
88779
  console.log(" Step 3/7 \u2014 Creating agent with OpenClaw...");
88780
88780
  try {
88781
- execSync2(`openclaw agents add -- ${name2}`, { stdio: "pipe", env });
88781
+ execSync2(`openclaw agents add --non-interactive --workspace "${workspaceDir}" -- ${name2}`, { stdio: "pipe", env });
88782
88782
  console.log(` Agent '${name2}' created.
88783
88783
  `);
88784
88784
  } catch {
@@ -88813,6 +88813,89 @@ async function runCreateCommand(options) {
88813
88813
  accountId: name2,
88814
88814
  force
88815
88815
  });
88816
+ try {
88817
+ const stateFile = join6(dataDir2, "agentvault.json");
88818
+ if (existsSync2(stateFile)) {
88819
+ const state = JSON.parse(readFileSync3(stateFile, "utf-8"));
88820
+ const jwt2 = state.deviceJwt;
88821
+ const hubId = state.hubId || state.agentHubId;
88822
+ if (jwt2 && hubId) {
88823
+ console.log(" Pulling agent configuration from AgentVault...");
88824
+ const hubRes = await fetch(`${apiUrl2}/api/v1/hub/identities/${hubId}/config`, {
88825
+ headers: { Authorization: `Bearer ${jwt2}` }
88826
+ });
88827
+ if (hubRes.ok) {
88828
+ const hub = await hubRes.json();
88829
+ const displayName = hub.display_name || name2;
88830
+ const description = hub.description || "";
88831
+ const capabilities = hub.capabilities || [];
88832
+ const skills = capabilities.filter((c2) => c2.skill_content);
88833
+ const identityContent = `# IDENTITY.md - Who Am I?
88834
+
88835
+ - **Name:** ${displayName}
88836
+ - **Creature:** AI assistant \u2014 a capable peer agent in the AgentVault network
88837
+ - **Hub Address:** ${hub.hub_address || `${name2}.agentvault.hub`}
88838
+ - **Description:** ${description}
88839
+ - **Emoji:** (update to something fitting)
88840
+ `;
88841
+ writeFileSync2(join6(workspaceDir, "IDENTITY.md"), identityContent, "utf-8");
88842
+ let soulContent = `# SOUL.md - Who You Are
88843
+
88844
+ ## Identity
88845
+ You are **${displayName}**${description ? ` \u2014 ${description}` : ""}.
88846
+
88847
+ ## Core Truths
88848
+ - Be genuinely helpful, not performatively helpful.
88849
+ - Have opinions. Be resourceful before asking.
88850
+ - Earn trust through competence.
88851
+
88852
+ ## Channel Reply Rules
88853
+ - Never include reasoning or internal logic in visible replies.
88854
+ - No narrating your approach before or after tool calls.
88855
+ - Just deliver the answer \u2014 clean and direct.
88856
+ `;
88857
+ if (skills.length > 0) {
88858
+ soulContent += `
88859
+ ## Skills
88860
+
88861
+ `;
88862
+ for (const skill of skills) {
88863
+ soulContent += `### ${skill.capability_name}
88864
+ `;
88865
+ if (skill.description) soulContent += `${skill.description}
88866
+
88867
+ `;
88868
+ if (skill.skill_content) soulContent += `**Instructions:**
88869
+ ${skill.skill_content}
88870
+
88871
+ `;
88872
+ }
88873
+ }
88874
+ if (capabilities.length > 0) {
88875
+ const tools = capabilities.filter((c2) => !c2.skill_content);
88876
+ if (tools.length > 0) {
88877
+ soulContent += `
88878
+ ## Available Tools
88879
+ `;
88880
+ for (const tool of tools) {
88881
+ soulContent += `- **${tool.capability_name}**${tool.description ? `: ${tool.description}` : ""}
88882
+ `;
88883
+ }
88884
+ }
88885
+ }
88886
+ writeFileSync2(join6(workspaceDir, "SOUL.md"), soulContent, "utf-8");
88887
+ console.log(` Workspace updated with ${skills.length} skills, ${capabilities.length - skills.length} tools.
88888
+ `);
88889
+ } else {
88890
+ console.log(` Could not fetch hub config (${hubRes.status}) \u2014 using defaults.
88891
+ `);
88892
+ }
88893
+ }
88894
+ }
88895
+ } catch (pullErr) {
88896
+ console.log(` Could not pull agent config \u2014 using defaults. (${pullErr})
88897
+ `);
88898
+ }
88816
88899
  console.log("\n Step 7/7 \u2014 Patching openclaw.json...");
88817
88900
  try {
88818
88901
  const freshConfig = readOpenClawConfig(home);