ai-trust 0.2.1 → 0.2.4
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 +91 -61
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +4 -0
- package/dist/api/client.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +13 -38
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +12 -35
- package/dist/commands/check.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/output/formatter.d.ts.map +1 -1
- package/dist/output/formatter.js +47 -3
- package/dist/output/formatter.js.map +1 -1
- package/dist/telemetry/contribute.d.ts +60 -6
- package/dist/telemetry/contribute.d.ts.map +1 -1
- package/dist/telemetry/contribute.js +197 -44
- package/dist/telemetry/contribute.js.map +1 -1
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +2 -2
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/opt-in.d.ts +34 -23
- package/dist/telemetry/opt-in.d.ts.map +1 -1
- package/dist/telemetry/opt-in.js +154 -125
- package/dist/telemetry/opt-in.js.map +1 -1
- package/package.json +6 -1
package/dist/telemetry/opt-in.js
CHANGED
|
@@ -1,26 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Contribution
|
|
2
|
+
* Contribution Consent and Scan Counting
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* with the OpenA2A Registry.
|
|
6
|
-
* scan
|
|
4
|
+
* Manages the user's consent to share anonymized scan findings
|
|
5
|
+
* with the OpenA2A Registry. Uses a delayed consent tip shown
|
|
6
|
+
* after the 3rd scan (non-interactive, no blocking prompts).
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Config/counting is delegated to @opena2a/shared (the canonical
|
|
9
|
+
* source for ~/.opena2a/config.json). If @opena2a/shared is not
|
|
10
|
+
* available at runtime, falls back to a local implementation.
|
|
10
11
|
*/
|
|
11
12
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import { join } from "path";
|
|
14
|
+
/** Resolved backend -- lazy-initialized on first call. */
|
|
15
|
+
let _backend;
|
|
16
|
+
function resolveBackend() {
|
|
17
|
+
if (_backend)
|
|
18
|
+
return _backend;
|
|
19
|
+
// When OPENA2A_HOME is set, always use local backend so the custom
|
|
20
|
+
// home directory is respected (important for testing and isolation).
|
|
21
|
+
if (!process.env.OPENA2A_HOME) {
|
|
22
|
+
try {
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
24
|
+
const shared = require("@opena2a/shared");
|
|
25
|
+
if (typeof shared.isContributeEnabled === "function" &&
|
|
26
|
+
typeof shared.setContributeEnabled === "function" &&
|
|
27
|
+
typeof shared.incrementScanCount === "function" &&
|
|
28
|
+
typeof shared.shouldPromptContribute === "function" &&
|
|
29
|
+
typeof shared.dismissContributePrompt === "function") {
|
|
30
|
+
_backend = {
|
|
31
|
+
isContributeEnabled: shared.isContributeEnabled,
|
|
32
|
+
setContributeEnabled: shared.setContributeEnabled,
|
|
33
|
+
incrementScanCount: shared.incrementScanCount,
|
|
34
|
+
getScanCount: shared.getScanCount || (() => 0),
|
|
35
|
+
shouldPromptContribute: shared.shouldPromptContribute,
|
|
36
|
+
dismissContributePrompt: shared.dismissContributePrompt,
|
|
37
|
+
};
|
|
38
|
+
return _backend;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// @opena2a/shared not installed -- fall through to local backend
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
_backend = createLocalBackend();
|
|
46
|
+
return _backend;
|
|
47
|
+
}
|
|
17
48
|
function getConfigPath() {
|
|
18
|
-
const home = process.env.OPENA2A_HOME || join(homedir(), ".opena2a");
|
|
49
|
+
const home = process.env.OPENA2A_HOME || join(require("os").homedir(), ".opena2a");
|
|
19
50
|
return join(home, "config.json");
|
|
20
51
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Read the OpenA2A config file. Returns empty object if missing or invalid.
|
|
23
|
-
*/
|
|
24
52
|
function readConfig() {
|
|
25
53
|
const configPath = getConfigPath();
|
|
26
54
|
try {
|
|
@@ -29,156 +57,157 @@ function readConfig() {
|
|
|
29
57
|
}
|
|
30
58
|
}
|
|
31
59
|
catch {
|
|
32
|
-
// Corrupt config
|
|
60
|
+
// Corrupt config -- treat as empty
|
|
33
61
|
}
|
|
34
62
|
return {};
|
|
35
63
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Write the OpenA2A config file, preserving existing fields.
|
|
38
|
-
*/
|
|
39
64
|
function writeConfig(config) {
|
|
40
65
|
const configPath = getConfigPath();
|
|
41
|
-
const dir = dirname(configPath);
|
|
66
|
+
const dir = require("path").dirname(configPath);
|
|
42
67
|
mkdirSync(dir, { recursive: true });
|
|
43
68
|
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", {
|
|
44
69
|
mode: 0o600,
|
|
45
70
|
});
|
|
46
71
|
}
|
|
72
|
+
/** Cooldown for the consent tip: 30 days after dismissal. */
|
|
73
|
+
const TIP_COOLDOWN_MS = 30 * 24 * 60 * 60 * 1000;
|
|
74
|
+
function createLocalBackend() {
|
|
75
|
+
return {
|
|
76
|
+
isContributeEnabled() {
|
|
77
|
+
const config = readConfig();
|
|
78
|
+
return config.contribute?.enabled === true;
|
|
79
|
+
},
|
|
80
|
+
setContributeEnabled(enabled) {
|
|
81
|
+
const config = readConfig();
|
|
82
|
+
if (!config.contribute)
|
|
83
|
+
config.contribute = {};
|
|
84
|
+
config.contribute.enabled = enabled;
|
|
85
|
+
writeConfig(config);
|
|
86
|
+
},
|
|
87
|
+
incrementScanCount() {
|
|
88
|
+
const config = readConfig();
|
|
89
|
+
if (!config.telemetry)
|
|
90
|
+
config.telemetry = {};
|
|
91
|
+
config.telemetry.scanCount = (config.telemetry.scanCount ?? 0) + 1;
|
|
92
|
+
writeConfig(config);
|
|
93
|
+
return config.telemetry.scanCount;
|
|
94
|
+
},
|
|
95
|
+
getScanCount() {
|
|
96
|
+
const config = readConfig();
|
|
97
|
+
return config.telemetry?.scanCount ?? 0;
|
|
98
|
+
},
|
|
99
|
+
shouldPromptContribute() {
|
|
100
|
+
const config = readConfig();
|
|
101
|
+
// Already decided -- do not prompt
|
|
102
|
+
if (config.contribute?.enabled === true ||
|
|
103
|
+
config.contribute?.enabled === false) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
const count = config.telemetry?.scanCount ?? 0;
|
|
107
|
+
if (count < 3)
|
|
108
|
+
return false;
|
|
109
|
+
// Check cooldown
|
|
110
|
+
const dismissed = config.telemetry?.contributePromptDismissedAt;
|
|
111
|
+
if (dismissed) {
|
|
112
|
+
const dismissedMs = new Date(dismissed).getTime();
|
|
113
|
+
if (Date.now() - dismissedMs < TIP_COOLDOWN_MS)
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
},
|
|
118
|
+
dismissContributePrompt() {
|
|
119
|
+
const config = readConfig();
|
|
120
|
+
if (!config.telemetry)
|
|
121
|
+
config.telemetry = {};
|
|
122
|
+
config.telemetry.contributePromptDismissedAt = new Date().toISOString();
|
|
123
|
+
writeConfig(config);
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// ---------------------------------------------------------------------------
|
|
128
|
+
// Public API
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
47
130
|
/**
|
|
48
131
|
* Check whether the contribution setting is enabled.
|
|
49
132
|
*
|
|
50
133
|
* Returns:
|
|
51
|
-
* true - user explicitly opted in
|
|
52
|
-
* false - user explicitly opted out
|
|
53
|
-
* undefined - not yet configured
|
|
134
|
+
* true - user explicitly opted in
|
|
135
|
+
* false - user explicitly opted out (or default in shared backend)
|
|
136
|
+
* undefined - not yet configured
|
|
54
137
|
*/
|
|
55
138
|
export function isContributeEnabled() {
|
|
56
|
-
|
|
57
|
-
if (config.contribute?.enabled === true)
|
|
58
|
-
return true;
|
|
59
|
-
if (config.contribute?.enabled === false)
|
|
60
|
-
return false;
|
|
61
|
-
return undefined;
|
|
139
|
+
return resolveBackend().isContributeEnabled() || undefined;
|
|
62
140
|
}
|
|
63
141
|
/**
|
|
64
|
-
* Check whether we should show the contribution
|
|
142
|
+
* Check whether we should show the contribution tip.
|
|
65
143
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* 2. contribute.enabled is undefined and scan count has reached 10 (second chance)
|
|
69
|
-
*
|
|
70
|
-
* Returns false if:
|
|
71
|
-
* - contribute.enabled is explicitly set (true or false)
|
|
72
|
-
* - Non-interactive environment (no TTY)
|
|
73
|
-
* - Already prompted at scan #10
|
|
144
|
+
* Returns true after the 3rd scan if the user hasn't opted in,
|
|
145
|
+
* opted out, or dismissed the tip within the last 30 days.
|
|
74
146
|
*/
|
|
75
147
|
export function shouldPromptContribute() {
|
|
76
|
-
|
|
77
|
-
if (!process.stdin.isTTY || !process.stdout.isTTY)
|
|
78
|
-
return false;
|
|
79
|
-
const config = readConfig();
|
|
80
|
-
// Already configured -- never prompt
|
|
81
|
-
if (config.contribute?.enabled === true ||
|
|
82
|
-
config.contribute?.enabled === false) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
const scanCount = config.contribute?.scanCount ?? 0;
|
|
86
|
-
// First scan (scanCount === 0): prompt
|
|
87
|
-
if (scanCount === 0)
|
|
88
|
-
return true;
|
|
89
|
-
// Tenth scan: prompt once more (second chance)
|
|
90
|
-
if (scanCount >= 9 && !config.contribute?.promptedAtTen)
|
|
91
|
-
return true;
|
|
92
|
-
return false;
|
|
148
|
+
return resolveBackend().shouldPromptContribute();
|
|
93
149
|
}
|
|
94
150
|
/**
|
|
95
|
-
* Increment the scan count
|
|
96
|
-
*
|
|
151
|
+
* Increment the scan count. Called after each scan completes,
|
|
152
|
+
* regardless of contribution setting.
|
|
97
153
|
*/
|
|
98
154
|
export function incrementScanCount() {
|
|
99
|
-
|
|
100
|
-
if (!config.contribute) {
|
|
101
|
-
config.contribute = {};
|
|
102
|
-
}
|
|
103
|
-
config.contribute.scanCount = (config.contribute.scanCount ?? 0) + 1;
|
|
104
|
-
writeConfig(config);
|
|
155
|
+
return resolveBackend().incrementScanCount();
|
|
105
156
|
}
|
|
106
157
|
/**
|
|
107
158
|
* Save the user's contribution choice to the config file.
|
|
108
159
|
*/
|
|
109
160
|
export function saveContributeChoice(enabled) {
|
|
110
|
-
|
|
111
|
-
if (!
|
|
112
|
-
|
|
161
|
+
resolveBackend().setContributeEnabled(enabled);
|
|
162
|
+
if (!enabled) {
|
|
163
|
+
resolveBackend().dismissContributePrompt();
|
|
113
164
|
}
|
|
114
|
-
config.contribute.enabled = enabled;
|
|
115
|
-
// Track that we prompted at scan #10 so we don't ask again
|
|
116
|
-
const scanCount = config.contribute.scanCount ?? 0;
|
|
117
|
-
if (scanCount >= 9) {
|
|
118
|
-
config.contribute.promptedAtTen = true;
|
|
119
|
-
}
|
|
120
|
-
writeConfig(config);
|
|
121
165
|
}
|
|
122
166
|
/**
|
|
123
|
-
*
|
|
167
|
+
* Record a scan and return a consent tip string if the threshold is reached.
|
|
124
168
|
*
|
|
125
|
-
*
|
|
126
|
-
* Returns
|
|
169
|
+
* After the 3rd scan, returns a non-interactive tip encouraging the user
|
|
170
|
+
* to enable contribution. Returns null if tip should not be shown.
|
|
171
|
+
* This replaces the previous interactive Y/N prompt.
|
|
127
172
|
*/
|
|
128
|
-
export
|
|
129
|
-
|
|
173
|
+
export function recordScanAndMaybeShowTip() {
|
|
174
|
+
incrementScanCount();
|
|
175
|
+
if (!shouldPromptContribute())
|
|
176
|
+
return null;
|
|
177
|
+
// Mark as shown so we respect the 30-day cooldown
|
|
178
|
+
resolveBackend().dismissContributePrompt();
|
|
179
|
+
return [
|
|
130
180
|
"",
|
|
131
|
-
"
|
|
181
|
+
" Tip: Your scans help build community trust data for MCP servers and AI agents.",
|
|
182
|
+
" Share anonymized results so other developers can make informed security decisions.",
|
|
183
|
+
" Enable: npx ai-trust check --contribute (or: opena2a config contribute on)",
|
|
132
184
|
"",
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
process.stderr.write("\nContribution enabled. Thank you.\n");
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
process.stderr.write("\nContribution disabled. You can enable it later: opena2a config set contribute true\n");
|
|
185
|
+
].join("\n");
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Display the contribution opt-in prompt and return the user's choice.
|
|
189
|
+
*
|
|
190
|
+
* @deprecated Use recordScanAndMaybeShowTip() instead. This is kept
|
|
191
|
+
* for backward compatibility but now shows a non-interactive tip
|
|
192
|
+
* rather than blocking for input.
|
|
193
|
+
*/
|
|
194
|
+
export async function showContributePrompt() {
|
|
195
|
+
const tip = recordScanAndMaybeShowTip();
|
|
196
|
+
if (tip) {
|
|
197
|
+
process.stdout.write(tip + "\n");
|
|
150
198
|
}
|
|
151
|
-
return
|
|
199
|
+
return false;
|
|
152
200
|
}
|
|
153
201
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
202
|
+
* Reset the backend (for testing).
|
|
203
|
+
* When forceLocal is true, skips @opena2a/shared resolution and uses the
|
|
204
|
+
* local file-based backend. This allows tests to control config via
|
|
205
|
+
* OPENA2A_HOME without the shared backend ignoring that env var.
|
|
156
206
|
*/
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const timer = setTimeout(() => {
|
|
163
|
-
cleanup();
|
|
164
|
-
resolve("n");
|
|
165
|
-
}, 30_000);
|
|
166
|
-
function cleanup() {
|
|
167
|
-
clearTimeout(timer);
|
|
168
|
-
stdin.removeListener("data", onData);
|
|
169
|
-
if (stdin.isRaw !== wasRaw) {
|
|
170
|
-
stdin.setRawMode(wasRaw ?? false);
|
|
171
|
-
}
|
|
172
|
-
stdin.pause();
|
|
173
|
-
}
|
|
174
|
-
function onData(data) {
|
|
175
|
-
const char = data.toString().trim().toLowerCase();
|
|
176
|
-
cleanup();
|
|
177
|
-
resolve(char || "n");
|
|
178
|
-
}
|
|
179
|
-
stdin.setRawMode(true);
|
|
180
|
-
stdin.resume();
|
|
181
|
-
stdin.once("data", onData);
|
|
182
|
-
});
|
|
207
|
+
export function _resetBackend(forceLocal = false) {
|
|
208
|
+
_backend = undefined;
|
|
209
|
+
if (forceLocal) {
|
|
210
|
+
_backend = createLocalBackend();
|
|
211
|
+
}
|
|
183
212
|
}
|
|
184
213
|
//# sourceMappingURL=opt-in.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opt-in.js","sourceRoot":"","sources":["../../src/telemetry/opt-in.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"opt-in.js","sourceRoot":"","sources":["../../src/telemetry/opt-in.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAe5B,0DAA0D;AAC1D,IAAI,QAAmC,CAAC;AAExC,SAAS,cAAc;IACrB,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,mEAAmE;IACnE,qEAAqE;IACrE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,iEAAiE;YACjE,MAAM,MAAM,GAAG,OAAO,CAAC,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kBAAkB,EAAE,CAAC;IAClC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-trust",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Trust verification CLI for AI packages — check MCP servers, A2A agents, and AI tools before you install",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/opena2a-org/ai-trust.git"
|
|
8
|
+
},
|
|
5
9
|
"type": "module",
|
|
6
10
|
"main": "dist/index.js",
|
|
7
11
|
"bin": {
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
"author": "OpenA2A",
|
|
34
38
|
"license": "Apache-2.0",
|
|
35
39
|
"dependencies": {
|
|
40
|
+
"@opena2a/shared": "^0.1.0",
|
|
36
41
|
"chalk": "^5.3.0",
|
|
37
42
|
"commander": "^12.1.0"
|
|
38
43
|
},
|