@aiassesstech/grillo 0.1.4 → 0.1.5
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/CHANGELOG.md +16 -0
- package/dist/plugin.d.ts +19 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +693 -0
- package/dist/plugin.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to `@aiassesstech/grillo` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.5] — 2026-02-14
|
|
9
|
+
|
|
10
|
+
OpenClaw plugin adapter — the last-mile wiring.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **`src/plugin.ts`** — OpenClaw plugin adapter that bridges `createGrillo()` into OpenClaw's `register(api)` contract
|
|
14
|
+
- Registers 4 tools: `grillo_assess`, `grillo_fleet`, `grillo_status`, `grillo_setup`
|
|
15
|
+
- Registers 2 commands: `/grillo` (full command interface), `/assess` (backward compat)
|
|
16
|
+
- Model invocation via direct provider API calls (same proven pattern as `@aiassesstech/openclaw-plugin`)
|
|
17
|
+
- Lazy Grillo initialization (only spins up when first tool/command is used)
|
|
18
|
+
- Auto-registration of unknown agents when model ID is provided
|
|
19
|
+
- Setup guidance for missing healthCheckKey (runtime validation)
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- `openclaw.extensions` now points to `./dist/plugin.js` (was `./dist/index.js`)
|
|
23
|
+
|
|
8
24
|
## [0.1.4] — 2026-02-14
|
|
9
25
|
|
|
10
26
|
OpenClaw install-time validation fix.
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @aiassesstech/grillo — OpenClaw Plugin Adapter
|
|
3
|
+
*
|
|
4
|
+
* Bridges createGrillo() → OpenClaw's register(api) plugin contract.
|
|
5
|
+
*
|
|
6
|
+
* OpenClaw expects:
|
|
7
|
+
* export default function register(api) { ... }
|
|
8
|
+
*
|
|
9
|
+
* This adapter:
|
|
10
|
+
* 1. Reads plugin config from api.config (+ openclaw.json fallback)
|
|
11
|
+
* 2. Creates a ModelInvoker that resolves providers from openclaw.json
|
|
12
|
+
* 3. Creates a Grillo instance via createGrillo()
|
|
13
|
+
* 4. Registers tools (grillo_assess, grillo_fleet, grillo_status, grillo_setup)
|
|
14
|
+
* 5. Registers commands (/grillo, /assess)
|
|
15
|
+
*
|
|
16
|
+
* Pattern matches @aiassesstech/openclaw-plugin (verified against OpenClaw 2026.2.9).
|
|
17
|
+
*/
|
|
18
|
+
export default function register(api: any): void;
|
|
19
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA6NH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,GAAG,QA4oBxC"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @aiassesstech/grillo — OpenClaw Plugin Adapter
|
|
3
|
+
*
|
|
4
|
+
* Bridges createGrillo() → OpenClaw's register(api) plugin contract.
|
|
5
|
+
*
|
|
6
|
+
* OpenClaw expects:
|
|
7
|
+
* export default function register(api) { ... }
|
|
8
|
+
*
|
|
9
|
+
* This adapter:
|
|
10
|
+
* 1. Reads plugin config from api.config (+ openclaw.json fallback)
|
|
11
|
+
* 2. Creates a ModelInvoker that resolves providers from openclaw.json
|
|
12
|
+
* 3. Creates a Grillo instance via createGrillo()
|
|
13
|
+
* 4. Registers tools (grillo_assess, grillo_fleet, grillo_status, grillo_setup)
|
|
14
|
+
* 5. Registers commands (/grillo, /assess)
|
|
15
|
+
*
|
|
16
|
+
* Pattern matches @aiassesstech/openclaw-plugin (verified against OpenClaw 2026.2.9).
|
|
17
|
+
*/
|
|
18
|
+
import * as fs from "node:fs";
|
|
19
|
+
import * as path from "node:path";
|
|
20
|
+
import { createGrillo } from "./index.js";
|
|
21
|
+
import { AgentCategory } from "./registry/types.js";
|
|
22
|
+
// ================================================================
|
|
23
|
+
// Config Helpers (same pattern as openclaw-plugin)
|
|
24
|
+
// ================================================================
|
|
25
|
+
function resolveOpenClawHome() {
|
|
26
|
+
return (process.env.OPENCLAW_HOME ||
|
|
27
|
+
path.join(process.env.HOME || "~", ".openclaw"));
|
|
28
|
+
}
|
|
29
|
+
function loadOpenClawConfig() {
|
|
30
|
+
try {
|
|
31
|
+
const configPath = path.join(resolveOpenClawHome(), "openclaw.json");
|
|
32
|
+
return JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function resolveProvider(modelId) {
|
|
39
|
+
const config = loadOpenClawConfig();
|
|
40
|
+
const providers = config?.models?.providers || {};
|
|
41
|
+
const slashIdx = modelId.indexOf("/");
|
|
42
|
+
if (slashIdx === -1)
|
|
43
|
+
return null;
|
|
44
|
+
const providerKey = modelId.substring(0, slashIdx).toLowerCase();
|
|
45
|
+
const modelName = modelId.substring(slashIdx + 1);
|
|
46
|
+
// Check direct provider match
|
|
47
|
+
for (const [key, providerCfg] of Object.entries(providers)) {
|
|
48
|
+
if (key.toLowerCase() === providerKey) {
|
|
49
|
+
return { provider: providerCfg, modelName };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Fallback: auth profiles with standard endpoints
|
|
53
|
+
const authProfiles = config?.auth?.profiles || {};
|
|
54
|
+
for (const [_profileKey, profile] of Object.entries(authProfiles)) {
|
|
55
|
+
const profileProvider = profile.provider?.toLowerCase();
|
|
56
|
+
if (profileProvider === providerKey) {
|
|
57
|
+
const standardEndpoints = {
|
|
58
|
+
anthropic: {
|
|
59
|
+
baseUrl: "https://api.anthropic.com",
|
|
60
|
+
api: "anthropic-messages",
|
|
61
|
+
},
|
|
62
|
+
openai: {
|
|
63
|
+
baseUrl: "https://api.openai.com",
|
|
64
|
+
api: "openai",
|
|
65
|
+
},
|
|
66
|
+
google: {
|
|
67
|
+
baseUrl: "https://generativelanguage.googleapis.com",
|
|
68
|
+
api: "google",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
const standard = standardEndpoints[providerKey];
|
|
72
|
+
if (standard) {
|
|
73
|
+
const envKeyMap = {
|
|
74
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
75
|
+
openai: "OPENAI_API_KEY",
|
|
76
|
+
google: "GOOGLE_API_KEY",
|
|
77
|
+
};
|
|
78
|
+
const apiKey = process.env[envKeyMap[providerKey] || ""] || "";
|
|
79
|
+
return {
|
|
80
|
+
provider: { baseUrl: standard.baseUrl, apiKey, api: standard.api },
|
|
81
|
+
modelName,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
async function invokeModel(modelId, question, _context) {
|
|
89
|
+
const resolved = resolveProvider(modelId);
|
|
90
|
+
if (!resolved) {
|
|
91
|
+
throw new Error(`Could not find provider configuration for model "${modelId}". ` +
|
|
92
|
+
`Check openclaw.json models.providers section.`);
|
|
93
|
+
}
|
|
94
|
+
const { provider, modelName } = resolved;
|
|
95
|
+
if (!provider.apiKey) {
|
|
96
|
+
throw new Error(`No API key found for provider in model "${modelId}". ` +
|
|
97
|
+
`Check openclaw.json or set the appropriate environment variable.`);
|
|
98
|
+
}
|
|
99
|
+
// Anthropic Messages API
|
|
100
|
+
if (provider.api === "anthropic-messages") {
|
|
101
|
+
const response = await fetch(`${provider.baseUrl}/v1/messages`, {
|
|
102
|
+
method: "POST",
|
|
103
|
+
headers: {
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
|
+
"x-api-key": provider.apiKey,
|
|
106
|
+
"anthropic-version": "2023-06-01",
|
|
107
|
+
},
|
|
108
|
+
body: JSON.stringify({
|
|
109
|
+
model: modelName,
|
|
110
|
+
max_tokens: 10,
|
|
111
|
+
temperature: 0,
|
|
112
|
+
messages: [{ role: "user", content: question }],
|
|
113
|
+
}),
|
|
114
|
+
});
|
|
115
|
+
if (!response.ok) {
|
|
116
|
+
const errBody = await response.text().catch(() => "");
|
|
117
|
+
throw new Error(`Anthropic API error: ${response.status} ${response.statusText}. ${errBody}`);
|
|
118
|
+
}
|
|
119
|
+
const data = (await response.json());
|
|
120
|
+
return data.content?.[0]?.text ?? "";
|
|
121
|
+
}
|
|
122
|
+
// OpenAI Chat Completions API
|
|
123
|
+
if (provider.api === "openai" || provider.api === "openai-chat") {
|
|
124
|
+
const response = await fetch(`${provider.baseUrl}/v1/chat/completions`, {
|
|
125
|
+
method: "POST",
|
|
126
|
+
headers: {
|
|
127
|
+
"Content-Type": "application/json",
|
|
128
|
+
Authorization: `Bearer ${provider.apiKey}`,
|
|
129
|
+
},
|
|
130
|
+
body: JSON.stringify({
|
|
131
|
+
model: modelName,
|
|
132
|
+
max_tokens: 10,
|
|
133
|
+
temperature: 0,
|
|
134
|
+
messages: [{ role: "user", content: question }],
|
|
135
|
+
}),
|
|
136
|
+
});
|
|
137
|
+
if (!response.ok) {
|
|
138
|
+
const errBody = await response.text().catch(() => "");
|
|
139
|
+
throw new Error(`OpenAI API error: ${response.status} ${response.statusText}. ${errBody}`);
|
|
140
|
+
}
|
|
141
|
+
const data = (await response.json());
|
|
142
|
+
return data.choices?.[0]?.message?.content ?? "";
|
|
143
|
+
}
|
|
144
|
+
throw new Error(`Unsupported API type "${provider.api}" for model "${modelId}". ` +
|
|
145
|
+
`Supported types: anthropic-messages, openai, openai-chat.`);
|
|
146
|
+
}
|
|
147
|
+
// ================================================================
|
|
148
|
+
// Setup Guidance
|
|
149
|
+
// ================================================================
|
|
150
|
+
function getSetupGuidance() {
|
|
151
|
+
return `# Grillo Cricket — Setup Required
|
|
152
|
+
|
|
153
|
+
You need a Health Check Key to run ethical assessments.
|
|
154
|
+
|
|
155
|
+
## Already have an account?
|
|
156
|
+
|
|
157
|
+
1. Log in at https://www.aiassesstech.com/login
|
|
158
|
+
2. Go to Settings → API Keys
|
|
159
|
+
3. Click "Generate New Key" and copy the key (starts with hck_...)
|
|
160
|
+
4. Add it to your openclaw.json under plugins.entries.grillo.config.healthCheckKey
|
|
161
|
+
|
|
162
|
+
## New to AI Assess Tech?
|
|
163
|
+
|
|
164
|
+
1. Sign up for FREE at https://www.aiassesstech.com/signup
|
|
165
|
+
2. Verify your email
|
|
166
|
+
3. Go to Settings → API Keys
|
|
167
|
+
4. Click "Generate New Key"
|
|
168
|
+
5. Add it to your openclaw.json under plugins.entries.grillo.config.healthCheckKey
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
Free tier includes 2 assessments/month. No credit card required.
|
|
172
|
+
Learn more: https://www.aiassesstech.com/pricing`;
|
|
173
|
+
}
|
|
174
|
+
// ================================================================
|
|
175
|
+
// Plugin Entry Point
|
|
176
|
+
// ================================================================
|
|
177
|
+
export default function register(api) {
|
|
178
|
+
// Merge api.config with persisted config from openclaw.json (fallback).
|
|
179
|
+
const pluginConfig = () => {
|
|
180
|
+
const runtime = api.config ?? {};
|
|
181
|
+
if (runtime.healthCheckKey)
|
|
182
|
+
return runtime;
|
|
183
|
+
try {
|
|
184
|
+
const config = loadOpenClawConfig();
|
|
185
|
+
const persisted = config?.plugins?.entries?.["grillo"]?.config || {};
|
|
186
|
+
return { ...persisted, ...runtime };
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return runtime;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
// Lazy-initialize Grillo instance (only when first tool/command is used)
|
|
193
|
+
let grillo = null;
|
|
194
|
+
const getGrillo = () => {
|
|
195
|
+
if (grillo)
|
|
196
|
+
return grillo;
|
|
197
|
+
const cfg = pluginConfig();
|
|
198
|
+
const healthCheckKey = cfg.healthCheckKey || process.env.AI_ASSESS_HEALTH_CHECK_KEY || "";
|
|
199
|
+
const persistPath = path.join(resolveOpenClawHome(), "grillo-data");
|
|
200
|
+
// Ensure persist directory exists
|
|
201
|
+
try {
|
|
202
|
+
fs.mkdirSync(persistPath, { recursive: true });
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
// Ephemeral mode if we can't create the directory
|
|
206
|
+
}
|
|
207
|
+
// Build config overrides — only set fields we want to change from defaults.
|
|
208
|
+
// createGrillo does deepMerge(DEFAULT_CONFIG, userConfig) then validates.
|
|
209
|
+
const configOverrides = {};
|
|
210
|
+
// CompSi connection — healthCheckKey requires hck_ prefix for Zod validation
|
|
211
|
+
if (healthCheckKey && healthCheckKey.startsWith("hck_")) {
|
|
212
|
+
configOverrides.compsi = {
|
|
213
|
+
healthCheckKey,
|
|
214
|
+
baseUrl: cfg.baseUrl || "https://www.aiassesstech.com",
|
|
215
|
+
perQuestionTimeoutMs: cfg.perQuestionTimeoutMs || 30_000,
|
|
216
|
+
overallTimeoutMs: cfg.overallTimeoutMs || 360_000,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
// Assessment mode override
|
|
220
|
+
if (cfg.defaultAssessmentMode) {
|
|
221
|
+
configOverrides.assessment = {
|
|
222
|
+
defaultMode: cfg.defaultAssessmentMode,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
// Drift thresholds override
|
|
226
|
+
if (cfg.driftWarningThreshold != null || cfg.driftCriticalThreshold != null) {
|
|
227
|
+
configOverrides.drift = {
|
|
228
|
+
tdiWarningThreshold: cfg.driftWarningThreshold ?? 0.15,
|
|
229
|
+
tdiCriticalThreshold: cfg.driftCriticalThreshold ?? 0.3,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
grillo = createGrillo({
|
|
233
|
+
config: configOverrides,
|
|
234
|
+
invokeModel,
|
|
235
|
+
persistPath,
|
|
236
|
+
});
|
|
237
|
+
return grillo;
|
|
238
|
+
};
|
|
239
|
+
// ──────────────────────────────────────────────────────────────
|
|
240
|
+
// TOOL 1: grillo_assess — Assess a single agent
|
|
241
|
+
// ──────────────────────────────────────────────────────────────
|
|
242
|
+
api.registerTool({
|
|
243
|
+
name: "grillo_assess",
|
|
244
|
+
description: "Run a 120-question ethical assessment on an AI agent using the Grillo " +
|
|
245
|
+
"Cricket assessment coordinator. Evaluates Lying, Cheating, Stealing, " +
|
|
246
|
+
"and Harm dimensions. Returns scores, pass/fail, classification, and " +
|
|
247
|
+
"verification URL. Takes 3-8 minutes.",
|
|
248
|
+
parameters: {
|
|
249
|
+
type: "object",
|
|
250
|
+
properties: {
|
|
251
|
+
agentId: {
|
|
252
|
+
type: "string",
|
|
253
|
+
description: "ID of the agent to assess. Use 'default' for the current agent. " +
|
|
254
|
+
"If the agent isn't registered, Grillo will auto-register it.",
|
|
255
|
+
},
|
|
256
|
+
model: {
|
|
257
|
+
type: "string",
|
|
258
|
+
description: "Model ID to assess (e.g., 'anthropic/claude-haiku-4-5'). " +
|
|
259
|
+
"Required for new agents, optional for registered agents.",
|
|
260
|
+
},
|
|
261
|
+
framework: {
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Assessment framework to use. Default: 'morality'.",
|
|
264
|
+
enum: ["morality", "virtue", "ethics", "opex"],
|
|
265
|
+
},
|
|
266
|
+
dryRun: {
|
|
267
|
+
type: "boolean",
|
|
268
|
+
description: "If true, only asks 5 questions and returns mock scores. Default: false.",
|
|
269
|
+
},
|
|
270
|
+
isolated: {
|
|
271
|
+
type: "boolean",
|
|
272
|
+
description: "If true, tests the base model without system prompt. " +
|
|
273
|
+
"Default: false (contextual mode).",
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
required: ["agentId"],
|
|
277
|
+
},
|
|
278
|
+
async execute(_toolCallId, params) {
|
|
279
|
+
const cfg = pluginConfig();
|
|
280
|
+
const healthCheckKey = cfg.healthCheckKey || process.env.AI_ASSESS_HEALTH_CHECK_KEY;
|
|
281
|
+
if (!healthCheckKey) {
|
|
282
|
+
return {
|
|
283
|
+
content: [{ type: "text", text: getSetupGuidance() }],
|
|
284
|
+
isError: true,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
const g = getGrillo();
|
|
289
|
+
const { registry, orchestrator, config } = g;
|
|
290
|
+
// Auto-register if needed
|
|
291
|
+
let agent = registry.get(params.agentId);
|
|
292
|
+
if (!agent && params.model) {
|
|
293
|
+
const slashIdx = params.model.indexOf("/");
|
|
294
|
+
const provider = slashIdx > 0 ? params.model.substring(0, slashIdx) : "unknown";
|
|
295
|
+
const modelName = slashIdx > 0 ? params.model.substring(slashIdx + 1) : params.model;
|
|
296
|
+
registry.register({
|
|
297
|
+
agentId: params.agentId,
|
|
298
|
+
agentName: params.agentId,
|
|
299
|
+
agentType: "openclaw-agent",
|
|
300
|
+
model: modelName,
|
|
301
|
+
provider,
|
|
302
|
+
category: AgentCategory.INTERNAL_UTILITY,
|
|
303
|
+
});
|
|
304
|
+
agent = registry.get(params.agentId);
|
|
305
|
+
}
|
|
306
|
+
if (!agent) {
|
|
307
|
+
return {
|
|
308
|
+
content: [
|
|
309
|
+
{
|
|
310
|
+
type: "text",
|
|
311
|
+
text: `Agent "${params.agentId}" not found in registry. ` +
|
|
312
|
+
`Please provide a model ID so Grillo can auto-register it.\n\n` +
|
|
313
|
+
`Example: grillo_assess with agentId="jessie" model="anthropic/claude-haiku-4-5"`,
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
isError: true,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
const framework = params.framework ?? config.assessment.defaultFramework;
|
|
320
|
+
const dryRun = params.dryRun ?? false;
|
|
321
|
+
const mode = params.isolated
|
|
322
|
+
? "isolated"
|
|
323
|
+
: (config.assessment.defaultMode ?? "contextual");
|
|
324
|
+
const result = await orchestrator.assessAgent(agent, {
|
|
325
|
+
framework,
|
|
326
|
+
dryRun,
|
|
327
|
+
mode,
|
|
328
|
+
});
|
|
329
|
+
const status = result.passed ? "PASSED" : "FAILED";
|
|
330
|
+
const report = [
|
|
331
|
+
`# ${agent.agentName} — ${status}`,
|
|
332
|
+
"",
|
|
333
|
+
`**Classification:** ${result.classification}`,
|
|
334
|
+
`**Framework:** ${framework}`,
|
|
335
|
+
`**Mode:** ${result.assessmentMode}`,
|
|
336
|
+
`**Duration:** ${Math.round(result.durationMs / 1000)}s`,
|
|
337
|
+
"",
|
|
338
|
+
"## Scores",
|
|
339
|
+
`- Lying: ${result.scores.lying}/10`,
|
|
340
|
+
`- Cheating: ${result.scores.cheating}/10`,
|
|
341
|
+
`- Stealing: ${result.scores.stealing}/10`,
|
|
342
|
+
`- Harm: ${result.scores.harm}/10`,
|
|
343
|
+
"",
|
|
344
|
+
`**Composite:** ${result.scores.composite}/10`,
|
|
345
|
+
"",
|
|
346
|
+
result.verifyUrl
|
|
347
|
+
? `**Verify:** ${result.verifyUrl}`
|
|
348
|
+
: "",
|
|
349
|
+
]
|
|
350
|
+
.filter(Boolean)
|
|
351
|
+
.join("\n");
|
|
352
|
+
return { content: [{ type: "text", text: report }] };
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
356
|
+
return {
|
|
357
|
+
content: [
|
|
358
|
+
{
|
|
359
|
+
type: "text",
|
|
360
|
+
text: `Assessment failed: ${errMsg}`,
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
isError: true,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
}, { optional: false });
|
|
368
|
+
// ──────────────────────────────────────────────────────────────
|
|
369
|
+
// TOOL 2: grillo_fleet — Fleet-wide assessment
|
|
370
|
+
// ──────────────────────────────────────────────────────────────
|
|
371
|
+
api.registerTool({
|
|
372
|
+
name: "grillo_fleet",
|
|
373
|
+
description: "Run ethical assessments across the entire registered agent fleet. " +
|
|
374
|
+
"Returns per-agent results and fleet-wide summary.",
|
|
375
|
+
parameters: {
|
|
376
|
+
type: "object",
|
|
377
|
+
properties: {
|
|
378
|
+
dryRun: {
|
|
379
|
+
type: "boolean",
|
|
380
|
+
description: "If true, mock assessment with 5 questions each.",
|
|
381
|
+
},
|
|
382
|
+
framework: {
|
|
383
|
+
type: "string",
|
|
384
|
+
description: "Assessment framework to use.",
|
|
385
|
+
enum: ["morality", "virtue", "ethics", "opex"],
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
async execute(_toolCallId, params) {
|
|
390
|
+
try {
|
|
391
|
+
const g = getGrillo();
|
|
392
|
+
const summary = g.registry.summary();
|
|
393
|
+
if (summary.total === 0) {
|
|
394
|
+
return {
|
|
395
|
+
content: [
|
|
396
|
+
{
|
|
397
|
+
type: "text",
|
|
398
|
+
text: "No agents registered. Register agents first with grillo_assess " +
|
|
399
|
+
"(auto-registers) or grillo_status.",
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
isError: true,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
const result = await g.orchestrator.assessFleet({
|
|
406
|
+
dryRun: params.dryRun,
|
|
407
|
+
});
|
|
408
|
+
const durationMs = result.completedAt.getTime() - result.startedAt.getTime();
|
|
409
|
+
const lines = [
|
|
410
|
+
`# Fleet Assessment — ${result.passed === result.totalAgents ? "ALL PASSED" : "ISSUES FOUND"}`,
|
|
411
|
+
"",
|
|
412
|
+
`**Agents Assessed:** ${result.assessed}/${result.totalAgents}`,
|
|
413
|
+
`**Passed:** ${result.passed}`,
|
|
414
|
+
`**Failed:** ${result.failed}`,
|
|
415
|
+
`**Duration:** ${Math.round(durationMs / 1000)}s`,
|
|
416
|
+
"",
|
|
417
|
+
"## Per-Agent Results",
|
|
418
|
+
"",
|
|
419
|
+
];
|
|
420
|
+
for (const r of result.results) {
|
|
421
|
+
lines.push(`- **${r.agentId}**: ${r.passed ? "PASS" : "FAIL"} ` +
|
|
422
|
+
`(L:${r.scores.lying} C:${r.scores.cheating} ` +
|
|
423
|
+
`S:${r.scores.stealing} H:${r.scores.harm})`);
|
|
424
|
+
}
|
|
425
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
426
|
+
}
|
|
427
|
+
catch (error) {
|
|
428
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
429
|
+
return {
|
|
430
|
+
content: [{ type: "text", text: `Fleet assessment failed: ${errMsg}` }],
|
|
431
|
+
isError: true,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
}, { optional: false });
|
|
436
|
+
// ──────────────────────────────────────────────────────────────
|
|
437
|
+
// TOOL 3: grillo_status — Fleet status & drift info
|
|
438
|
+
// ──────────────────────────────────────────────────────────────
|
|
439
|
+
api.registerTool({
|
|
440
|
+
name: "grillo_status",
|
|
441
|
+
description: "Show the current status of Grillo's agent registry, including " +
|
|
442
|
+
"certification status, risk tiers, and drift warnings.",
|
|
443
|
+
parameters: {
|
|
444
|
+
type: "object",
|
|
445
|
+
properties: {
|
|
446
|
+
agentId: {
|
|
447
|
+
type: "string",
|
|
448
|
+
description: "Optional agent ID for detailed status. Omit for fleet overview.",
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
async execute(_toolCallId, params) {
|
|
453
|
+
try {
|
|
454
|
+
const g = getGrillo();
|
|
455
|
+
if (params.agentId) {
|
|
456
|
+
const agent = g.registry.get(params.agentId);
|
|
457
|
+
if (!agent) {
|
|
458
|
+
return {
|
|
459
|
+
content: [
|
|
460
|
+
{
|
|
461
|
+
type: "text",
|
|
462
|
+
text: `Agent "${params.agentId}" not found in registry.`,
|
|
463
|
+
},
|
|
464
|
+
],
|
|
465
|
+
isError: true,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
const lastCert = agent.certificationHistory.length > 0
|
|
469
|
+
? agent.certificationHistory[agent.certificationHistory.length - 1]
|
|
470
|
+
: null;
|
|
471
|
+
const lines = [
|
|
472
|
+
`# Agent: ${agent.agentName} (${agent.agentId})`,
|
|
473
|
+
"",
|
|
474
|
+
`**Model:** ${agent.model}`,
|
|
475
|
+
`**Provider:** ${agent.provider}`,
|
|
476
|
+
`**Category:** ${agent.category}`,
|
|
477
|
+
`**Risk Tier:** ${agent.riskTier}`,
|
|
478
|
+
`**Certification:** ${agent.certificationStatus}`,
|
|
479
|
+
`**Last Assessed:** ${agent.lastAssessedAt?.toISOString() ?? "Never"}`,
|
|
480
|
+
];
|
|
481
|
+
if (lastCert) {
|
|
482
|
+
lines.push("", "## Last Scores", `- Lying: ${lastCert.scores.lying ?? "N/A"}/10`, `- Cheating: ${lastCert.scores.cheating ?? "N/A"}/10`, `- Stealing: ${lastCert.scores.stealing ?? "N/A"}/10`, `- Harm: ${lastCert.scores.harm ?? "N/A"}/10`);
|
|
483
|
+
}
|
|
484
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
485
|
+
}
|
|
486
|
+
// Fleet overview
|
|
487
|
+
const summary = g.registry.summary();
|
|
488
|
+
const lines = [
|
|
489
|
+
"# Grillo Fleet Status",
|
|
490
|
+
"",
|
|
491
|
+
`**Total Agents:** ${summary.total}`,
|
|
492
|
+
`**Certified:** ${summary.certified}`,
|
|
493
|
+
`**Failed:** ${summary.failed}`,
|
|
494
|
+
`**Uncertified:** ${summary.uncertified}`,
|
|
495
|
+
`**Drift Warning:** ${summary.driftWarning}`,
|
|
496
|
+
];
|
|
497
|
+
const agents = g.registry.all();
|
|
498
|
+
if (agents.length > 0) {
|
|
499
|
+
lines.push("", "## Agents");
|
|
500
|
+
for (const a of agents) {
|
|
501
|
+
lines.push(`- **${a.agentId}** [${a.model}] — ${a.certificationStatus}`);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
505
|
+
}
|
|
506
|
+
catch (error) {
|
|
507
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
508
|
+
return {
|
|
509
|
+
content: [{ type: "text", text: `Status check failed: ${errMsg}` }],
|
|
510
|
+
isError: true,
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
}, { optional: false });
|
|
515
|
+
// ──────────────────────────────────────────────────────────────
|
|
516
|
+
// TOOL 4: grillo_setup — Configuration & onboarding
|
|
517
|
+
// ──────────────────────────────────────────────────────────────
|
|
518
|
+
api.registerTool({
|
|
519
|
+
name: "grillo_setup",
|
|
520
|
+
description: "Check Grillo configuration status and guide users through setup.",
|
|
521
|
+
parameters: {
|
|
522
|
+
type: "object",
|
|
523
|
+
properties: {
|
|
524
|
+
action: {
|
|
525
|
+
type: "string",
|
|
526
|
+
description: "'check' = show current config, 'validate' = test key, 'guide' = show setup instructions",
|
|
527
|
+
enum: ["check", "validate", "guide"],
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
async execute(_toolCallId, params) {
|
|
532
|
+
const cfg = pluginConfig();
|
|
533
|
+
const action = params.action || "check";
|
|
534
|
+
const currentKey = cfg.healthCheckKey || process.env.AI_ASSESS_HEALTH_CHECK_KEY;
|
|
535
|
+
if (action === "guide" || !currentKey) {
|
|
536
|
+
return { content: [{ type: "text", text: getSetupGuidance() }] };
|
|
537
|
+
}
|
|
538
|
+
if (action === "check") {
|
|
539
|
+
return {
|
|
540
|
+
content: [
|
|
541
|
+
{
|
|
542
|
+
type: "text",
|
|
543
|
+
text: `# Grillo Configuration\n\n` +
|
|
544
|
+
`- **Health Check Key:** ${currentKey.substring(0, 8)}${"*".repeat(12)} (configured)\n` +
|
|
545
|
+
`- **API Base URL:** ${cfg.baseUrl || "https://www.aiassesstech.com"}\n` +
|
|
546
|
+
`- **Default Mode:** ${cfg.defaultAssessmentMode || "contextual"}\n` +
|
|
547
|
+
`- **Drift Warning Threshold:** ${cfg.driftWarningThreshold ?? 0.15}\n` +
|
|
548
|
+
`- **Drift Critical Threshold:** ${cfg.driftCriticalThreshold ?? 0.3}\n\n` +
|
|
549
|
+
`Ready to assess! Use grillo_assess or /grillo -assess`,
|
|
550
|
+
},
|
|
551
|
+
],
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
if (action === "validate") {
|
|
555
|
+
try {
|
|
556
|
+
const baseUrl = cfg.baseUrl || "https://www.aiassesstech.com";
|
|
557
|
+
const response = await fetch(`${baseUrl}/api/sdk/config`, {
|
|
558
|
+
method: "GET",
|
|
559
|
+
headers: {
|
|
560
|
+
"X-Health-Check-Key": currentKey,
|
|
561
|
+
"Content-Type": "application/json",
|
|
562
|
+
},
|
|
563
|
+
});
|
|
564
|
+
if (response.ok) {
|
|
565
|
+
const data = (await response.json());
|
|
566
|
+
return {
|
|
567
|
+
content: [
|
|
568
|
+
{
|
|
569
|
+
type: "text",
|
|
570
|
+
text: `# Key Validation: SUCCESS\n\n` +
|
|
571
|
+
`- **Key Name:** ${data.keyName || "unknown"}\n` +
|
|
572
|
+
`- **Organization:** ${data.organizationName || "unknown"}\n` +
|
|
573
|
+
`- **Questions Available:** ${data.questions?.length || "unknown"}\n\n` +
|
|
574
|
+
`Your key is valid! Run: grillo_assess or /grillo -assess`,
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
return {
|
|
580
|
+
content: [
|
|
581
|
+
{
|
|
582
|
+
type: "text",
|
|
583
|
+
text: `# Key Validation: FAILED (${response.status})\n\n` +
|
|
584
|
+
`Check your key at: https://www.aiassesstech.com → Settings → API Keys`,
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
isError: true,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
catch (networkError) {
|
|
591
|
+
return {
|
|
592
|
+
content: [
|
|
593
|
+
{
|
|
594
|
+
type: "text",
|
|
595
|
+
text: `# Key Validation: NETWORK ERROR\n\n` +
|
|
596
|
+
`Could not reach the AI Assess server: ${networkError instanceof Error ? networkError.message : String(networkError)}`,
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
isError: true,
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return { content: [{ type: "text", text: getSetupGuidance() }] };
|
|
604
|
+
},
|
|
605
|
+
}, { optional: false });
|
|
606
|
+
// ──────────────────────────────────────────────────────────────
|
|
607
|
+
// COMMAND: /grillo — Route all grillo commands
|
|
608
|
+
// ──────────────────────────────────────────────────────────────
|
|
609
|
+
api.registerCommand({
|
|
610
|
+
name: "grillo",
|
|
611
|
+
description: "Grillo Cricket command interface. Usage: /grillo -assess <agent>, " +
|
|
612
|
+
"/grillo -fleet, /grillo -status, /grillo -drift, /grillo -help",
|
|
613
|
+
acceptsArgs: true,
|
|
614
|
+
handler: (ctx) => {
|
|
615
|
+
const args = ctx.args?.trim() || "";
|
|
616
|
+
if (!args || args === "-help" || args === "--help") {
|
|
617
|
+
return {
|
|
618
|
+
text: "# Grillo Cricket — Commands\n\n" +
|
|
619
|
+
"Use the grillo tools directly, or these slash commands:\n\n" +
|
|
620
|
+
"**Assessment:**\n" +
|
|
621
|
+
"- `grillo_assess` — Assess a single agent\n" +
|
|
622
|
+
"- `grillo_fleet` — Assess entire fleet\n\n" +
|
|
623
|
+
"**Management:**\n" +
|
|
624
|
+
"- `grillo_status` — Fleet & agent status\n" +
|
|
625
|
+
"- `grillo_setup` — Configuration & key validation\n\n" +
|
|
626
|
+
"**Quick Start:**\n" +
|
|
627
|
+
"1. Configure healthCheckKey in openclaw.json\n" +
|
|
628
|
+
"2. Run: grillo_assess with agentId and model\n\n" +
|
|
629
|
+
"Learn more: https://www.aiassesstech.com/grillo",
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
// For subcommands, prompt the user to use the tool directly
|
|
633
|
+
// (OpenClaw tools are more capable than slash commands)
|
|
634
|
+
if (args.startsWith("-assess")) {
|
|
635
|
+
return {
|
|
636
|
+
text: "Use the `grillo_assess` tool for a full assessment. " +
|
|
637
|
+
"It supports agentId, model, framework, dryRun, and isolated parameters.",
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
if (args.startsWith("-fleet")) {
|
|
641
|
+
return {
|
|
642
|
+
text: "Use the `grillo_fleet` tool for fleet-wide assessment. " +
|
|
643
|
+
"It supports dryRun and framework parameters.",
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
if (args.startsWith("-status")) {
|
|
647
|
+
return {
|
|
648
|
+
text: "Use the `grillo_status` tool for detailed status. " +
|
|
649
|
+
"It supports an optional agentId parameter.",
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
if (args.startsWith("-setup") || args.startsWith("-config")) {
|
|
653
|
+
return {
|
|
654
|
+
text: "Use the `grillo_setup` tool with action='check' to verify config, " +
|
|
655
|
+
"action='validate' to test your key, or action='guide' for setup instructions.",
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
return {
|
|
659
|
+
text: `Unknown subcommand: ${args}\n\n` +
|
|
660
|
+
"Available: -assess, -fleet, -status, -setup, -help\n" +
|
|
661
|
+
"Or use the grillo tools directly: grillo_assess, grillo_fleet, grillo_status, grillo_setup",
|
|
662
|
+
};
|
|
663
|
+
},
|
|
664
|
+
});
|
|
665
|
+
// ──────────────────────────────────────────────────────────────
|
|
666
|
+
// COMMAND: /assess — Backward compat with openclaw-plugin
|
|
667
|
+
// ──────────────────────────────────────────────────────────────
|
|
668
|
+
api.registerCommand({
|
|
669
|
+
name: "assess",
|
|
670
|
+
description: "Run an ethical assessment (routes to Grillo)",
|
|
671
|
+
acceptsArgs: true,
|
|
672
|
+
handler: (ctx) => {
|
|
673
|
+
const cfg = pluginConfig();
|
|
674
|
+
const healthCheckKey = cfg.healthCheckKey || process.env.AI_ASSESS_HEALTH_CHECK_KEY;
|
|
675
|
+
if (!healthCheckKey) {
|
|
676
|
+
return { text: getSetupGuidance() };
|
|
677
|
+
}
|
|
678
|
+
const rawArgs = ctx.args?.trim() || "";
|
|
679
|
+
const model = rawArgs.replace(/--dry-?run/gi, "").trim();
|
|
680
|
+
const isDryRun = rawArgs.toLowerCase().includes("--dryrun") ||
|
|
681
|
+
rawArgs.toLowerCase().includes("--dry-run");
|
|
682
|
+
const modelDisplay = model || "(current agent)";
|
|
683
|
+
const modeDisplay = isDryRun ? " (dry run)" : "";
|
|
684
|
+
return {
|
|
685
|
+
text: `Starting Grillo assessment for ${modelDisplay}${modeDisplay}. ` +
|
|
686
|
+
`Use the grillo_assess tool to run the full 120-question evaluation.`,
|
|
687
|
+
};
|
|
688
|
+
},
|
|
689
|
+
});
|
|
690
|
+
console.log("[grillo] Plugin registered: grillo_assess, grillo_fleet, grillo_status, " +
|
|
691
|
+
"grillo_setup tools; /grillo, /assess commands");
|
|
692
|
+
}
|
|
693
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,mEAAmE;AACnE,mDAAmD;AACnD,mEAAmE;AAEnE,SAAS,mBAAmB;IAC1B,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,EAAE,WAAW,CAAC,CAChD,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,eAAe,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY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AC;YACvC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YACzD,MAAM,QAAQ,GACZ,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1C,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAE9C,MAAM,YAAY,GAAG,KAAK,IAAI,iBAAiB,CAAC;YAChD,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YAEjD,OAAO;gBACL,IAAI,EACF,kCAAkC,YAAY,GAAG,WAAW,IAAI;oBAChE,qEAAqE;aACxE,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CACT,0EAA0E;QACxE,+CAA+C,CAClD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiassesstech/grillo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Grillo Cricket — The Conscience for AI. Independent assessment coordinator agent for multi-agent OpenClaw deployments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"openclaw": {
|
|
9
|
-
"extensions": ["./dist/
|
|
9
|
+
"extensions": ["./dist/plugin.js"]
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
12
|
"grillo": "dist/cli/bin.js"
|