@agentvault/agentvault 0.14.13 → 0.14.14
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/README.md +58 -190
- package/dist/__tests__/install-plugin.test.d.ts +2 -0
- package/dist/__tests__/install-plugin.test.d.ts.map +1 -0
- package/dist/cli.js +855 -494
- package/dist/cli.js.map +4 -4
- package/dist/create-agent.d.ts.map +1 -1
- package/dist/doctor.d.ts +41 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/index.js +0 -76
- package/dist/index.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/channel.js +0 -2257
- package/dist/channel.js.map +0 -1
- package/dist/crypto-helpers.js +0 -4
- package/dist/crypto-helpers.js.map +0 -1
- package/dist/openclaw-plugin.js +0 -222
- package/dist/openclaw-plugin.js.map +0 -1
- package/dist/setup.js +0 -329
- package/dist/setup.js.map +0 -1
- package/dist/state.js +0 -61
- package/dist/state.js.map +0 -1
- package/dist/transport.js +0 -43
- package/dist/transport.js.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-agent.d.ts","sourceRoot":"","sources":["../src/create-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,wDAAwD;AACxD,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAIpD;AA4BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,SAAQ,GAAG,MAAM,CAInE;AAOD,yDAAyD;AACzD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8C3E;AAID,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+
|
|
1
|
+
{"version":3,"file":"create-agent.d.ts","sourceRoot":"","sources":["../src/create-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,wDAAwD;AACxD,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAIpD;AA4BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,SAAQ,GAAG,MAAM,CAInE;AAOD,yDAAyD;AACzD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8C3E;AAID,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+LjF"}
|
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,C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|
45102
45102
|
/\bghp_[a-zA-Z0-9]{36,}\b/g,
|
|
45103
45103
|
/\bglpat-[a-zA-Z0-9_-]{20,}\b/g,
|
|
45104
45104
|
/\bxoxb-[0-9]+-[0-9]+-[a-zA-Z0-9]+\b/g
|
|
45105
|
-
],
|
|
45106
|
-
prompt_injection: [
|
|
45107
|
-
/\bignore\s+(?:all\s+)?(?:previous|above|prior)\s+instructions\b/gi,
|
|
45108
|
-
/\byou\s+are\s+now\s+(?:a|an)\s+/gi,
|
|
45109
|
-
/\bsystem\s*:\s*you\b/gi,
|
|
45110
|
-
/\bDAN\s+mode\b/gi,
|
|
45111
|
-
/\bdo\s+anything\s+now\b/gi,
|
|
45112
|
-
/\bdo\s+not\s+follow\s+any\s+(?:other\s+)?rules\b/gi,
|
|
45113
|
-
/\bjailbreak\b/gi
|
|
45114
|
-
],
|
|
45115
|
-
shell_injection: [
|
|
45116
|
-
/\bcurl\s+.*\|\s*(?:sh|bash|zsh)\b/gi,
|
|
45117
|
-
/\beval\s*\(/gi,
|
|
45118
|
-
/\bexec\s*\(/gi,
|
|
45119
|
-
/\bchmod\s+\+x\b/gi,
|
|
45120
|
-
/\brm\s+-rf\s+\//gi
|
|
45121
45105
|
]
|
|
45122
45106
|
};
|
|
45123
45107
|
ScanEngine = class {
|
|
@@ -45229,24 +45213,6 @@ var init_scan_engine = __esm({
|
|
|
45229
45213
|
}
|
|
45230
45214
|
return false;
|
|
45231
45215
|
}
|
|
45232
|
-
if (builtinId === "prompt_injection") {
|
|
45233
|
-
const patterns = BUILTIN_PATTERNS.prompt_injection;
|
|
45234
|
-
for (const p2 of patterns) {
|
|
45235
|
-
const regex = new RegExp(p2.source, p2.flags);
|
|
45236
|
-
if (regex.test(text))
|
|
45237
|
-
return true;
|
|
45238
|
-
}
|
|
45239
|
-
return false;
|
|
45240
|
-
}
|
|
45241
|
-
if (builtinId === "shell_injection") {
|
|
45242
|
-
const patterns = BUILTIN_PATTERNS.shell_injection;
|
|
45243
|
-
for (const p2 of patterns) {
|
|
45244
|
-
const regex = new RegExp(p2.source, p2.flags);
|
|
45245
|
-
if (regex.test(text))
|
|
45246
|
-
return true;
|
|
45247
|
-
}
|
|
45248
|
-
return false;
|
|
45249
|
-
}
|
|
45250
45216
|
return false;
|
|
45251
45217
|
}
|
|
45252
45218
|
_buildMatchSummary(rule) {
|
|
@@ -45266,48 +45232,6 @@ var init_scan_engine = __esm({
|
|
|
45266
45232
|
_escapeRegex(str) {
|
|
45267
45233
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
45268
45234
|
}
|
|
45269
|
-
/**
|
|
45270
|
-
* Scan a workspace file (e.g. SOUL.md) against all builtin patterns.
|
|
45271
|
-
* Runs api_keys, pii_*, prompt_injection, and shell_injection checks
|
|
45272
|
-
* regardless of rule direction.
|
|
45273
|
-
*/
|
|
45274
|
-
static scanWorkspaceFile(content) {
|
|
45275
|
-
const violations = [];
|
|
45276
|
-
let blocked = false;
|
|
45277
|
-
let flagged = false;
|
|
45278
|
-
const checks = [
|
|
45279
|
-
{ id: "api_keys", action: "block" },
|
|
45280
|
-
{ id: "prompt_injection", action: "block" },
|
|
45281
|
-
{ id: "shell_injection", action: "block" },
|
|
45282
|
-
{ id: "pii_ssn", action: "flag" },
|
|
45283
|
-
{ id: "pii_credit_card", action: "flag" },
|
|
45284
|
-
{ id: "pii_email", action: "flag" }
|
|
45285
|
-
];
|
|
45286
|
-
for (const check of checks) {
|
|
45287
|
-
const patterns = BUILTIN_PATTERNS[check.id];
|
|
45288
|
-
if (!patterns)
|
|
45289
|
-
continue;
|
|
45290
|
-
for (const p2 of patterns) {
|
|
45291
|
-
const regex = new RegExp(p2.source, p2.flags);
|
|
45292
|
-
if (regex.test(content)) {
|
|
45293
|
-
violations.push({
|
|
45294
|
-
rule_id: `workspace_${check.id}`,
|
|
45295
|
-
rule_name: check.id,
|
|
45296
|
-
action: check.action,
|
|
45297
|
-
scanner_type: "builtin",
|
|
45298
|
-
match_summary: `builtin:${check.id}`
|
|
45299
|
-
});
|
|
45300
|
-
if (check.action === "block")
|
|
45301
|
-
blocked = true;
|
|
45302
|
-
if (check.action === "flag")
|
|
45303
|
-
flagged = true;
|
|
45304
|
-
break;
|
|
45305
|
-
}
|
|
45306
|
-
}
|
|
45307
|
-
}
|
|
45308
|
-
const status = blocked ? "blocked" : flagged ? "flagged" : "clean";
|
|
45309
|
-
return { status, violations };
|
|
45310
|
-
}
|
|
45311
45235
|
};
|
|
45312
45236
|
}
|
|
45313
45237
|
});
|