@agentvault/agentvault 0.14.1 → 0.14.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.
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +368 -5
- package/dist/cli.js.map +4 -4
- package/dist/create-agent.d.ts +28 -0
- package/dist/create-agent.d.ts.map +1 -0
- package/dist/gateway-send.d.ts +27 -0
- package/dist/gateway-send.d.ts.map +1 -1
- package/dist/http-handlers.d.ts +4 -0
- package/dist/http-handlers.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -1
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +39 -0
- package/dist/openclaw-entry.js.map +2 -2
- package/package.json +1 -1
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,OAAO,EAWL,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EAMZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,QAAQ,EAER,UAAU,EAEX,MAAM,YAAY,CAAC;AAoDpB,qBAAa,aAAc,SAAQ,YAAY;IAiDjC,OAAO,CAAC,MAAM;IAhD1B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,sBAAsB,CAAc;IAC5C,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,SAAS,CAGH;IACd,OAAO,CAAC,GAAG,CAA0B;IACrC,OAAO,CAAC,UAAU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CAAC;YAoDhC,OAAO;IAgDrB,OAAO,CAAC,KAAK;YAsCC,SAAS;IAyIvB,OAAO,CAAC,QAAQ;IA8iBhB;;;;OAIG;YACW,sBAAsB;IA+NpC;;;OAGG;YACW,6BAA6B;IA6C3C;;;OAGG;YACW,iBAAiB;IAwD/B;;;OAGG;IACG,kBAAkB,CACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC,IAAI,CAAC;IA8ChB;;;OAGG;YACW,oBAAoB;IAqClC;;;OAGG;YACW,uBAAuB;IAkCrC;;;;OAIG;YACW,mBAAmB;IAkEjC;;;;OAIG;YACW,oBAAoB;IA8ElC;;;OAGG;YACW,kBAAkB;IAwMhC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;;OAGG;IACH;;;OAGG;YACW,mBAAmB;IAmIjC,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,UAAU;YAMJ,mBAAmB;IAmCjC,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;YAOV,qBAAqB;IAuCnC,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,kBAAkB;IA2H1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;IAKpB;;;OAGG;YACW,aAAa;CAoB5B"}
|
package/dist/cli.js
CHANGED
|
@@ -45881,6 +45881,7 @@ var init_openclaw_compat = __esm({
|
|
|
45881
45881
|
var http_handlers_exports = {};
|
|
45882
45882
|
__export(http_handlers_exports, {
|
|
45883
45883
|
handleActionRequest: () => handleActionRequest,
|
|
45884
|
+
handleDecisionRequest: () => handleDecisionRequest,
|
|
45884
45885
|
handleSendRequest: () => handleSendRequest,
|
|
45885
45886
|
handleStatusRequest: () => handleStatusRequest
|
|
45886
45887
|
});
|
|
@@ -45934,6 +45935,34 @@ async function handleActionRequest(parsed, channel2) {
|
|
|
45934
45935
|
return { status: 500, body: { ok: false, error: String(err) } };
|
|
45935
45936
|
}
|
|
45936
45937
|
}
|
|
45938
|
+
async function handleDecisionRequest(parsed, channel2) {
|
|
45939
|
+
const title = parsed.title;
|
|
45940
|
+
if (!title || typeof title !== "string") {
|
|
45941
|
+
return { status: 400, body: { ok: false, error: "Missing 'title' field" } };
|
|
45942
|
+
}
|
|
45943
|
+
const options = parsed.options;
|
|
45944
|
+
if (!Array.isArray(options) || options.length < 2) {
|
|
45945
|
+
return { status: 400, body: { ok: false, error: "'options' must be an array with at least 2 items" } };
|
|
45946
|
+
}
|
|
45947
|
+
for (const opt of options) {
|
|
45948
|
+
if (!opt || typeof opt !== "object" || !opt.option_id || !opt.label) {
|
|
45949
|
+
return { status: 400, body: { ok: false, error: "Each option must have 'option_id' and 'label'" } };
|
|
45950
|
+
}
|
|
45951
|
+
}
|
|
45952
|
+
try {
|
|
45953
|
+
const decision_id = await channel2.sendDecisionRequest({
|
|
45954
|
+
title,
|
|
45955
|
+
description: parsed.description,
|
|
45956
|
+
options,
|
|
45957
|
+
context_refs: parsed.context_refs,
|
|
45958
|
+
deadline: parsed.deadline,
|
|
45959
|
+
auto_action: parsed.auto_action
|
|
45960
|
+
});
|
|
45961
|
+
return { status: 200, body: { ok: true, decision_id } };
|
|
45962
|
+
} catch (err) {
|
|
45963
|
+
return { status: 500, body: { ok: false, error: String(err) } };
|
|
45964
|
+
}
|
|
45965
|
+
}
|
|
45937
45966
|
function handleStatusRequest(channel2) {
|
|
45938
45967
|
return {
|
|
45939
45968
|
status: 200,
|
|
@@ -46738,6 +46767,22 @@ var init_channel = __esm({
|
|
|
46738
46767
|
res.end(JSON.stringify({ ok: false, error: String(err) }));
|
|
46739
46768
|
}
|
|
46740
46769
|
});
|
|
46770
|
+
} else if (req.method === "POST" && req.url === "/decision") {
|
|
46771
|
+
let body = "";
|
|
46772
|
+
req.on("data", (chunk) => {
|
|
46773
|
+
body += chunk.toString();
|
|
46774
|
+
});
|
|
46775
|
+
req.on("end", async () => {
|
|
46776
|
+
try {
|
|
46777
|
+
const parsed = JSON.parse(body);
|
|
46778
|
+
const result = await handlers.handleDecisionRequest(parsed, this);
|
|
46779
|
+
res.writeHead(result.status, { "Content-Type": "application/json" });
|
|
46780
|
+
res.end(JSON.stringify(result.body));
|
|
46781
|
+
} catch (err) {
|
|
46782
|
+
res.writeHead(500, { "Content-Type": "application/json" });
|
|
46783
|
+
res.end(JSON.stringify({ ok: false, error: String(err) }));
|
|
46784
|
+
}
|
|
46785
|
+
});
|
|
46741
46786
|
} else if (req.method === "POST" && req.url === "/action") {
|
|
46742
46787
|
let body = "";
|
|
46743
46788
|
req.on("data", (chunk) => {
|
|
@@ -46760,7 +46805,7 @@ var init_channel = __esm({
|
|
|
46760
46805
|
res.end(JSON.stringify(result.body));
|
|
46761
46806
|
} else {
|
|
46762
46807
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
46763
|
-
res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send, POST /action, or GET /status" }));
|
|
46808
|
+
res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send, POST /decision, POST /action, or GET /status" }));
|
|
46764
46809
|
}
|
|
46765
46810
|
});
|
|
46766
46811
|
this._httpServer.listen(port, "127.0.0.1", () => {
|
|
@@ -48686,6 +48731,7 @@ var init_openclaw_plugin = __esm({
|
|
|
48686
48731
|
var gateway_send_exports = {};
|
|
48687
48732
|
__export(gateway_send_exports, {
|
|
48688
48733
|
checkGateway: () => checkGateway,
|
|
48734
|
+
sendDecisionToOwner: () => sendDecisionToOwner,
|
|
48689
48735
|
sendToOwner: () => sendToOwner
|
|
48690
48736
|
});
|
|
48691
48737
|
function resolveBaseUrl(options) {
|
|
@@ -48726,6 +48772,34 @@ async function sendToOwner(text, options) {
|
|
|
48726
48772
|
return { ok: false, error: friendlyError(err) };
|
|
48727
48773
|
}
|
|
48728
48774
|
}
|
|
48775
|
+
async function sendDecisionToOwner(request, options) {
|
|
48776
|
+
if (!request.title || typeof request.title !== "string") {
|
|
48777
|
+
return { ok: false, error: "Decision title must be a non-empty string" };
|
|
48778
|
+
}
|
|
48779
|
+
if (!Array.isArray(request.options) || request.options.length < 2) {
|
|
48780
|
+
return { ok: false, error: "Decision must have at least 2 options" };
|
|
48781
|
+
}
|
|
48782
|
+
requestHeartbeatNow({ reason: "proactive-decision" }).catch(() => {
|
|
48783
|
+
});
|
|
48784
|
+
try {
|
|
48785
|
+
const base = resolveBaseUrl(options);
|
|
48786
|
+
const path = process.env.OPENCLAW_GATEWAY_URL ? "/agentvault/decision" : "/decision";
|
|
48787
|
+
const res = await fetch(`${base}${path}`, {
|
|
48788
|
+
method: "POST",
|
|
48789
|
+
headers: { "Content-Type": "application/json" },
|
|
48790
|
+
body: JSON.stringify(request),
|
|
48791
|
+
signal: options?.signal
|
|
48792
|
+
});
|
|
48793
|
+
if (!res.ok) {
|
|
48794
|
+
const body = await res.text().catch(() => "");
|
|
48795
|
+
return { ok: false, error: `HTTP ${res.status}${body ? `: ${body}` : ""}` };
|
|
48796
|
+
}
|
|
48797
|
+
const data = await res.json();
|
|
48798
|
+
return { ok: true, decision_id: data.decision_id };
|
|
48799
|
+
} catch (err) {
|
|
48800
|
+
return { ok: false, error: friendlyError(err) };
|
|
48801
|
+
}
|
|
48802
|
+
}
|
|
48729
48803
|
async function checkGateway(options) {
|
|
48730
48804
|
try {
|
|
48731
48805
|
const base = resolveBaseUrl(options);
|
|
@@ -49143,12 +49217,267 @@ var init_setup = __esm({
|
|
|
49143
49217
|
}
|
|
49144
49218
|
});
|
|
49145
49219
|
|
|
49220
|
+
// src/create-agent.ts
|
|
49221
|
+
var create_agent_exports = {};
|
|
49222
|
+
__export(create_agent_exports, {
|
|
49223
|
+
findNextPort: () => findNextPort,
|
|
49224
|
+
generateWorkspaceFiles: () => generateWorkspaceFiles,
|
|
49225
|
+
openclawHome: () => openclawHome,
|
|
49226
|
+
readOpenClawConfig: () => readOpenClawConfig,
|
|
49227
|
+
runCreateCommand: () => runCreateCommand
|
|
49228
|
+
});
|
|
49229
|
+
import { execSync as execSync2 } from "node:child_process";
|
|
49230
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from "node:fs";
|
|
49231
|
+
import { join as join3 } from "node:path";
|
|
49232
|
+
function openclawHome() {
|
|
49233
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
49234
|
+
return join3(home, ".openclaw");
|
|
49235
|
+
}
|
|
49236
|
+
function readOpenClawConfig(home) {
|
|
49237
|
+
const configPath = join3(home, "openclaw.json");
|
|
49238
|
+
const raw = readFileSync(configPath, "utf-8");
|
|
49239
|
+
return JSON.parse(raw);
|
|
49240
|
+
}
|
|
49241
|
+
function writeOpenClawConfig(home, config, backupSuffix) {
|
|
49242
|
+
const configPath = join3(home, "openclaw.json");
|
|
49243
|
+
const backupPath = `${configPath}.bak.pre-${backupSuffix}`;
|
|
49244
|
+
copyFileSync(configPath, backupPath);
|
|
49245
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
49246
|
+
}
|
|
49247
|
+
function findNextPort(config, startPort = 18790) {
|
|
49248
|
+
const ports = [];
|
|
49249
|
+
const plugins = config.plugins ?? [];
|
|
49250
|
+
for (const plugin of plugins) {
|
|
49251
|
+
const accounts = plugin.accounts ?? [];
|
|
49252
|
+
for (const acct of accounts) {
|
|
49253
|
+
if (typeof acct.httpPort === "number") {
|
|
49254
|
+
ports.push(acct.httpPort);
|
|
49255
|
+
}
|
|
49256
|
+
}
|
|
49257
|
+
}
|
|
49258
|
+
const rootAccounts = config.accounts ?? [];
|
|
49259
|
+
for (const acct of rootAccounts) {
|
|
49260
|
+
if (typeof acct.httpPort === "number") {
|
|
49261
|
+
ports.push(acct.httpPort);
|
|
49262
|
+
}
|
|
49263
|
+
}
|
|
49264
|
+
if (ports.length === 0) return startPort;
|
|
49265
|
+
return Math.max(...ports, startPort - 1) + 1;
|
|
49266
|
+
}
|
|
49267
|
+
function isPortInUse(config, port) {
|
|
49268
|
+
const plugins = config.plugins ?? [];
|
|
49269
|
+
for (const plugin of plugins) {
|
|
49270
|
+
for (const acct of plugin.accounts ?? []) {
|
|
49271
|
+
if (acct.httpPort === port) return true;
|
|
49272
|
+
}
|
|
49273
|
+
}
|
|
49274
|
+
for (const acct of config.accounts ?? []) {
|
|
49275
|
+
if (acct.httpPort === port) return true;
|
|
49276
|
+
}
|
|
49277
|
+
return false;
|
|
49278
|
+
}
|
|
49279
|
+
function generateWorkspaceFiles(name2) {
|
|
49280
|
+
const displayName = name2.charAt(0).toUpperCase() + name2.slice(1).toLowerCase();
|
|
49281
|
+
return {
|
|
49282
|
+
"IDENTITY.md": `# IDENTITY.md - Who Am I?
|
|
49283
|
+
|
|
49284
|
+
- **Name:** ${displayName}
|
|
49285
|
+
- **Creature:** AI assistant \u2014 a capable peer agent in the AgentVault network
|
|
49286
|
+
- **Vibe:** Direct, competent, focused on their specialty domain
|
|
49287
|
+
- **Emoji:** (placeholder \u2014 update to something fitting)
|
|
49288
|
+
- **Avatar:** _(none set yet)_
|
|
49289
|
+
|
|
49290
|
+
> TODO: Customize this file to give ${name2} a distinct identity.
|
|
49291
|
+
`,
|
|
49292
|
+
"SOUL.md": `# SOUL.md - Who You Are
|
|
49293
|
+
|
|
49294
|
+
> TODO: Define ${name2}'s personality, tone, and behavioral rules.
|
|
49295
|
+
> Copy and adapt from ~/.openclaw/workspace/SOUL.md as a starting point.
|
|
49296
|
+
|
|
49297
|
+
## Core Truths
|
|
49298
|
+
|
|
49299
|
+
- Be genuinely helpful, not performatively helpful.
|
|
49300
|
+
- Have opinions. Be resourceful before asking.
|
|
49301
|
+
- Earn trust through competence.
|
|
49302
|
+
|
|
49303
|
+
## Channel Reply Rules
|
|
49304
|
+
|
|
49305
|
+
- Never include reasoning or internal logic in visible replies.
|
|
49306
|
+
- No narrating your approach before or after tool calls.
|
|
49307
|
+
- Just deliver the answer \u2014 clean and direct.
|
|
49308
|
+
|
|
49309
|
+
## Vibe
|
|
49310
|
+
|
|
49311
|
+
_(Define ${name2}'s specific personality here.)_
|
|
49312
|
+
`,
|
|
49313
|
+
"HEARTBEAT.md": `# Heartbeat
|
|
49314
|
+
|
|
49315
|
+
- Stay available. If nothing needs attention, reply HEARTBEAT_OK.
|
|
49316
|
+
- **Heartbeat replies are INTERNAL ONLY.** Reply with ONLY \`HEARTBEAT_OK\` when nothing needs attention.
|
|
49317
|
+
- If something genuinely urgent needs attention, send it proactively FIRST, THEN reply HEARTBEAT_OK.
|
|
49318
|
+
`,
|
|
49319
|
+
"MEMORY.md": `# MEMORY.md - Long-Term Memory
|
|
49320
|
+
|
|
49321
|
+
_(Empty \u2014 ${name2} starts with a clean memory. Update as the agent learns.)_
|
|
49322
|
+
`
|
|
49323
|
+
};
|
|
49324
|
+
}
|
|
49325
|
+
async function runCreateCommand(options) {
|
|
49326
|
+
const { name: name2, token: token2, apiUrl: apiUrl2, force } = options;
|
|
49327
|
+
const home = openclawHome();
|
|
49328
|
+
const configPath = join3(home, "openclaw.json");
|
|
49329
|
+
const workspaceDir = join3(home, `workspace-${name2}`);
|
|
49330
|
+
const dataDir2 = join3(home, "agents", name2, "agentvault-data");
|
|
49331
|
+
const templateDir = join3(home, "workspace");
|
|
49332
|
+
console.log(`
|
|
49333
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
49334
|
+
\u2551 AgentVault \u2014 Create New Agent \u2551
|
|
49335
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
49336
|
+
`);
|
|
49337
|
+
console.log(" Step 1/7 \u2014 Preflight checks...");
|
|
49338
|
+
try {
|
|
49339
|
+
execSync2("openclaw --version", { stdio: "pipe" });
|
|
49340
|
+
} catch {
|
|
49341
|
+
console.error(" Error: 'openclaw' not found in PATH. Is OpenClaw installed?");
|
|
49342
|
+
process.exit(1);
|
|
49343
|
+
}
|
|
49344
|
+
if (!existsSync(configPath)) {
|
|
49345
|
+
console.error(` Error: openclaw.json not found at ${configPath}`);
|
|
49346
|
+
process.exit(1);
|
|
49347
|
+
}
|
|
49348
|
+
console.log(" Preflight passed.\n");
|
|
49349
|
+
console.log(" Step 2/7 \u2014 Detecting port...");
|
|
49350
|
+
const config = readOpenClawConfig(home);
|
|
49351
|
+
let port;
|
|
49352
|
+
if (options.port != null) {
|
|
49353
|
+
port = options.port;
|
|
49354
|
+
if (isPortInUse(config, port)) {
|
|
49355
|
+
console.error(` Error: Port ${port} is already in use in openclaw.json.`);
|
|
49356
|
+
process.exit(1);
|
|
49357
|
+
}
|
|
49358
|
+
console.log(` Using explicit port ${port}.
|
|
49359
|
+
`);
|
|
49360
|
+
} else {
|
|
49361
|
+
port = findNextPort(config);
|
|
49362
|
+
console.log(` Auto-assigned port ${port}.
|
|
49363
|
+
`);
|
|
49364
|
+
}
|
|
49365
|
+
console.log(" Step 3/7 \u2014 Creating agent with OpenClaw...");
|
|
49366
|
+
try {
|
|
49367
|
+
execSync2(`openclaw agents add ${name2}`, { stdio: "pipe" });
|
|
49368
|
+
console.log(` Agent '${name2}' created.
|
|
49369
|
+
`);
|
|
49370
|
+
} catch {
|
|
49371
|
+
console.log(` Warning: 'openclaw agents add' failed \u2014 agent may already exist. Continuing.
|
|
49372
|
+
`);
|
|
49373
|
+
}
|
|
49374
|
+
console.log(" Step 4/7 \u2014 Creating directories...");
|
|
49375
|
+
mkdirSync(workspaceDir, { recursive: true });
|
|
49376
|
+
mkdirSync(dataDir2, { recursive: true });
|
|
49377
|
+
console.log(` Workspace: ${workspaceDir}`);
|
|
49378
|
+
console.log(` DataDir: ${dataDir2}
|
|
49379
|
+
`);
|
|
49380
|
+
console.log(" Step 5/7 \u2014 Writing workspace files...");
|
|
49381
|
+
const files = generateWorkspaceFiles(name2);
|
|
49382
|
+
for (const [filename, content] of Object.entries(files)) {
|
|
49383
|
+
writeFileSync(join3(workspaceDir, filename), content, "utf-8");
|
|
49384
|
+
}
|
|
49385
|
+
for (const copyFile of ["AGENTS.md", "USER.md"]) {
|
|
49386
|
+
const src = join3(templateDir, copyFile);
|
|
49387
|
+
if (existsSync(src)) {
|
|
49388
|
+
copyFileSync(src, join3(workspaceDir, copyFile));
|
|
49389
|
+
console.log(` Copied ${copyFile} from template workspace.`);
|
|
49390
|
+
}
|
|
49391
|
+
}
|
|
49392
|
+
console.log(" Workspace files written.\n");
|
|
49393
|
+
console.log(" Step 6/7 \u2014 Enrolling with AgentVault...\n");
|
|
49394
|
+
await runSetupCommand({
|
|
49395
|
+
token: token2,
|
|
49396
|
+
name: name2,
|
|
49397
|
+
apiUrl: apiUrl2,
|
|
49398
|
+
dataDir: dataDir2,
|
|
49399
|
+
accountId: name2,
|
|
49400
|
+
force
|
|
49401
|
+
});
|
|
49402
|
+
console.log("\n Step 7/7 \u2014 Patching httpPort in openclaw.json...");
|
|
49403
|
+
try {
|
|
49404
|
+
const freshConfig = readOpenClawConfig(home);
|
|
49405
|
+
let patched = false;
|
|
49406
|
+
const plugins = freshConfig.plugins ?? [];
|
|
49407
|
+
for (const plugin of plugins) {
|
|
49408
|
+
if (plugin.id === "agentvault" || plugin.plugin === "agentvault" || plugin.name === "agentvault") {
|
|
49409
|
+
const accounts = plugin.accounts ?? [];
|
|
49410
|
+
for (const acct of accounts) {
|
|
49411
|
+
if (acct.id === name2) {
|
|
49412
|
+
acct.httpPort = port;
|
|
49413
|
+
patched = true;
|
|
49414
|
+
}
|
|
49415
|
+
}
|
|
49416
|
+
}
|
|
49417
|
+
}
|
|
49418
|
+
if (patched) {
|
|
49419
|
+
writeOpenClawConfig(home, freshConfig, name2);
|
|
49420
|
+
console.log(` httpPort set to ${port}.
|
|
49421
|
+
`);
|
|
49422
|
+
} else {
|
|
49423
|
+
console.log(` Warning: Could not find account '${name2}' to patch httpPort.`);
|
|
49424
|
+
console.log(` You may need to manually set httpPort: ${port} in openclaw.json.
|
|
49425
|
+
`);
|
|
49426
|
+
}
|
|
49427
|
+
} catch (err) {
|
|
49428
|
+
console.log(` Warning: Failed to patch httpPort: ${err.message}
|
|
49429
|
+
`);
|
|
49430
|
+
}
|
|
49431
|
+
console.log(" Verifying agent...");
|
|
49432
|
+
try {
|
|
49433
|
+
const http = await import("node:http");
|
|
49434
|
+
await new Promise((resolve4) => {
|
|
49435
|
+
const req = http.get(`http://127.0.0.1:${port}/status`, { timeout: 3e3 }, (res) => {
|
|
49436
|
+
console.log(` Port ${port} responded (HTTP ${res.statusCode}).`);
|
|
49437
|
+
res.resume();
|
|
49438
|
+
resolve4();
|
|
49439
|
+
});
|
|
49440
|
+
req.on("error", () => {
|
|
49441
|
+
console.log(` Port ${port} not yet responding \u2014 gateway may need a moment.`);
|
|
49442
|
+
resolve4();
|
|
49443
|
+
});
|
|
49444
|
+
req.on("timeout", () => {
|
|
49445
|
+
req.destroy();
|
|
49446
|
+
console.log(` Port ${port} timed out \u2014 check gateway logs.`);
|
|
49447
|
+
resolve4();
|
|
49448
|
+
});
|
|
49449
|
+
});
|
|
49450
|
+
} catch {
|
|
49451
|
+
console.log(" Verification skipped.");
|
|
49452
|
+
}
|
|
49453
|
+
console.log(`
|
|
49454
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
49455
|
+
Agent '${name2}' created successfully!
|
|
49456
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
49457
|
+
|
|
49458
|
+
Workspace: ${workspaceDir}
|
|
49459
|
+
DataDir: ${dataDir2}
|
|
49460
|
+
HTTP Port: ${port}
|
|
49461
|
+
|
|
49462
|
+
Next steps:
|
|
49463
|
+
1. Edit ${workspaceDir}/SOUL.md \u2014 give ${name2} a personality
|
|
49464
|
+
2. Edit ${workspaceDir}/IDENTITY.md \u2014 set name, emoji, vibe
|
|
49465
|
+
3. Approve the agent in the AgentVault app
|
|
49466
|
+
`);
|
|
49467
|
+
}
|
|
49468
|
+
var init_create_agent = __esm({
|
|
49469
|
+
async "src/create-agent.ts"() {
|
|
49470
|
+
"use strict";
|
|
49471
|
+
await init_setup();
|
|
49472
|
+
}
|
|
49473
|
+
});
|
|
49474
|
+
|
|
49146
49475
|
// src/skills-publish.ts
|
|
49147
49476
|
var skills_publish_exports = {};
|
|
49148
49477
|
__export(skills_publish_exports, {
|
|
49149
49478
|
publishSkills: () => publishSkills
|
|
49150
49479
|
});
|
|
49151
|
-
import { readFileSync } from "node:fs";
|
|
49480
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
49152
49481
|
import { resolve as resolve2 } from "node:path";
|
|
49153
49482
|
async function publishSkills(opts) {
|
|
49154
49483
|
if (!opts.manifest) {
|
|
@@ -49162,7 +49491,7 @@ async function publishSkills(opts) {
|
|
|
49162
49491
|
const manifestPath = resolve2(opts.manifest);
|
|
49163
49492
|
let raw;
|
|
49164
49493
|
try {
|
|
49165
|
-
raw =
|
|
49494
|
+
raw = readFileSync2(manifestPath, "utf-8");
|
|
49166
49495
|
} catch {
|
|
49167
49496
|
console.error(`Error: Cannot read manifest file: ${manifestPath}`);
|
|
49168
49497
|
process.exit(1);
|
|
@@ -49309,6 +49638,36 @@ After setup, restart OpenClaw \u2014 messages will flow automatically.
|
|
|
49309
49638
|
});
|
|
49310
49639
|
process.exit(0);
|
|
49311
49640
|
}
|
|
49641
|
+
if (subcommand === "create") {
|
|
49642
|
+
const agentName = args.slice(1).find((a2) => !a2.startsWith("--"));
|
|
49643
|
+
if (!agentName || !token) {
|
|
49644
|
+
console.error(`
|
|
49645
|
+
AgentVault Create Agent
|
|
49646
|
+
|
|
49647
|
+
Usage:
|
|
49648
|
+
npx @agentvault/agentvault create <name> --token=TOKEN
|
|
49649
|
+
|
|
49650
|
+
Options:
|
|
49651
|
+
--token=TOKEN Invite token from the AgentVault app (required)
|
|
49652
|
+
--port=PORT HTTP port (auto-detected if omitted)
|
|
49653
|
+
--api-url=URL API endpoint (default: https://api.agentvault.chat)
|
|
49654
|
+
--force Re-enroll even if already enrolled
|
|
49655
|
+
|
|
49656
|
+
Example:
|
|
49657
|
+
npx @agentvault/agentvault create nova --token=av_tok_abc123
|
|
49658
|
+
`);
|
|
49659
|
+
process.exit(1);
|
|
49660
|
+
}
|
|
49661
|
+
const { runCreateCommand: runCreateCommand2 } = await init_create_agent().then(() => create_agent_exports);
|
|
49662
|
+
await runCreateCommand2({
|
|
49663
|
+
name: agentName,
|
|
49664
|
+
token,
|
|
49665
|
+
port: flags["port"] ? Number(flags["port"]) : void 0,
|
|
49666
|
+
apiUrl,
|
|
49667
|
+
force: flags["force"] === "true"
|
|
49668
|
+
});
|
|
49669
|
+
process.exit(0);
|
|
49670
|
+
}
|
|
49312
49671
|
if (subcommand === "pm2-setup") {
|
|
49313
49672
|
const { configurePm2: configurePm22 } = await init_setup().then(() => setup_exports);
|
|
49314
49673
|
const home = process.env.HOME ?? "";
|
|
@@ -49374,7 +49733,8 @@ if (!token) {
|
|
|
49374
49733
|
AgentVault Secure Channel CLI
|
|
49375
49734
|
|
|
49376
49735
|
Usage:
|
|
49377
|
-
npx @agentvault/agentvault
|
|
49736
|
+
npx @agentvault/agentvault create <name> --token=TOKEN # Create a new agent end-to-end
|
|
49737
|
+
npx @agentvault/agentvault setup --token=TOKEN # Connect existing agent to AgentVault
|
|
49378
49738
|
npx @agentvault/agentvault pm2-setup # Configure pm2 (existing install)
|
|
49379
49739
|
npx @agentvault/agentvault send "message" # Send a message to the owner
|
|
49380
49740
|
npx @agentvault/agentvault status # Check gateway status
|
|
@@ -49404,7 +49764,10 @@ Environment variables:
|
|
|
49404
49764
|
GATEWAY_SEND_PORT Same as --port for send/status
|
|
49405
49765
|
|
|
49406
49766
|
Examples:
|
|
49407
|
-
#
|
|
49767
|
+
# Create a new agent from scratch:
|
|
49768
|
+
npx @agentvault/agentvault create nova --token=av_tok_abc123
|
|
49769
|
+
|
|
49770
|
+
# Connect an existing agent:
|
|
49408
49771
|
npx @agentvault/agentvault setup --token=av_tok_abc123
|
|
49409
49772
|
|
|
49410
49773
|
# Send a message to the owner:
|