Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(callable): HTTP oracle excludes owner-only cliOnly ops, as stdio's does (purge ops are cliOnly but not localOnly)

garrytan0bf57ca9129e
diff --git a/test/callable-predicate.test.ts b/test/callable-predicate.test.ts
index 9ac961f631..e7f4856002 100644
--- a/test/callable-predicate.test.ts
+++ b/test/callable-predicate.test.ts
@@ -18,9 +18,9 @@ const SURFACES = ['verbs', 'starter', 'full'] as const;
const SCOPE_SETS: readonly string[][] = [['read'], ['read', 'write'], ['admin'], ['agent'], ['admin', 'skills_member_self']];
const GATE_STATES: Record<string, boolean>[] = [{}, { 'mcp.publish_skills': true, 'mcp.publish_advisor': true }];
-/** The pre-A2 HTTP list filter, kept here as the independent oracle. */
+/** The pre-A2 HTTP list filter minus F5's owner-only (`cliOnly`) ops, kept here as the independent oracle. */
function legacyHttpList(surface: typeof SURFACES[number], scopes: string[], gates: Record<string, boolean>): string[] {
- return filterOpsForSurface(operations.filter(op => !op.localOnly), surface)
+ return filterOpsForSurface(operations.filter(op => !op.localOnly && !op.cliOnly), surface)
.filter(op => operationScopesAllowed(scopes, op) && !(op.publishGateKey && gates[op.publishGateKey] !== true))
.map(op => op.name);
}