Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,25 @@
"camofox_scroll",
"camofox_screenshot",
"camofox_close_tab",
"camofox_evaluate",
"camofox_list_tabs",
"camofox_import_cookies"
],
"contracts": {
"tools": [
"camofox_create_tab",
"camofox_snapshot",
"camofox_click",
"camofox_type",
"camofox_navigate",
"camofox_scroll",
"camofox_screenshot",
"camofox_close_tab",
"camofox_evaluate",
"camofox_list_tabs",
"camofox_import_cookies"
]
},
"runtimeDependencies": {
"camoufox": {
"description": "Camoufox anti-detection browser (Firefox fork). Downloaded at install time by camoufox-js unless CAMOUFOX_EXECUTABLE points to an external bundle.",
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"name": "camofox_close_tab",
"description": "Close a browser tab"
},
{
"name": "camofox_evaluate",
"description": "Execute JavaScript in a Camoufox tab page context"
},
{
"name": "camofox_list_tabs",
"description": "List open tabs for a user"
Expand Down
23 changes: 23 additions & 0 deletions tests/unit/openclawManifest.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { describe, test, expect } from '@jest/globals';
import fs from 'fs';

const RUNTIME_TOOL_RE = /name:\s*["'](camofox_[^"']+)["']/g;

function runtimeToolNames() {
const plugin = fs.readFileSync(new URL('../../plugin.js', import.meta.url), 'utf8');
return [...plugin.matchAll(RUNTIME_TOOL_RE)].map(match => match[1]);
}

describe('OpenClaw manifest', () => {
test('declares ownership contracts for every runtime tool', () => {
const manifest = JSON.parse(fs.readFileSync(new URL('../../openclaw.plugin.json', import.meta.url), 'utf8'));
const pkg = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
const runtimeTools = runtimeToolNames();
const packageTools = pkg.openclaw.tools.map(tool => tool.name);

expect(manifest.contracts).toBeDefined();
expect(manifest.contracts.tools).toEqual(runtimeTools);
expect(manifest.tools).toEqual(runtimeTools);
expect(packageTools).toEqual(runtimeTools);
});
});