@pellux/goodvibes-agent 0.1.44 → 0.1.45
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 +4 -0
- package/README.md +4 -2
- package/docs/operator-capability-benchmark.md +5 -3
- package/package.json +1 -1
- package/src/cli/capabilities-command.ts +28 -1
- package/src/cli/help.ts +3 -2
- package/src/input/agent-workspace.ts +2 -0
- package/src/input/commands/capabilities-runtime.ts +10 -0
- package/src/input/commands/experience-runtime.ts +27 -3
- package/src/operator/daemon-capability-audit.ts +144 -8
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ goodvibes-agent status
|
|
|
18
18
|
goodvibes-agent capabilities
|
|
19
19
|
goodvibes-agent capabilities daemon
|
|
20
20
|
goodvibes-agent capabilities daemon gaps
|
|
21
|
+
goodvibes-agent capabilities daemon risk
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
If Bun reports untrusted lifecycle dependencies, trust only the package and dependencies required by this package:
|
|
@@ -46,7 +47,7 @@ bun run publish:check
|
|
|
46
47
|
|
|
47
48
|
Inside the Agent TUI, use `/agent`, `/home`, or `/operator` to open the operator workspace. It is the Agent-first fullscreen surface for setup, status, live daemon capability coverage, knowledge, local memory/skills, work-plan/approval review, automation observability, and explicit build delegation to GoodVibes TUI.
|
|
48
49
|
|
|
49
|
-
Use `goodvibes-agent capabilities` or `/capabilities` to inspect the OpenClaw/Hermes benchmark, current Agent posture, configuration commands, usage paths, and remaining gaps. Use `goodvibes-agent capabilities daemon` or `/capabilities daemon` for a live read-only audit of the GoodVibes daemon method catalog, route risk posture, and isolated Agent Knowledge route coverage. Use `goodvibes-agent capabilities daemon gaps` or `/capabilities daemon gaps` to turn that live daemon audit into a prioritized gap plan that separates missing daemon routes from Agent UX work.
|
|
50
|
+
Use `goodvibes-agent capabilities` or `/capabilities` to inspect the OpenClaw/Hermes benchmark, current Agent posture, configuration commands, usage paths, and remaining gaps. Use `goodvibes-agent capabilities daemon` or `/capabilities daemon` for a live read-only audit of the GoodVibes daemon method catalog, route risk posture, and isolated Agent Knowledge route coverage. Use `goodvibes-agent capabilities daemon gaps` or `/capabilities daemon gaps` to turn that live daemon audit into a prioritized gap plan that separates missing daemon routes from Agent UX work. Use `goodvibes-agent capabilities daemon risk` or `/approval risk` for route-risk-aware approval posture without mutating approval state.
|
|
50
51
|
|
|
51
52
|
Inside the workspace, use `/agent-profile guide` to author custom profile starters without leaving the Agent TUI. The guided flow lists starters, exports starter JSON, imports edited local starters, and creates isolated runtime profiles from them.
|
|
52
53
|
|
|
@@ -89,9 +90,10 @@ To verify what the running daemon can expose for the Agent/OpenClaw/Hermes capab
|
|
|
89
90
|
goodvibes-agent capabilities daemon
|
|
90
91
|
goodvibes-agent capabilities daemon --json
|
|
91
92
|
goodvibes-agent capabilities daemon gaps
|
|
93
|
+
goodvibes-agent capabilities daemon risk
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
This audit checks `/api/control-plane/methods` and `/api/goodvibes-agent/knowledge/status`. The gap plan
|
|
96
|
+
This audit checks `/api/control-plane/methods` and `/api/goodvibes-agent/knowledge/status`. The gap plan and route-risk review are derived from the same read-only calls. None of these commands query default Knowledge/Wiki or HomeGraph.
|
|
95
97
|
|
|
96
98
|
Agent intentionally blocks daemon lifecycle commands:
|
|
97
99
|
|
|
@@ -18,6 +18,7 @@ goodvibes-agent capabilities hermes
|
|
|
18
18
|
goodvibes-agent capabilities daemon
|
|
19
19
|
goodvibes-agent capabilities daemon --json
|
|
20
20
|
goodvibes-agent capabilities daemon gaps
|
|
21
|
+
goodvibes-agent capabilities daemon risk
|
|
21
22
|
goodvibes-agent capabilities daemon knowledge
|
|
22
23
|
```
|
|
23
24
|
|
|
@@ -29,6 +30,7 @@ Inside the TUI:
|
|
|
29
30
|
/capabilities knowledge
|
|
30
31
|
/capabilities daemon
|
|
31
32
|
/capabilities daemon gaps
|
|
33
|
+
/approval risk
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
## Research Baseline
|
|
@@ -58,7 +60,7 @@ The benchmark measures two different GoodVibes layers:
|
|
|
58
60
|
|
|
59
61
|
If the daemon already has a route but Agent lacks a good setup/workspace/CLI surface, the gap is treated as an Agent product gap rather than a missing platform capability.
|
|
60
62
|
|
|
61
|
-
Use `goodvibes-agent capabilities daemon` for the live read-only daemon audit. It checks the public control-plane method catalog, route risk posture, and the isolated Agent Knowledge status route. Use `goodvibes-agent capabilities daemon gaps` to convert that daemon-measured audit into a prioritized gap plan with `version_mismatch`, `agent_route_missing`, `required_method_missing`, `route_risk_review`, and `agent_ux_gap` rows.
|
|
63
|
+
Use `goodvibes-agent capabilities daemon` for the live read-only daemon audit. It checks the public control-plane method catalog, route risk posture, and the isolated Agent Knowledge status route. Use `goodvibes-agent capabilities daemon gaps` to convert that daemon-measured audit into a prioritized gap plan with `version_mismatch`, `agent_route_missing`, `required_method_missing`, `route_risk_review`, and `agent_ux_gap` rows. Use `goodvibes-agent capabilities daemon risk` or `/approval risk` for a route-risk-aware approval-center view over read-only, mutating, dangerous, and authenticated route metadata. These commands intentionally avoid default `/api/knowledge/*`, HomeGraph, and Home Assistant routes.
|
|
62
64
|
|
|
63
65
|
## Capability Targets
|
|
64
66
|
|
|
@@ -80,7 +82,7 @@ Use `goodvibes-agent capabilities daemon` for the live read-only daemon audit. I
|
|
|
80
82
|
|
|
81
83
|
GoodVibes Agent should exceed OpenClaw/Hermes by making these properties true from day one:
|
|
82
84
|
|
|
83
|
-
- Capability surfaces are discoverable through `goodvibes-agent capabilities`, `goodvibes-agent capabilities daemon`, `goodvibes-agent capabilities daemon gaps`, `/capabilities`, `/capabilities daemon`, onboarding, and the operator workspace.
|
|
85
|
+
- Capability surfaces are discoverable through `goodvibes-agent capabilities`, `goodvibes-agent capabilities daemon`, `goodvibes-agent capabilities daemon gaps`, `goodvibes-agent capabilities daemon risk`, `/capabilities`, `/capabilities daemon`, `/approval risk`, onboarding, and the operator workspace.
|
|
84
86
|
- Agent Knowledge isolation is a release gate, not a convention.
|
|
85
87
|
- Routine-to-schedule promotion preserves Agent Knowledge isolation, uses only public external daemon schedule routes, supports explicit delivery targets, and stores redacted receipts.
|
|
86
88
|
- Model-visible tools are policy-gated for serial, non-secret, non-destructive use.
|
|
@@ -96,5 +98,5 @@ GoodVibes Agent should exceed OpenClaw/Hermes by making these properties true fr
|
|
|
96
98
|
- Artifact and multimodal Agent Knowledge ingestion when the isolated Agent route accepts artifact-backed media.
|
|
97
99
|
- Deeper live run/delivery history and delivery error surfacing for promoted routines.
|
|
98
100
|
- Delegation receipts and artifact review inside the operator workspace.
|
|
99
|
-
-
|
|
101
|
+
- Saved policy presets for the route-risk-aware approval center.
|
|
100
102
|
- Intent-gated tool exposure so the model sees fewer irrelevant tools per turn while retaining broad capability coverage.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Near-fork GoodVibes operator assistant with the GoodVibes TUI shell, renderer, input, fullscreen workspace, and daemon-connected Agent product brain.",
|
|
6
6
|
"type": "module",
|
|
@@ -7,17 +7,20 @@ import {
|
|
|
7
7
|
} from '../operator/capability-benchmark.ts';
|
|
8
8
|
import {
|
|
9
9
|
buildDaemonCapabilityGapReport,
|
|
10
|
+
buildDaemonCapabilityRouteRiskReport,
|
|
10
11
|
fetchLiveDaemonCapabilityAudit,
|
|
11
12
|
filterDaemonCapabilityAuditAreas,
|
|
12
13
|
filterDaemonCapabilityGaps,
|
|
14
|
+
filterDaemonCapabilityRouteRiskAreas,
|
|
13
15
|
renderDaemonCapabilityAudit,
|
|
14
16
|
renderDaemonCapabilityFailure,
|
|
15
17
|
renderDaemonCapabilityGaps,
|
|
18
|
+
renderDaemonCapabilityRouteRisk,
|
|
16
19
|
} from '../operator/daemon-capability-audit.ts';
|
|
17
20
|
import { resolveAgentDaemonConnection } from '../agent/routine-schedule-promotion.ts';
|
|
18
21
|
|
|
19
22
|
interface CapabilityCommandArgs {
|
|
20
|
-
readonly mode: 'benchmark' | 'daemon' | 'daemon-gaps';
|
|
23
|
+
readonly mode: 'benchmark' | 'daemon' | 'daemon-gaps' | 'daemon-risk';
|
|
21
24
|
readonly query: string | undefined;
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -32,6 +35,10 @@ function readCapabilityArgs(args: readonly string[]): CapabilityCommandArgs {
|
|
|
32
35
|
const query = values.slice(2).join(' ').trim();
|
|
33
36
|
return { mode: 'daemon-gaps', query: query.length > 0 ? query : undefined };
|
|
34
37
|
}
|
|
38
|
+
if (values[1] === 'risk' || values[1] === 'route-risk') {
|
|
39
|
+
const query = values.slice(2).join(' ').trim();
|
|
40
|
+
return { mode: 'daemon-risk', query: query.length > 0 ? query : undefined };
|
|
41
|
+
}
|
|
35
42
|
const query = values.slice(1).join(' ').trim();
|
|
36
43
|
return { mode: 'daemon', query: query.length > 0 ? query : undefined };
|
|
37
44
|
}
|
|
@@ -79,6 +86,26 @@ export async function handleCapabilitiesCommand(runtime: CliCommandRuntime): Pro
|
|
|
79
86
|
exitCode: 0,
|
|
80
87
|
};
|
|
81
88
|
}
|
|
89
|
+
if (args.mode === 'daemon-risk') {
|
|
90
|
+
const connection = resolveAgentDaemonConnection(runtime.configManager, runtime.homeDirectory);
|
|
91
|
+
const audit = await fetchLiveDaemonCapabilityAudit(connection);
|
|
92
|
+
if (!audit.ok) {
|
|
93
|
+
return {
|
|
94
|
+
output: runtime.cli.flags.outputFormat === 'json'
|
|
95
|
+
? JSON.stringify(audit, null, 2)
|
|
96
|
+
: renderDaemonCapabilityFailure(audit),
|
|
97
|
+
exitCode: audit.kind === 'auth_required' || audit.kind === 'daemon_unavailable' ? 1 : 2,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const report = buildDaemonCapabilityRouteRiskReport(audit);
|
|
101
|
+
const areas = filterDaemonCapabilityRouteRiskAreas(report.areas, args.query);
|
|
102
|
+
return {
|
|
103
|
+
output: runtime.cli.flags.outputFormat === 'json'
|
|
104
|
+
? JSON.stringify({ ...report, matchedAreaCount: areas.length, areas }, null, 2)
|
|
105
|
+
: renderDaemonCapabilityRouteRisk(report, areas),
|
|
106
|
+
exitCode: 0,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
82
109
|
const report = buildOperatorCapabilityBenchmarkReport();
|
|
83
110
|
const capabilities = filterOperatorCapabilities(report.capabilities, args.query);
|
|
84
111
|
if (runtime.cli.flags.outputFormat === 'json') {
|
package/src/cli/help.ts
CHANGED
|
@@ -104,6 +104,7 @@ export function renderGoodVibesHelp(binary = 'goodvibes-agent'): string {
|
|
|
104
104
|
` ${binary} capabilities`,
|
|
105
105
|
` ${binary} capabilities daemon`,
|
|
106
106
|
` ${binary} capabilities daemon gaps`,
|
|
107
|
+
` ${binary} capabilities daemon risk`,
|
|
107
108
|
` ${binary} knowledge status`,
|
|
108
109
|
` ${binary} knowledge ask "What is GoodVibes Agent?"`,
|
|
109
110
|
` ${binary} ask "What is GoodVibes Agent?"`,
|
|
@@ -198,9 +199,9 @@ const COMMAND_HELP: Record<string, CommandHelp> = {
|
|
|
198
199
|
examples: ['compat', 'compat --json'],
|
|
199
200
|
},
|
|
200
201
|
capabilities: {
|
|
201
|
-
usage: ['capabilities [openclaw|hermes|query]', 'capabilities daemon [query]', 'capabilities daemon gaps [query]', 'capabilities --json'],
|
|
202
|
+
usage: ['capabilities [openclaw|hermes|query]', 'capabilities daemon [query]', 'capabilities daemon gaps [query]', 'capabilities daemon risk [query]', 'capabilities --json'],
|
|
202
203
|
summary: 'Show the OpenClaw/Hermes capability benchmark, Agent readiness, live GoodVibes daemon method coverage, and daemon-measured product gaps.',
|
|
203
|
-
examples: ['capabilities', 'capabilities hermes', 'capabilities daemon', 'capabilities daemon gaps', 'capabilities daemon knowledge --json'],
|
|
204
|
+
examples: ['capabilities', 'capabilities hermes', 'capabilities daemon', 'capabilities daemon gaps', 'capabilities daemon risk --json', 'capabilities daemon knowledge --json'],
|
|
204
205
|
},
|
|
205
206
|
knowledge: {
|
|
206
207
|
usage: [
|
|
@@ -490,6 +490,7 @@ export const AGENT_WORKSPACE_CATEGORIES: readonly AgentWorkspaceCategory[] = [
|
|
|
490
490
|
{ id: 'capabilities-benchmark', label: 'Benchmark report', detail: 'Show the OpenClaw/Hermes parity benchmark with Agent posture, setup commands, usage paths, and remaining product gaps.', command: '/capabilities', kind: 'command', safety: 'read-only' },
|
|
491
491
|
{ id: 'capabilities-daemon', label: 'Live daemon audit', detail: 'Inspect the public daemon method catalog plus isolated Agent Knowledge route coverage. Does not query default Knowledge/Wiki or HomeGraph.', command: '/capabilities daemon', kind: 'command', safety: 'read-only' },
|
|
492
492
|
{ id: 'capabilities-daemon-gaps', label: 'Daemon gap plan', detail: 'Classify live daemon coverage into platform gaps, Agent route gaps, route-risk reviews, and Agent UX work without querying default Knowledge/Wiki or HomeGraph.', command: '/capabilities daemon gaps', kind: 'command', safety: 'read-only' },
|
|
493
|
+
{ id: 'capabilities-daemon-risk', label: 'Route risk review', detail: 'Inspect daemon read-only, mutating, dangerous, and authenticated route metadata for approval-center planning.', command: '/capabilities daemon risk', kind: 'command', safety: 'read-only' },
|
|
493
494
|
{ id: 'capabilities-daemon-knowledge', label: 'Knowledge coverage', detail: 'Filter the live daemon audit to the isolated Agent Knowledge segment.', command: '/capabilities daemon knowledge', kind: 'command', safety: 'read-only' },
|
|
494
495
|
{ id: 'capabilities-daemon-channels', label: 'Channel coverage', detail: 'Filter the live daemon audit to channel and delivery gateway route coverage.', command: '/capabilities daemon channels', kind: 'command', safety: 'read-only' },
|
|
495
496
|
{ id: 'capabilities-daemon-automation', label: 'Automation coverage', detail: 'Filter the live daemon audit to automation, schedule, run, and capacity route coverage.', command: '/capabilities daemon automation', kind: 'command', safety: 'read-only' },
|
|
@@ -581,6 +582,7 @@ export const AGENT_WORKSPACE_CATEGORIES: readonly AgentWorkspaceCategory[] = [
|
|
|
581
582
|
{ id: 'workplan', label: 'Open work plan', detail: 'Open the workspace-scoped work plan panel.', command: '/workplan panel', kind: 'command', safety: 'read-only' },
|
|
582
583
|
{ id: 'workplan-list', label: 'List work plan', detail: 'Print a concise work plan summary.', command: '/workplan list', kind: 'command', safety: 'read-only' },
|
|
583
584
|
{ id: 'approvals', label: 'Review approvals', detail: 'Open/read approval posture. This workspace does not approve or deny requests.', command: '/approval open', kind: 'command', safety: 'read-only' },
|
|
585
|
+
{ id: 'approval-risk', label: 'Route risk review', detail: 'Inspect daemon route risk and dangerous method metadata without approving, denying, or mutating requests.', command: '/approval risk', kind: 'command', safety: 'read-only' },
|
|
584
586
|
],
|
|
585
587
|
},
|
|
586
588
|
{
|
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
} from '../../operator/capability-benchmark.ts';
|
|
7
7
|
import {
|
|
8
8
|
buildDaemonCapabilityGapReport,
|
|
9
|
+
buildDaemonCapabilityRouteRiskReport,
|
|
9
10
|
fetchLiveDaemonCapabilityAudit,
|
|
10
11
|
filterDaemonCapabilityAuditAreas,
|
|
11
12
|
filterDaemonCapabilityGaps,
|
|
13
|
+
filterDaemonCapabilityRouteRiskAreas,
|
|
12
14
|
renderDaemonCapabilityAudit,
|
|
13
15
|
renderDaemonCapabilityFailure,
|
|
14
16
|
renderDaemonCapabilityGaps,
|
|
17
|
+
renderDaemonCapabilityRouteRisk,
|
|
15
18
|
} from '../../operator/daemon-capability-audit.ts';
|
|
16
19
|
import { resolveAgentDaemonConnection } from '../../agent/routine-schedule-promotion.ts';
|
|
17
20
|
|
|
@@ -37,6 +40,13 @@ export function registerCapabilitiesRuntimeCommands(registry: CommandRegistry):
|
|
|
37
40
|
ctx.print(renderDaemonCapabilityGaps(report, gaps));
|
|
38
41
|
return;
|
|
39
42
|
}
|
|
43
|
+
if (args[1] === 'risk' || args[1] === 'route-risk') {
|
|
44
|
+
const report = buildDaemonCapabilityRouteRiskReport(audit);
|
|
45
|
+
const query = args.slice(2).join(' ').trim() || undefined;
|
|
46
|
+
const areas = filterDaemonCapabilityRouteRiskAreas(report.areas, query);
|
|
47
|
+
ctx.print(renderDaemonCapabilityRouteRisk(report, areas));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
40
50
|
const query = args.slice(1).join(' ').trim() || undefined;
|
|
41
51
|
const areas = filterDaemonCapabilityAuditAreas(audit.areas, query);
|
|
42
52
|
ctx.print(renderDaemonCapabilityAudit(audit, areas));
|
|
@@ -3,6 +3,14 @@ import { dirname, resolve } from 'node:path';
|
|
|
3
3
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
4
4
|
import { requirePanelManager, requireShellPaths } from './runtime-services.ts';
|
|
5
5
|
import { requireYesFlag, stripYesFlag } from './confirmation.ts';
|
|
6
|
+
import { resolveAgentDaemonConnection } from '../../agent/routine-schedule-promotion.ts';
|
|
7
|
+
import {
|
|
8
|
+
buildDaemonCapabilityRouteRiskReport,
|
|
9
|
+
fetchLiveDaemonCapabilityAudit,
|
|
10
|
+
filterDaemonCapabilityRouteRiskAreas,
|
|
11
|
+
renderDaemonCapabilityFailure,
|
|
12
|
+
renderDaemonCapabilityRouteRisk,
|
|
13
|
+
} from '../../operator/daemon-capability-audit.ts';
|
|
6
14
|
|
|
7
15
|
interface VoiceBundle {
|
|
8
16
|
readonly version: 1;
|
|
@@ -178,8 +186,8 @@ export function registerExperienceRuntimeCommands(registry: CommandRegistry): vo
|
|
|
178
186
|
name: 'approval',
|
|
179
187
|
aliases: ['approvals'],
|
|
180
188
|
description: 'Review action-specific approval classes and the specialized security UX matrix',
|
|
181
|
-
usage: '[matrix|review <kind>]',
|
|
182
|
-
handler(args, ctx) {
|
|
189
|
+
usage: '[matrix|risk|review <kind>]',
|
|
190
|
+
async handler(args, ctx) {
|
|
183
191
|
const sub = (args[0] ?? 'matrix').toLowerCase();
|
|
184
192
|
if (sub === 'open' || sub === 'panel') {
|
|
185
193
|
if (ctx.showPanel) ctx.showPanel('approval');
|
|
@@ -205,9 +213,25 @@ export function registerExperienceRuntimeCommands(registry: CommandRegistry): vo
|
|
|
205
213
|
ctx.print([
|
|
206
214
|
'Approval Matrix',
|
|
207
215
|
...matrix.map(([kind, summary]) => ` ${kind.padEnd(10)} ${summary}`),
|
|
216
|
+
'',
|
|
217
|
+
'Live daemon route risk: /approval risk',
|
|
208
218
|
].join('\n'));
|
|
209
219
|
return;
|
|
210
220
|
}
|
|
221
|
+
if (sub === 'risk' || sub === 'route-risk') {
|
|
222
|
+
const shellPaths = requireShellPaths(ctx);
|
|
223
|
+
const connection = resolveAgentDaemonConnection(ctx.platform.configManager, shellPaths.homeDirectory);
|
|
224
|
+
const audit = await fetchLiveDaemonCapabilityAudit(connection);
|
|
225
|
+
if (!audit.ok) {
|
|
226
|
+
ctx.print(renderDaemonCapabilityFailure(audit));
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const report = buildDaemonCapabilityRouteRiskReport(audit);
|
|
230
|
+
const query = args.slice(1).join(' ').trim() || undefined;
|
|
231
|
+
const areas = filterDaemonCapabilityRouteRiskAreas(report.areas, query);
|
|
232
|
+
ctx.print(renderDaemonCapabilityRouteRisk(report, areas));
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
211
235
|
if (sub === 'review') {
|
|
212
236
|
const kind = (args[1] ?? '').toLowerCase();
|
|
213
237
|
const entry = matrix.find(([id]) => id === kind);
|
|
@@ -222,7 +246,7 @@ export function registerExperienceRuntimeCommands(registry: CommandRegistry): vo
|
|
|
222
246
|
].join('\n'));
|
|
223
247
|
return;
|
|
224
248
|
}
|
|
225
|
-
ctx.print('Usage: /approval [open|matrix|review <kind>]');
|
|
249
|
+
ctx.print('Usage: /approval [open|matrix|risk|review <kind>]');
|
|
226
250
|
},
|
|
227
251
|
});
|
|
228
252
|
|
|
@@ -49,6 +49,9 @@ export interface DaemonCapabilityAuditArea {
|
|
|
49
49
|
readonly coverage: DaemonCapabilityRouteCoverage;
|
|
50
50
|
}[];
|
|
51
51
|
readonly routeRisk: {
|
|
52
|
+
readonly readOnlyMethodIds: readonly string[];
|
|
53
|
+
readonly mutatingMethodIds: readonly string[];
|
|
54
|
+
readonly authenticatedMethodIds: readonly string[];
|
|
52
55
|
readonly readOnlyMethodCount: number;
|
|
53
56
|
readonly mutatingMethodCount: number;
|
|
54
57
|
readonly authenticatedMethodCount: number;
|
|
@@ -100,6 +103,38 @@ export interface DaemonCapabilityGapReport {
|
|
|
100
103
|
readonly gaps: readonly DaemonCapabilityGap[];
|
|
101
104
|
}
|
|
102
105
|
|
|
106
|
+
export interface DaemonCapabilityRouteRiskArea {
|
|
107
|
+
readonly areaId: string;
|
|
108
|
+
readonly title: string;
|
|
109
|
+
readonly coverage: DaemonCapabilityCoverage;
|
|
110
|
+
readonly readOnlyMethodIds: readonly string[];
|
|
111
|
+
readonly mutatingMethodIds: readonly string[];
|
|
112
|
+
readonly authenticatedMethodIds: readonly string[];
|
|
113
|
+
readonly readOnlyMethodCount: number;
|
|
114
|
+
readonly mutatingMethodCount: number;
|
|
115
|
+
readonly authenticatedMethodCount: number;
|
|
116
|
+
readonly dangerousMethodIds: readonly string[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface DaemonCapabilityRouteRiskReport {
|
|
120
|
+
readonly ok: true;
|
|
121
|
+
readonly kind: 'daemon.capabilities.route_risk';
|
|
122
|
+
readonly baseUrl: string;
|
|
123
|
+
readonly daemonVersion: string;
|
|
124
|
+
readonly expectedSdkVersion: string;
|
|
125
|
+
readonly daemonCompatible: boolean;
|
|
126
|
+
readonly methodCatalogRoute: typeof DAEMON_METHOD_CATALOG_ROUTE;
|
|
127
|
+
readonly agentKnowledgeRoute: typeof AGENT_KNOWLEDGE_STATUS_ROUTE;
|
|
128
|
+
readonly agentKnowledgeRouteReady: boolean;
|
|
129
|
+
readonly defaultKnowledgeFallback: false;
|
|
130
|
+
readonly homeGraphFallback: false;
|
|
131
|
+
readonly totalReadOnlyMethodCount: number;
|
|
132
|
+
readonly totalMutatingMethodCount: number;
|
|
133
|
+
readonly totalAuthenticatedMethodCount: number;
|
|
134
|
+
readonly totalDangerousMethodCount: number;
|
|
135
|
+
readonly areas: readonly DaemonCapabilityRouteRiskArea[];
|
|
136
|
+
}
|
|
137
|
+
|
|
103
138
|
export interface DaemonCapabilityAuditFailure {
|
|
104
139
|
readonly ok: false;
|
|
105
140
|
readonly kind: DaemonCapabilityAuditFailureKind;
|
|
@@ -452,15 +487,17 @@ export function buildDaemonCapabilityAuditAreas(
|
|
|
452
487
|
const method = methodsById.get(methodId);
|
|
453
488
|
return method ? [method] : [];
|
|
454
489
|
});
|
|
455
|
-
const
|
|
490
|
+
const readOnlyMethodIds = areaMethods.filter((method) => {
|
|
456
491
|
const verb = method.http?.method?.toUpperCase();
|
|
457
492
|
return verb === 'GET' || verb === 'HEAD';
|
|
458
|
-
}).
|
|
459
|
-
const
|
|
493
|
+
}).map((method) => method.id);
|
|
494
|
+
const mutatingMethodIds = areaMethods.filter((method) => {
|
|
460
495
|
const verb = method.http?.method?.toUpperCase();
|
|
461
496
|
return Boolean(verb) && verb !== 'GET' && verb !== 'HEAD';
|
|
462
|
-
}).
|
|
463
|
-
const
|
|
497
|
+
}).map((method) => method.id);
|
|
498
|
+
const authenticatedMethodIds = areaMethods
|
|
499
|
+
.filter((method) => method.access === 'authenticated')
|
|
500
|
+
.map((method) => method.id);
|
|
464
501
|
const dangerousMethodIds = areaMethods
|
|
465
502
|
.filter((method) => method.dangerous === true)
|
|
466
503
|
.map((method) => method.id);
|
|
@@ -484,9 +521,12 @@ export function buildDaemonCapabilityAuditAreas(
|
|
|
484
521
|
missingOptionalMethodIds,
|
|
485
522
|
agentRoutes,
|
|
486
523
|
routeRisk: {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
524
|
+
readOnlyMethodIds,
|
|
525
|
+
mutatingMethodIds,
|
|
526
|
+
authenticatedMethodIds,
|
|
527
|
+
readOnlyMethodCount: readOnlyMethodIds.length,
|
|
528
|
+
mutatingMethodCount: mutatingMethodIds.length,
|
|
529
|
+
authenticatedMethodCount: authenticatedMethodIds.length,
|
|
490
530
|
dangerousMethodIds,
|
|
491
531
|
},
|
|
492
532
|
next: requirement.next,
|
|
@@ -721,6 +761,102 @@ export function renderDaemonCapabilityGaps(
|
|
|
721
761
|
return lines.join('\n').trimEnd();
|
|
722
762
|
}
|
|
723
763
|
|
|
764
|
+
export function buildDaemonCapabilityRouteRiskReport(
|
|
765
|
+
audit: DaemonCapabilityAuditSuccess,
|
|
766
|
+
areas: readonly DaemonCapabilityAuditArea[] = audit.areas,
|
|
767
|
+
): DaemonCapabilityRouteRiskReport {
|
|
768
|
+
const riskAreas = areas.map((area): DaemonCapabilityRouteRiskArea => ({
|
|
769
|
+
areaId: area.id,
|
|
770
|
+
title: area.title,
|
|
771
|
+
coverage: area.coverage,
|
|
772
|
+
readOnlyMethodIds: area.routeRisk.readOnlyMethodIds,
|
|
773
|
+
mutatingMethodIds: area.routeRisk.mutatingMethodIds,
|
|
774
|
+
authenticatedMethodIds: area.routeRisk.authenticatedMethodIds,
|
|
775
|
+
readOnlyMethodCount: area.routeRisk.readOnlyMethodCount,
|
|
776
|
+
mutatingMethodCount: area.routeRisk.mutatingMethodCount,
|
|
777
|
+
authenticatedMethodCount: area.routeRisk.authenticatedMethodCount,
|
|
778
|
+
dangerousMethodIds: area.routeRisk.dangerousMethodIds,
|
|
779
|
+
}));
|
|
780
|
+
const readOnlyMethodIds = new Set(riskAreas.flatMap((area) => area.readOnlyMethodIds));
|
|
781
|
+
const mutatingMethodIds = new Set(riskAreas.flatMap((area) => area.mutatingMethodIds));
|
|
782
|
+
const authenticatedMethodIds = new Set(riskAreas.flatMap((area) => area.authenticatedMethodIds));
|
|
783
|
+
const dangerousMethodIds = new Set(riskAreas.flatMap((area) => area.dangerousMethodIds));
|
|
784
|
+
|
|
785
|
+
return {
|
|
786
|
+
ok: true,
|
|
787
|
+
kind: 'daemon.capabilities.route_risk',
|
|
788
|
+
baseUrl: audit.baseUrl,
|
|
789
|
+
daemonVersion: audit.daemonVersion,
|
|
790
|
+
expectedSdkVersion: audit.expectedSdkVersion,
|
|
791
|
+
daemonCompatible: audit.daemonCompatible,
|
|
792
|
+
methodCatalogRoute: audit.methodCatalogRoute,
|
|
793
|
+
agentKnowledgeRoute: audit.agentKnowledgeRoute,
|
|
794
|
+
agentKnowledgeRouteReady: audit.agentKnowledgeRouteReady,
|
|
795
|
+
defaultKnowledgeFallback: false,
|
|
796
|
+
homeGraphFallback: false,
|
|
797
|
+
totalReadOnlyMethodCount: readOnlyMethodIds.size,
|
|
798
|
+
totalMutatingMethodCount: mutatingMethodIds.size,
|
|
799
|
+
totalAuthenticatedMethodCount: authenticatedMethodIds.size,
|
|
800
|
+
totalDangerousMethodCount: dangerousMethodIds.size,
|
|
801
|
+
areas: riskAreas,
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export function filterDaemonCapabilityRouteRiskAreas(
|
|
806
|
+
areas: readonly DaemonCapabilityRouteRiskArea[],
|
|
807
|
+
query: string | undefined,
|
|
808
|
+
): readonly DaemonCapabilityRouteRiskArea[] {
|
|
809
|
+
const normalized = query?.trim().toLowerCase();
|
|
810
|
+
if (!normalized) return areas;
|
|
811
|
+
return areas.filter((area) => {
|
|
812
|
+
return area.areaId.includes(normalized)
|
|
813
|
+
|| area.title.toLowerCase().includes(normalized)
|
|
814
|
+
|| area.coverage.includes(normalized)
|
|
815
|
+
|| area.dangerousMethodIds.some((methodId) => methodId.includes(normalized));
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export function renderDaemonCapabilityRouteRisk(
|
|
820
|
+
report: DaemonCapabilityRouteRiskReport,
|
|
821
|
+
areas: readonly DaemonCapabilityRouteRiskArea[] = report.areas,
|
|
822
|
+
): string {
|
|
823
|
+
const lines: string[] = [
|
|
824
|
+
'GoodVibes daemon route risk review',
|
|
825
|
+
` daemon: ${report.baseUrl}`,
|
|
826
|
+
` SDK: Agent expects ${report.expectedSdkVersion}; daemon reports ${report.daemonVersion}`,
|
|
827
|
+
` compatibility: ${report.daemonCompatible ? 'matched' : 'mismatch'}`,
|
|
828
|
+
` method catalog: ${report.methodCatalogRoute}`,
|
|
829
|
+
` Agent Knowledge: ${report.agentKnowledgeRouteReady ? 'ready' : 'missing'} ${report.agentKnowledgeRoute}`,
|
|
830
|
+
' isolation: default Knowledge/Wiki fallback no; HomeGraph fallback no',
|
|
831
|
+
` totals: ${report.totalReadOnlyMethodCount} read-only; ${report.totalMutatingMethodCount} mutating; ${report.totalDangerousMethodCount} dangerous; ${report.totalAuthenticatedMethodCount} authenticated`,
|
|
832
|
+
' policy: exact command plus confirmation for side effects; ordinary chat never triggers mutating routes',
|
|
833
|
+
'',
|
|
834
|
+
];
|
|
835
|
+
|
|
836
|
+
const visibleAreas = areas.filter((area) => {
|
|
837
|
+
return area.readOnlyMethodCount > 0
|
|
838
|
+
|| area.mutatingMethodCount > 0
|
|
839
|
+
|| area.authenticatedMethodCount > 0
|
|
840
|
+
|| area.dangerousMethodIds.length > 0;
|
|
841
|
+
});
|
|
842
|
+
if (visibleAreas.length === 0) {
|
|
843
|
+
lines.push('No route risk metadata matched this query.');
|
|
844
|
+
return lines.join('\n');
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
for (const area of visibleAreas) {
|
|
848
|
+
lines.push(`${area.title} [${area.coverage}]`);
|
|
849
|
+
lines.push(` methods: ${area.readOnlyMethodCount} read-only; ${area.mutatingMethodCount} mutating; ${area.dangerousMethodIds.length} dangerous; ${area.authenticatedMethodCount} authenticated`);
|
|
850
|
+
if (area.dangerousMethodIds.length > 0) {
|
|
851
|
+
lines.push(` dangerous methods: ${area.dangerousMethodIds.join(', ')}`);
|
|
852
|
+
}
|
|
853
|
+
lines.push(' approval posture: read-only by default; exact command and confirmation required for side effects.');
|
|
854
|
+
lines.push('');
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
return lines.join('\n').trimEnd();
|
|
858
|
+
}
|
|
859
|
+
|
|
724
860
|
export function renderDaemonCapabilityAudit(
|
|
725
861
|
audit: DaemonCapabilityAuditSuccess,
|
|
726
862
|
areas: readonly DaemonCapabilityAuditArea[] = audit.areas,
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '0.1.
|
|
9
|
+
let _version = '0.1.45';
|
|
10
10
|
let _sdkVersion = '0.33.35';
|
|
11
11
|
try {
|
|
12
12
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
|