@agentvault/agentvault 0.10.2 → 0.11.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.
- package/dist/account-config.d.ts +20 -0
- package/dist/account-config.d.ts.map +1 -0
- package/dist/cli.js +73 -8
- package/dist/cli.js.map +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -16
- package/dist/index.js.map +3 -3
- package/dist/openclaw-entry.d.ts +7 -0
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +95 -14
- package/dist/openclaw-entry.js.map +3 -3
- package/dist/openclaw-plugin.d.ts +3 -11
- package/dist/openclaw-plugin.d.ts.map +1 -1
- package/dist/setup.d.ts +1 -0
- package/dist/setup.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { SecureChannel } from "./channel.js";
|
|
2
2
|
export type { SecureChannelConfig, ChannelState, MessageMetadata, AttachmentData, PersistedState, LegacyPersistedState, DeviceSession, HistoryEntry, SendOptions, DecisionOption, DecisionRequest, DecisionResponse, ContextRef, HeartbeatStatus, StatusAlert, RoomInfo, RoomMemberInfo, RoomConversationInfo, RoomState, A2AChannel, A2AMessage, RoomParticipantEvent, } from "./types.js";
|
|
3
|
+
export { listAccountIds, resolveAccount } from "./account-config.js";
|
|
4
|
+
export type { ResolvedAccount } from "./account-config.js";
|
|
3
5
|
export { agentVaultPlugin, setOcRuntime, getActiveChannel } from "./openclaw-plugin.js";
|
|
4
6
|
export { sendToOwner, checkGateway } from "./gateway-send.js";
|
|
5
7
|
export type { GatewaySendOptions, GatewaySendResult, GatewayStatusResult, } from "./gateway-send.js";
|
|
6
|
-
export declare const VERSION = "0.
|
|
8
|
+
export declare const VERSION = "0.11.0";
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,UAAU,EACV,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,UAAU,EACV,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -47900,6 +47900,57 @@ ${messageText}`;
|
|
|
47900
47900
|
}
|
|
47901
47901
|
};
|
|
47902
47902
|
|
|
47903
|
+
// src/account-config.ts
|
|
47904
|
+
var DEFAULT_API_URL = "https://api.agentvault.chat";
|
|
47905
|
+
var DEFAULT_HTTP_PORT = 18790;
|
|
47906
|
+
function listAccountIds(cfg) {
|
|
47907
|
+
const av = cfg?.channels?.agentvault;
|
|
47908
|
+
if (!av) return [];
|
|
47909
|
+
if (av.accounts && typeof av.accounts === "object") {
|
|
47910
|
+
return Object.keys(av.accounts);
|
|
47911
|
+
}
|
|
47912
|
+
return av.dataDir ? ["default"] : [];
|
|
47913
|
+
}
|
|
47914
|
+
function resolveAccount(cfg, accountId) {
|
|
47915
|
+
const av = cfg?.channels?.agentvault ?? {};
|
|
47916
|
+
const id = accountId ?? "default";
|
|
47917
|
+
if (av.accounts && typeof av.accounts === "object") {
|
|
47918
|
+
const acct = av.accounts[id];
|
|
47919
|
+
if (!acct) {
|
|
47920
|
+
return {
|
|
47921
|
+
accountId: id,
|
|
47922
|
+
dataDir: "",
|
|
47923
|
+
apiUrl: av.apiUrl ?? DEFAULT_API_URL,
|
|
47924
|
+
agentName: id,
|
|
47925
|
+
httpPort: DEFAULT_HTTP_PORT,
|
|
47926
|
+
configured: false
|
|
47927
|
+
};
|
|
47928
|
+
}
|
|
47929
|
+
let httpPort = acct.httpPort;
|
|
47930
|
+
if (httpPort == null) {
|
|
47931
|
+
const keys = Object.keys(av.accounts);
|
|
47932
|
+
const index = keys.indexOf(id);
|
|
47933
|
+
httpPort = DEFAULT_HTTP_PORT + (index >= 0 ? index : 0);
|
|
47934
|
+
}
|
|
47935
|
+
return {
|
|
47936
|
+
accountId: id,
|
|
47937
|
+
dataDir: acct.dataDir ?? "",
|
|
47938
|
+
apiUrl: acct.apiUrl ?? av.apiUrl ?? DEFAULT_API_URL,
|
|
47939
|
+
agentName: acct.agentName ?? id,
|
|
47940
|
+
httpPort,
|
|
47941
|
+
configured: Boolean(acct.dataDir)
|
|
47942
|
+
};
|
|
47943
|
+
}
|
|
47944
|
+
return {
|
|
47945
|
+
accountId: id,
|
|
47946
|
+
dataDir: av.dataDir ?? "~/.openclaw/agentvault",
|
|
47947
|
+
apiUrl: av.apiUrl ?? DEFAULT_API_URL,
|
|
47948
|
+
agentName: av.agentName ?? "OpenClaw Agent",
|
|
47949
|
+
httpPort: av.httpPort ?? DEFAULT_HTTP_PORT,
|
|
47950
|
+
configured: Boolean(av.dataDir)
|
|
47951
|
+
};
|
|
47952
|
+
}
|
|
47953
|
+
|
|
47903
47954
|
// src/openclaw-plugin.ts
|
|
47904
47955
|
import { resolve } from "node:path";
|
|
47905
47956
|
var _ocRuntime = null;
|
|
@@ -47924,21 +47975,8 @@ var agentVaultPlugin = {
|
|
|
47924
47975
|
chatTypes: ["direct"]
|
|
47925
47976
|
},
|
|
47926
47977
|
config: {
|
|
47927
|
-
listAccountIds
|
|
47928
|
-
|
|
47929
|
-
return av?.dataDir ? ["default"] : [];
|
|
47930
|
-
},
|
|
47931
|
-
resolveAccount: (cfg, accountId) => {
|
|
47932
|
-
const av = cfg?.channels?.agentvault ?? {};
|
|
47933
|
-
return {
|
|
47934
|
-
accountId: accountId ?? "default",
|
|
47935
|
-
dataDir: av.dataDir ?? "~/.openclaw/agentvault",
|
|
47936
|
-
apiUrl: av.apiUrl ?? "https://api.agentvault.chat",
|
|
47937
|
-
agentName: av.agentName ?? "OpenClaw Agent",
|
|
47938
|
-
httpPort: av.httpPort ?? 18790,
|
|
47939
|
-
configured: Boolean(av.dataDir)
|
|
47940
|
-
};
|
|
47941
|
-
}
|
|
47978
|
+
listAccountIds,
|
|
47979
|
+
resolveAccount
|
|
47942
47980
|
},
|
|
47943
47981
|
gateway: {
|
|
47944
47982
|
startAccount: async (ctx) => {
|
|
@@ -48151,13 +48189,15 @@ async function checkGateway(options) {
|
|
|
48151
48189
|
}
|
|
48152
48190
|
|
|
48153
48191
|
// src/index.ts
|
|
48154
|
-
var VERSION = "0.
|
|
48192
|
+
var VERSION = "0.11.0";
|
|
48155
48193
|
export {
|
|
48156
48194
|
SecureChannel,
|
|
48157
48195
|
VERSION,
|
|
48158
48196
|
agentVaultPlugin,
|
|
48159
48197
|
checkGateway,
|
|
48160
48198
|
getActiveChannel,
|
|
48199
|
+
listAccountIds,
|
|
48200
|
+
resolveAccount,
|
|
48161
48201
|
sendToOwner,
|
|
48162
48202
|
setOcRuntime
|
|
48163
48203
|
};
|