@agentvault/agentvault 0.19.50 → 0.19.51
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 +1816 -1023
- package/dist/cli.js.map +4 -4
- package/dist/index.js +1822 -1029
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/dist/__tests__/crypto-helpers.test.d.ts +0 -2
- package/dist/__tests__/crypto-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/functional.test.d.ts +0 -21
- package/dist/__tests__/functional.test.d.ts.map +0 -1
- package/dist/__tests__/multi-session.test.d.ts +0 -2
- package/dist/__tests__/multi-session.test.d.ts.map +0 -1
- package/dist/__tests__/state.test.d.ts +0 -2
- package/dist/__tests__/state.test.d.ts.map +0 -1
- package/dist/__tests__/transport.test.d.ts +0 -2
- package/dist/__tests__/transport.test.d.ts.map +0 -1
- package/dist/_cp.d.ts +0 -10
- package/dist/_cp.d.ts.map +0 -1
- package/dist/account-config.d.ts +0 -20
- package/dist/account-config.d.ts.map +0 -1
- package/dist/channel.d.ts +0 -396
- package/dist/channel.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/create-agent.d.ts +0 -28
- package/dist/create-agent.d.ts.map +0 -1
- package/dist/credential-store.d.ts +0 -62
- package/dist/credential-store.d.ts.map +0 -1
- package/dist/crypto-helpers.d.ts +0 -2
- package/dist/crypto-helpers.d.ts.map +0 -1
- package/dist/doctor.d.ts +0 -41
- package/dist/doctor.d.ts.map +0 -1
- package/dist/fetch-interceptor.d.ts +0 -32
- package/dist/fetch-interceptor.d.ts.map +0 -1
- package/dist/gateway-send.d.ts +0 -98
- package/dist/gateway-send.d.ts.map +0 -1
- package/dist/http-handlers.d.ts +0 -53
- package/dist/http-handlers.d.ts.map +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp-handlers.d.ts +0 -26
- package/dist/mcp-handlers.d.ts.map +0 -1
- package/dist/mcp-proxy-helpers.d.ts +0 -9
- package/dist/mcp-proxy-helpers.d.ts.map +0 -1
- package/dist/mcp-server.d.ts +0 -91
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mls-state.d.ts +0 -16
- package/dist/mls-state.d.ts.map +0 -1
- package/dist/openclaw-compat.d.ts +0 -33
- package/dist/openclaw-compat.d.ts.map +0 -1
- package/dist/openclaw-entry.d.ts +0 -32
- package/dist/openclaw-entry.d.ts.map +0 -1
- package/dist/openclaw-plugin.d.ts +0 -102
- package/dist/openclaw-plugin.d.ts.map +0 -1
- package/dist/openclaw-types.d.ts +0 -186
- package/dist/openclaw-types.d.ts.map +0 -1
- package/dist/policy-enforcer.d.ts +0 -78
- package/dist/policy-enforcer.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -27
- package/dist/setup.d.ts.map +0 -1
- package/dist/skill-invoker.d.ts +0 -30
- package/dist/skill-invoker.d.ts.map +0 -1
- package/dist/skill-manifest.d.ts +0 -30
- package/dist/skill-manifest.d.ts.map +0 -1
- package/dist/skill-telemetry.d.ts +0 -36
- package/dist/skill-telemetry.d.ts.map +0 -1
- package/dist/skills-publish.d.ts +0 -8
- package/dist/skills-publish.d.ts.map +0 -1
- package/dist/state.d.ts +0 -32
- package/dist/state.d.ts.map +0 -1
- package/dist/transport.d.ts +0 -24
- package/dist/transport.d.ts.map +0 -1
- package/dist/types.d.ts +0 -419
- package/dist/types.d.ts.map +0 -1
- package/dist/workspace-handlers.d.ts +0 -62
- package/dist/workspace-handlers.d.ts.map +0 -1
package/dist/doctor.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentVault "doctor" command — diagnostic checks and plist fixer.
|
|
3
|
-
*
|
|
4
|
-
* Detects stale macOS LaunchAgent plist paths (common after pnpm updates)
|
|
5
|
-
* and offers to install a stable wrapper script so future updates don't
|
|
6
|
-
* break the gateway.
|
|
7
|
-
*
|
|
8
|
-
* Usage: npx @agentvault/agentvault doctor [--fix]
|
|
9
|
-
*/
|
|
10
|
-
export type CheckStatus = "pass" | "warn" | "fail" | "skip";
|
|
11
|
-
export interface CheckResult {
|
|
12
|
-
name: string;
|
|
13
|
-
status: CheckStatus;
|
|
14
|
-
message: string;
|
|
15
|
-
}
|
|
16
|
-
export interface PlistInfo {
|
|
17
|
-
plistPath: string;
|
|
18
|
-
programArgs: string[];
|
|
19
|
-
stalePaths: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface PlistValidationResult {
|
|
22
|
-
status: "ok" | "stale" | "missing" | "skip" | "already-fixed";
|
|
23
|
-
plistPath?: string;
|
|
24
|
-
stalePaths?: string[];
|
|
25
|
-
}
|
|
26
|
-
export declare function checkOpenClawInstalled(): CheckResult;
|
|
27
|
-
export declare function checkConfigExists(home: string): CheckResult;
|
|
28
|
-
export declare function checkAgentVaultChannel(config: any): CheckResult;
|
|
29
|
-
export declare function checkPluginsAllow(config: any): CheckResult;
|
|
30
|
-
export declare function checkPlist(): CheckResult;
|
|
31
|
-
export declare function checkGatewayPort(): CheckResult;
|
|
32
|
-
export declare function checkAgentDataDirs(config: any): CheckResult;
|
|
33
|
-
export declare function checkPm2Status(): CheckResult;
|
|
34
|
-
export declare function plistPath(): string;
|
|
35
|
-
export declare function parsePlist(plistFile: string): PlistInfo | null;
|
|
36
|
-
export declare function validatePlist(): PlistValidationResult;
|
|
37
|
-
export declare function applyPlistFix(info: PlistInfo): boolean;
|
|
38
|
-
export declare function runDoctorCommand(options?: {
|
|
39
|
-
fix?: boolean;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,G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}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export interface HttpCallReport {
|
|
2
|
-
method: string;
|
|
3
|
-
url: string;
|
|
4
|
-
statusCode: number;
|
|
5
|
-
latencyMs: number;
|
|
6
|
-
traceId?: string;
|
|
7
|
-
parentSpanId?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface TraceContext {
|
|
10
|
-
traceId: string;
|
|
11
|
-
parentSpanId: string;
|
|
12
|
-
}
|
|
13
|
-
export interface FetchInterceptorOptions {
|
|
14
|
-
onHttpCall: (report: HttpCallReport) => void;
|
|
15
|
-
skipPatterns?: RegExp[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Install HTTP interceptor using both undici diagnostics channels and
|
|
19
|
-
* globalThis.fetch monkey-patching. Idempotent.
|
|
20
|
-
*/
|
|
21
|
-
export declare function installFetchInterceptor(opts: FetchInterceptorOptions): void;
|
|
22
|
-
/**
|
|
23
|
-
* Uninstall all interceptors. Safe to call even if not installed.
|
|
24
|
-
*/
|
|
25
|
-
export declare function uninstallFetchInterceptor(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Run an async function with trace context attached via AsyncLocalStorage.
|
|
28
|
-
* Any HTTP calls made within `fn` (via undici or fetch) will include
|
|
29
|
-
* traceId/parentSpanId in their HttpCallReport.
|
|
30
|
-
*/
|
|
31
|
-
export declare function runWithTraceContext<T>(ctx: TraceContext, fn: () => T | Promise<T>): Promise<T>;
|
|
32
|
-
//# sourceMappingURL=fetch-interceptor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-interceptor.d.ts","sourceRoot":"","sources":["../src/fetch-interceptor.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AA0CD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAmK3E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAkBhD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,YAAY,EACjB,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
package/dist/gateway-send.d.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gateway send helper — lets agents send messages to their owner
|
|
3
|
-
* via the plugin's local HTTP server (port 18790) or OpenClaw managed routes.
|
|
4
|
-
*
|
|
5
|
-
* Delivery path: sendToOwner() → plugin HTTP /send → SecureChannel.send()
|
|
6
|
-
* → Double Ratchet encrypt → WebSocket → backend → owner's app
|
|
7
|
-
*/
|
|
8
|
-
export interface GatewaySendOptions {
|
|
9
|
-
/** Override the gateway port (default: env GATEWAY_SEND_PORT or 18790) */
|
|
10
|
-
port?: number;
|
|
11
|
-
/** Override the gateway host (default: 127.0.0.1) */
|
|
12
|
-
host?: string;
|
|
13
|
-
/** AbortSignal for cancellation */
|
|
14
|
-
signal?: AbortSignal;
|
|
15
|
-
}
|
|
16
|
-
export interface GatewaySendResult {
|
|
17
|
-
ok: boolean;
|
|
18
|
-
error?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface GatewayStatusResult {
|
|
21
|
-
ok: boolean;
|
|
22
|
-
state?: string;
|
|
23
|
-
deviceId?: string;
|
|
24
|
-
sessions?: number;
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Send a plaintext message to the agent's owner via the gateway HTTP server.
|
|
29
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
30
|
-
*/
|
|
31
|
-
export declare function sendToOwner(text: string, options?: GatewaySendOptions): Promise<GatewaySendResult>;
|
|
32
|
-
/**
|
|
33
|
-
* Send a decision request to the agent's owner via the gateway HTTP server.
|
|
34
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
35
|
-
*/
|
|
36
|
-
export declare function sendDecisionToOwner(request: {
|
|
37
|
-
title: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
options: Array<{
|
|
40
|
-
option_id: string;
|
|
41
|
-
label: string;
|
|
42
|
-
risk_level?: string;
|
|
43
|
-
is_default?: boolean;
|
|
44
|
-
}>;
|
|
45
|
-
context_refs?: Array<{
|
|
46
|
-
type: string;
|
|
47
|
-
uri: string;
|
|
48
|
-
label: string;
|
|
49
|
-
}>;
|
|
50
|
-
deadline?: string;
|
|
51
|
-
auto_action?: {
|
|
52
|
-
option_id: string;
|
|
53
|
-
trigger: string;
|
|
54
|
-
description?: string;
|
|
55
|
-
};
|
|
56
|
-
}, options?: GatewaySendOptions): Promise<GatewaySendResult & {
|
|
57
|
-
decision_id?: string;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Send a plaintext message to a specific room via the gateway HTTP server.
|
|
61
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
62
|
-
*/
|
|
63
|
-
export declare function sendToRoom(roomId: string, text: string, options?: GatewaySendOptions): Promise<GatewaySendResult>;
|
|
64
|
-
/**
|
|
65
|
-
* Send a plaintext message to any target via the gateway HTTP server.
|
|
66
|
-
* Accepts target strings: "owner", "room:<id>", "a2a:<addr>", "context".
|
|
67
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
68
|
-
*/
|
|
69
|
-
export declare function sendToTarget(target: string, text: string, options?: GatewaySendOptions): Promise<GatewaySendResult & {
|
|
70
|
-
destination?: {
|
|
71
|
-
kind: string;
|
|
72
|
-
id?: string;
|
|
73
|
-
};
|
|
74
|
-
}>;
|
|
75
|
-
/**
|
|
76
|
-
* Discover available delivery targets from the gateway.
|
|
77
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
78
|
-
*/
|
|
79
|
-
export declare function listTargets(options?: GatewaySendOptions): Promise<{
|
|
80
|
-
ok: boolean;
|
|
81
|
-
targets?: Array<{
|
|
82
|
-
kind: string;
|
|
83
|
-
id: string;
|
|
84
|
-
label: string;
|
|
85
|
-
available: boolean;
|
|
86
|
-
}>;
|
|
87
|
-
context?: {
|
|
88
|
-
kind: string;
|
|
89
|
-
roomId?: string;
|
|
90
|
-
};
|
|
91
|
-
error?: string;
|
|
92
|
-
}>;
|
|
93
|
-
/**
|
|
94
|
-
* Check gateway health / status.
|
|
95
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
96
|
-
*/
|
|
97
|
-
export declare function checkGateway(options?: GatewaySendOptions): Promise<GatewayStatusResult>;
|
|
98
|
-
//# sourceMappingURL=gateway-send.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-send.d.ts","sourceRoot":"","sources":["../src/gateway-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,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IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CA0C9E;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzK;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAoB9B"}
|
package/dist/http-handlers.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracted HTTP handler logic for the AgentVault plugin.
|
|
3
|
-
*
|
|
4
|
-
* These handlers are shared between:
|
|
5
|
-
* 1. The self-managed HTTP server in channel.ts (legacy/fallback path)
|
|
6
|
-
* 2. OpenClaw's registerHttpRoute() managed routes (new path)
|
|
7
|
-
*
|
|
8
|
-
* Both entry points call the same handler functions, ensuring consistent
|
|
9
|
-
* behavior regardless of how the route is served.
|
|
10
|
-
*/
|
|
11
|
-
import type { SecureChannel } from "./channel.js";
|
|
12
|
-
export interface HandlerResult {
|
|
13
|
-
status: number;
|
|
14
|
-
body: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Handle POST /send — send a message (text, file, or room).
|
|
18
|
-
*
|
|
19
|
-
* Routing: explicit target fields only — no silent lastInboundRoomId fallback.
|
|
20
|
-
* - hub_address / a2a_address / channel_id → A2A
|
|
21
|
-
* - room_id → room
|
|
22
|
-
* - target: "context" → resolve from lastInboundRoomId (opt-in)
|
|
23
|
-
* - No target fields → owner (the breaking fix)
|
|
24
|
-
*/
|
|
25
|
-
export declare function handleSendRequest(parsed: Record<string, unknown>, channel: SecureChannel): Promise<HandlerResult>;
|
|
26
|
-
/**
|
|
27
|
-
* Handle POST /action — send an action confirmation.
|
|
28
|
-
*/
|
|
29
|
-
export declare function handleActionRequest(parsed: Record<string, unknown>, channel: SecureChannel): Promise<HandlerResult>;
|
|
30
|
-
/**
|
|
31
|
-
* Handle POST /decision — send a decision request to the owner.
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleDecisionRequest(parsed: Record<string, unknown>, channel: SecureChannel): Promise<HandlerResult>;
|
|
34
|
-
/**
|
|
35
|
-
* Handle GET /status — return channel health info.
|
|
36
|
-
*/
|
|
37
|
-
export declare function handleStatusRequest(channel: SecureChannel): HandlerResult;
|
|
38
|
-
/**
|
|
39
|
-
* Handle GET /targets — return available delivery destinations.
|
|
40
|
-
*/
|
|
41
|
-
export declare function handleTargetsRequest(channel: SecureChannel): HandlerResult;
|
|
42
|
-
/**
|
|
43
|
-
* Handle GET /trust — return the agent's current Trust Gate token state.
|
|
44
|
-
*/
|
|
45
|
-
export declare function handleTrustRequest(channel: SecureChannel): HandlerResult;
|
|
46
|
-
/**
|
|
47
|
-
* Handle GET /mcp-config — return MCP connection config for this agent.
|
|
48
|
-
*
|
|
49
|
-
* Returns JSON suitable for adding to Claude Code, Cursor, or other MCP host
|
|
50
|
-
* configuration files.
|
|
51
|
-
*/
|
|
52
|
-
export declare function handleMcpConfigRequest(agentName: string, port: number, mcpSkillCount: number): HandlerResult;
|
|
53
|
-
//# sourceMappingURL=http-handlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-handlers.d.ts","sourceRoot":"","sources":["../src/http-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAqExB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAmCxB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CA8BxB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAUzE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAW1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,GACrB,aAAa,CAiBf;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,aAAa,CAkBf"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export { SecureChannel } from "./channel.js";
|
|
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, DeliveryTarget, DeliveryContent, DeliveryOptions, DeliveryReceipt, TargetInfo, ActionConfirmation, ArtifactPayload, PolicyAlert, ApprovalRequest, ApprovalResponse, CredentialGrantPayload, CredentialRevokePayload, CredentialAckPayload, CredentialRequestPayload, } from "./types.js";
|
|
3
|
-
export { parseTarget } from "./types.js";
|
|
4
|
-
export { CredentialStore } from "./credential-store.js";
|
|
5
|
-
export type { RenterCredential, CredentialInfo } from "./credential-store.js";
|
|
6
|
-
export { listAccountIds, resolveAccount } from "./account-config.js";
|
|
7
|
-
export type { ResolvedAccount } from "./account-config.js";
|
|
8
|
-
export { agentVaultPlugin, setOcRuntime, getActiveChannel } from "./openclaw-plugin.js";
|
|
9
|
-
export { sendToOwner, sendToRoom, sendToTarget, listTargets, sendDecisionToOwner, checkGateway } from "./gateway-send.js";
|
|
10
|
-
export type { GatewaySendOptions, GatewaySendResult, GatewayStatusResult, } from "./gateway-send.js";
|
|
11
|
-
export { requestHeartbeatNow, onAgentEvent, onSessionTranscriptUpdate } from "./openclaw-compat.js";
|
|
12
|
-
export { isUsingManagedRoutes } from "./openclaw-entry.js";
|
|
13
|
-
export { handleSendRequest, handleActionRequest, handleDecisionRequest, handleStatusRequest, handleTargetsRequest } from "./http-handlers.js";
|
|
14
|
-
export type { HandlerResult } from "./http-handlers.js";
|
|
15
|
-
export { AgentVaultMcpServer } from "./mcp-server.js";
|
|
16
|
-
export type { SkillDefinition, McpServerOpts } from "./mcp-server.js";
|
|
17
|
-
export { createMcpHandler, getMcpStatus } from "./mcp-handlers.js";
|
|
18
|
-
export { parseSkillMd, loadSkillsFromDirectory, loadSkillsFromApi, mergeSkills } from "./skill-manifest.js";
|
|
19
|
-
export type { SkillManifest } from "./skill-manifest.js";
|
|
20
|
-
export { invokeSkill } from "./skill-invoker.js";
|
|
21
|
-
export type { InvocationResult, InvocationOpts } from "./skill-invoker.js";
|
|
22
|
-
export { wrapSkillExecution, reportSkillInvocation, drainSkillSpans } from "./skill-telemetry.js";
|
|
23
|
-
export { PolicyEnforcer } from "./policy-enforcer.js";
|
|
24
|
-
export type { PolicyContext, PolicyResult, PolicyViolation, PolicyMetrics } from "./policy-enforcer.js";
|
|
25
|
-
export type { OpenClawPluginApi, PluginRuntime, ChannelGatewayContext, ChannelOutboundPayloadContext, ReplyPayload, MessageSentEvent, SessionStartEvent, SessionEndEvent, AgentEventPayload, TranscriptUpdatePayload, } from "./openclaw-types.js";
|
|
26
|
-
export declare const VERSION = "0.14.1";
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,E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C;AAG3E,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGlG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGxG,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/dist/mcp-handlers.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP HTTP request handlers — routes /mcp requests to AgentVaultMcpServer.
|
|
3
|
-
*
|
|
4
|
-
* Supports both self-managed HTTP and OpenClaw managed routes.
|
|
5
|
-
*/
|
|
6
|
-
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
7
|
-
import type { AgentVaultMcpServer } from "./mcp-server.js";
|
|
8
|
-
/**
|
|
9
|
-
* Create an HTTP request handler for MCP routes.
|
|
10
|
-
*
|
|
11
|
-
* Routes:
|
|
12
|
-
* POST /mcp — MCP Streamable HTTP messages
|
|
13
|
-
* GET /mcp — MCP SSE stream (for server-initiated messages)
|
|
14
|
-
* DELETE /mcp — Close MCP session
|
|
15
|
-
*
|
|
16
|
-
* All other paths are passed through to the next handler.
|
|
17
|
-
*/
|
|
18
|
-
export declare function createMcpHandler(mcpServer: AgentVaultMcpServer | null, basePath?: string): (req: IncomingMessage, res: ServerResponse, next?: () => void) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Build a status object with MCP info for the /status endpoint.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getMcpStatus(mcpServer: AgentVaultMcpServer | null): {
|
|
23
|
-
mcp_enabled: boolean;
|
|
24
|
-
mcp_skills_count: number;
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=mcp-handlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-handlers.d.ts","sourceRoot":"","sources":["../src/mcp-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,mBAAmB,GAAG,IAAI,EACrC,QAAQ,GAAE,MAAe,GACxB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CA0BxE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,mBAAmB,GAAG,IAAI,GACpC;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAQpD"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AgentVaultMcpServer } from "./mcp-server.js";
|
|
2
|
-
/**
|
|
3
|
-
* Forward a JSON-RPC payload to the MCP server by creating synthetic
|
|
4
|
-
* HTTP request/response objects that the Streamable HTTP transport expects.
|
|
5
|
-
*
|
|
6
|
-
* Returns the MCP server's JSON-RPC response.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createMcpProxyRequest(mcpServer: AgentVaultMcpServer, payload: unknown): Promise<unknown>;
|
|
9
|
-
//# sourceMappingURL=mcp-proxy-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy-helpers.d.ts","sourceRoot":"","sources":["../src/mcp-proxy-helpers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAqDlB"}
|
package/dist/mcp-server.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
-
export interface SkillDefinition {
|
|
3
|
-
name: string;
|
|
4
|
-
version?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
/** JSON Schema for the tool input (not Zod — raw JSON Schema object). */
|
|
7
|
-
inputSchema?: Record<string, unknown>;
|
|
8
|
-
/** Freeform instructions that are surfaced as an MCP prompt. */
|
|
9
|
-
instructions?: string;
|
|
10
|
-
/** SLA definition blob attached to the skill registry resource. */
|
|
11
|
-
slaDefinition?: Record<string, unknown>;
|
|
12
|
-
/** Tags for categorisation. */
|
|
13
|
-
tags?: string[];
|
|
14
|
-
/** Tools/capabilities explicitly allowed for this skill. */
|
|
15
|
-
toolsAllowed?: string[];
|
|
16
|
-
/** Tools/capabilities explicitly denied for this skill. */
|
|
17
|
-
toolsDenied?: string[];
|
|
18
|
-
/** JSON Schema for skill output validation. */
|
|
19
|
-
outputSchema?: Record<string, unknown>;
|
|
20
|
-
/** Model routing strategy: "auto" | "round-robin" | "least-latency". */
|
|
21
|
-
modelRouting?: string;
|
|
22
|
-
/** Allowed LLM models for this skill. */
|
|
23
|
-
allowedModels?: string[];
|
|
24
|
-
/** Default LLM model for this skill. */
|
|
25
|
-
defaultModel?: string;
|
|
26
|
-
/** AgentVault certification tier: "verified" | "certified" | "enterprise". */
|
|
27
|
-
certificationTier?: string;
|
|
28
|
-
/** Integrity configuration (algorithm, hashChain). */
|
|
29
|
-
integrity?: Record<string, unknown>;
|
|
30
|
-
/** Required policy presets (e.g., ["network: agentvault"]). */
|
|
31
|
-
requiredPolicies?: string[];
|
|
32
|
-
}
|
|
33
|
-
export interface McpServerOpts {
|
|
34
|
-
agentName: string;
|
|
35
|
-
apiUrl: string;
|
|
36
|
-
apiKey?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Called when an MCP client invokes a registered skill tool.
|
|
39
|
-
* Receives skill name, args, and the full skill definition (including instructions).
|
|
40
|
-
* Return value is serialised as JSON and sent back as tool output.
|
|
41
|
-
*/
|
|
42
|
-
onInvoke?: (skillName: string, args: Record<string, unknown>, skill: SkillDefinition) => Promise<unknown>;
|
|
43
|
-
}
|
|
44
|
-
export declare class AgentVaultMcpServer {
|
|
45
|
-
private server;
|
|
46
|
-
private skills;
|
|
47
|
-
private opts;
|
|
48
|
-
private initialized;
|
|
49
|
-
constructor(opts: McpServerOpts);
|
|
50
|
-
/**
|
|
51
|
-
* Register a skill that will be exposed as an MCP tool.
|
|
52
|
-
* Must be called *before* `initialize()`.
|
|
53
|
-
*/
|
|
54
|
-
registerSkill(skill: SkillDefinition): void;
|
|
55
|
-
/**
|
|
56
|
-
* Register all skills as MCP tools / resources / prompts.
|
|
57
|
-
* Called lazily on first request if not called explicitly.
|
|
58
|
-
*/
|
|
59
|
-
initialize(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Handle an incoming HTTP request to the /mcp endpoint.
|
|
62
|
-
*
|
|
63
|
-
* Supports the Streamable HTTP transport protocol:
|
|
64
|
-
* - POST for JSON-RPC messages
|
|
65
|
-
* - GET for SSE notification stream
|
|
66
|
-
* - DELETE for session close
|
|
67
|
-
*
|
|
68
|
-
* Each request gets a fresh stateless transport; after the response is
|
|
69
|
-
* flushed the transport + underlying protocol connection are torn down
|
|
70
|
-
* so the single McpServer instance is ready for the next caller.
|
|
71
|
-
*
|
|
72
|
-
* Local requests from 127.0.0.1/::1 bypass SPT validation (owner access).
|
|
73
|
-
*/
|
|
74
|
-
handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Register a single skill as an MCP tool.
|
|
77
|
-
*
|
|
78
|
-
* The MCP SDK's `tool()` overloads that accept a schema expect Zod types.
|
|
79
|
-
* Since our skill definitions use raw JSON Schema we register without
|
|
80
|
-
* schema validation (name + description + handler) and let the handler
|
|
81
|
-
* receive the raw args object.
|
|
82
|
-
*/
|
|
83
|
-
private registerToolForSkill;
|
|
84
|
-
/**
|
|
85
|
-
* Validate a Service Provider Token against the AgentVault backend.
|
|
86
|
-
*/
|
|
87
|
-
private validateSpt;
|
|
88
|
-
get skillCount(): number;
|
|
89
|
-
get isInitialized(): boolean;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=mcp-server.d.ts.map
|
package/dist/mcp-server.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAIhB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,aAAa,CAA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|
|
3
|
-
* State is an opaque serialized string from MLSGroupManager.exportState().
|
|
4
|
-
*/
|
|
5
|
-
export declare function saveMlsState(dataDir: string, groupId: string, state: string): Promise<void>;
|
|
6
|
-
/**
|
|
7
|
-
* Load MLS group state from a per-group file.
|
|
8
|
-
* Returns null if the file doesn't exist (first join or after re-join cleanup).
|
|
9
|
-
*/
|
|
10
|
-
export declare function loadMlsState(dataDir: string, groupId: string): Promise<string | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Delete MLS group state file.
|
|
13
|
-
* Used when re-joining a group (old state is invalid after re-join).
|
|
14
|
-
*/
|
|
15
|
-
export declare function deleteMlsState(dataDir: string, groupId: string): Promise<void>;
|
|
16
|
-
//# sourceMappingURL=mls-state.d.ts.map
|
package/dist/mls-state.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mls-state.d.ts","sourceRoot":"","sources":["../src/mls-state.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOxB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenClaw SDK compatibility layer — dynamic import wrappers with caching.
|
|
3
|
-
*
|
|
4
|
-
* Each wrapper attempts to import a deep SDK module at runtime. If the import
|
|
5
|
-
* fails (older gateway, missing SDK), the function returns a no-op result.
|
|
6
|
-
* Results are cached after the first attempt.
|
|
7
|
-
*
|
|
8
|
-
* IMPORTANT: All imports are guarded by try/catch — the plugin degrades
|
|
9
|
-
* gracefully on older OpenClaw versions.
|
|
10
|
-
*/
|
|
11
|
-
import type { AgentEventPayload, TranscriptUpdatePayload } from "./openclaw-types.js";
|
|
12
|
-
/**
|
|
13
|
-
* Request an immediate heartbeat wake from the OpenClaw gateway.
|
|
14
|
-
* Returns true if the heartbeat API was available and called, false otherwise.
|
|
15
|
-
* Never throws.
|
|
16
|
-
*/
|
|
17
|
-
export declare function requestHeartbeatNow(opts?: {
|
|
18
|
-
reason?: string;
|
|
19
|
-
}): Promise<boolean>;
|
|
20
|
-
type AgentEventCallback = (event: AgentEventPayload) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Subscribe to agent-level events (tool_use, reasoning_complete, error, etc.).
|
|
23
|
-
* Returns an unsubscribe function, or a no-op if the API is unavailable.
|
|
24
|
-
*/
|
|
25
|
-
export declare function onAgentEvent(callback: AgentEventCallback): Promise<() => void>;
|
|
26
|
-
type TranscriptCallback = (update: TranscriptUpdatePayload) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Subscribe to session transcript updates for behavioral analysis.
|
|
29
|
-
* Returns an unsubscribe function, or a no-op if the API is unavailable.
|
|
30
|
-
*/
|
|
31
|
-
export declare function onSessionTranscriptUpdate(callback: TranscriptCallback): Promise<() => void>;
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=openclaw-compat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-compat.d.ts","sourceRoot":"","sources":["../src/openclaw-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAQtF;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAmBtF;AAMD,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAG7D;;;GAGG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAkBpF;AAMD,KAAK,kBAAkB,GAAG,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;AAGpE;;;GAGG;AACH,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAkBjG"}
|
package/dist/openclaw-entry.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenClaw channel plugin entry point.
|
|
3
|
-
*
|
|
4
|
-
* Intentionally thin — no heavy imports (libsodium etc.) at module load time.
|
|
5
|
-
* SecureChannel is dynamically imported inside gateway.startAccount (already async)
|
|
6
|
-
* so libsodium's top-level await never runs during plugin registration.
|
|
7
|
-
*
|
|
8
|
-
* Loaded by OpenClaw via the `openclaw.extensions` field in package.json.
|
|
9
|
-
*/
|
|
10
|
-
import type { OpenClawPluginApi } from "./openclaw-types.js";
|
|
11
|
-
/** Whether OpenClaw managed HTTP routes are active (vs self-managed server). */
|
|
12
|
-
export declare let isUsingManagedRoutes: boolean;
|
|
13
|
-
/** Extract @mention names from plaintext. Returns lowercased names. */
|
|
14
|
-
declare function _parseMentions(text: string): string[];
|
|
15
|
-
/** Determine whether this agent should process a room message based on @mentions and sender type.
|
|
16
|
-
*
|
|
17
|
-
* Loop prevention is handled by the rate limiter (_roomCanReply: 4 replies/60s
|
|
18
|
-
* with 2min cooldown), so we no longer gate on senderIsAgent. All messages
|
|
19
|
-
* are processed unless they @mention a *different* agent specifically.
|
|
20
|
-
*/
|
|
21
|
-
declare function _shouldProcessRoomMessage(plaintext: string, agentName: string, accountId: string, _senderIsAgent?: boolean): boolean;
|
|
22
|
-
/** Strip the matching @mention prefix from plaintext so the agent sees clean text. */
|
|
23
|
-
declare function _stripMentions(text: string, agentName: string, accountId: string): string;
|
|
24
|
-
export { _parseMentions, _shouldProcessRoomMessage, _stripMentions };
|
|
25
|
-
declare const _default: {
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
description: string;
|
|
29
|
-
register(api: OpenClawPluginApi): void;
|
|
30
|
-
};
|
|
31
|
-
export default _default;
|
|
32
|
-
//# sourceMappingURL=openclaw-entry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-entry.d.ts","sourceRoot":"","sources":["../src/openclaw-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,KAAK,EACV,iBAAiB,EASlB,MAAM,qBAAqB,CAAC;AA4D7B,gFAAgF;AAChF,eAAO,IAAI,oBAAoB,SAAQ,CAAC;AA+CxC,uEAAuE;AACvE,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS9C;AAED;;;;;GAKG;AACH,iBAAS,yBAAyB,CAChC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAgBT;AAED,sFAAsF;AACtF,iBAAS,cAAc,CACrB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAiBR;AAkkCD,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,cAAc,EAAE,CAAC;;;;;kBAQrD,iBAAiB;;AAJjC,wBA+WE"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentVault OpenClaw Channel Plugin
|
|
3
|
-
*
|
|
4
|
-
* Registers AgentVault as a first-class OpenClaw messaging channel.
|
|
5
|
-
* Messages from the AgentVault UI are decrypted and routed into the
|
|
6
|
-
* OpenClaw agent loop; agent replies are encrypted and sent back.
|
|
7
|
-
*
|
|
8
|
-
* Installation (one-time):
|
|
9
|
-
* npx @agentvault/agentvault setup --token=av_tok_...
|
|
10
|
-
*
|
|
11
|
-
* After setup, restart OpenClaw — no further configuration needed.
|
|
12
|
-
*/
|
|
13
|
-
import { SecureChannel } from "./channel.js";
|
|
14
|
-
import { listAccountIds, resolveAccount, type ResolvedAccount } from "./account-config.js";
|
|
15
|
-
import type { PluginRuntime, ChannelGatewayContext, ChannelOutboundPayloadContext } from "./openclaw-types.js";
|
|
16
|
-
export declare function setOcRuntime(runtime: PluginRuntime): void;
|
|
17
|
-
export declare function getActiveChannel(accountId?: string): SecureChannel | undefined;
|
|
18
|
-
export declare const agentVaultPlugin: {
|
|
19
|
-
id: string;
|
|
20
|
-
meta: {
|
|
21
|
-
id: string;
|
|
22
|
-
label: string;
|
|
23
|
-
selectionLabel: string;
|
|
24
|
-
docsPath: string;
|
|
25
|
-
blurb: string;
|
|
26
|
-
aliases: string[];
|
|
27
|
-
};
|
|
28
|
-
capabilities: {
|
|
29
|
-
chatTypes: string[];
|
|
30
|
-
};
|
|
31
|
-
config: {
|
|
32
|
-
listAccountIds: typeof listAccountIds;
|
|
33
|
-
resolveAccount: typeof resolveAccount;
|
|
34
|
-
};
|
|
35
|
-
gateway: {
|
|
36
|
-
/** Health probe for `openclaw channels status --probe` */
|
|
37
|
-
probe: (ctx: any) => Promise<{
|
|
38
|
-
ok: boolean;
|
|
39
|
-
status: string;
|
|
40
|
-
error: string;
|
|
41
|
-
deviceId?: undefined;
|
|
42
|
-
sessions?: undefined;
|
|
43
|
-
} | {
|
|
44
|
-
ok: boolean;
|
|
45
|
-
status: import("./types.js").ChannelState;
|
|
46
|
-
deviceId: string | undefined;
|
|
47
|
-
sessions: number;
|
|
48
|
-
error?: undefined;
|
|
49
|
-
}>;
|
|
50
|
-
/** Status for `openclaw health --json` per-channel summary */
|
|
51
|
-
status: (ctx: any) => {
|
|
52
|
-
connected: boolean;
|
|
53
|
-
status: string;
|
|
54
|
-
deviceId?: undefined;
|
|
55
|
-
sessions?: undefined;
|
|
56
|
-
encrypted?: undefined;
|
|
57
|
-
} | {
|
|
58
|
-
connected: boolean;
|
|
59
|
-
status: import("./types.js").ChannelState;
|
|
60
|
-
deviceId: string | undefined;
|
|
61
|
-
sessions: number;
|
|
62
|
-
encrypted: boolean;
|
|
63
|
-
};
|
|
64
|
-
startAccount: (ctx: ChannelGatewayContext<ResolvedAccount>) => Promise<{
|
|
65
|
-
stop: () => Promise<void>;
|
|
66
|
-
}>;
|
|
67
|
-
};
|
|
68
|
-
outbound: {
|
|
69
|
-
deliveryMode: "direct";
|
|
70
|
-
targets: {
|
|
71
|
-
id: string;
|
|
72
|
-
label: string;
|
|
73
|
-
accountId: string;
|
|
74
|
-
}[];
|
|
75
|
-
sendText: ({ text, accountId, targetId, }: {
|
|
76
|
-
text: string;
|
|
77
|
-
accountId?: string;
|
|
78
|
-
targetId?: string;
|
|
79
|
-
}) => Promise<{
|
|
80
|
-
ok: boolean;
|
|
81
|
-
error?: string;
|
|
82
|
-
}>;
|
|
83
|
-
sendMedia: ({ text, mediaUrl, accountId, }: {
|
|
84
|
-
to: string;
|
|
85
|
-
text?: string;
|
|
86
|
-
mediaUrl: string;
|
|
87
|
-
accountId?: string;
|
|
88
|
-
}) => Promise<{
|
|
89
|
-
ok: boolean;
|
|
90
|
-
error?: string;
|
|
91
|
-
}>;
|
|
92
|
-
/** Rich payload delivery — OpenClaw v2026.3.2+ */
|
|
93
|
-
sendPayload: (ctx: ChannelOutboundPayloadContext) => Promise<{
|
|
94
|
-
ok: boolean;
|
|
95
|
-
error: string;
|
|
96
|
-
} | {
|
|
97
|
-
ok: boolean;
|
|
98
|
-
error?: undefined;
|
|
99
|
-
}>;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
//# sourceMappingURL=openclaw-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-plugin.d.ts","sourceRoot":"","sources":["../src/openclaw-plugin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