
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Lightweight helpers for working with OpenVerb verb libraries.
OpenVerb is an open, text-first standard for describing what actions an AI is allowed to perform inside an application. Instead of wiring one-off "tools" or plugins, applications expose verb libraries: JSON files that describe actions (verbs), their parameters, and their results.
This package provides TypeScript types and helper functions for loading, validating, and executing OpenVerb actions.
npm install openverb
import { loadLibrary, createExecutor } from 'openverb';
import coreLibrary from './openverb.core.json';
// Load library
const library = loadLibrary(coreLibrary);
// Create executor
const executor = createExecutor(library);
// Register handlers
executor.register('create_item', (params) => {
const { collection, data } = params;
// Your implementation here
const item = { id: '123', ...data };
return {
verb: 'create_item',
status: 'success',
data: item,
};
});
// Execute actions
const action = {
verb: 'create_item',
params: {
collection: 'jobs',
data: {
client: 'Smith Construction',
job_type: 'Boundary Survey',
},
},
};
const result = await executor.execute(action);
console.log(result);
// { verb: 'create_item', status: 'success', data: { id: '123', ... } }
From the OpenVerb specification:
create_item, navigate, create_file)openverb.core)(verb, params) and performs the real workloadLibrary(source)Load a verb library from a JSON object or string.
import library from './my-library.json';
const loaded = loadLibrary(library);
buildRegistry(library)Build a verb registry for quick lookup by verb name.
import { buildRegistry } from 'openverb';
const registry = buildRegistry(library);
const verbDef = registry['create_item'];
validateAction(action, verbDef)Validate an action against a verb definition.
import { validateAction } from 'openverb';
const validation = validateAction(action, verbDef);
if (!validation.valid) {
console.error(validation.error);
}
createExecutor(library)Create a simple executor with handler registration.
const executor = createExecutor(library);
// Register handlers
executor.register('create_item', async (params) => {
// Your implementation
return { verb: 'create_item', status: 'success', data: {...} };
});
// Execute actions
const result = await executor.execute(action);
Executor methods:
register(verbName, handler) - Register a handler for a verbexecute(action) - Execute an actiongetRegistry() - Get the verb registrygetVerbs() - Get list of verb namesgetVerb(name) - Get a specific verb definitionFull TypeScript support included:
import type {
VerbLibrary,
Verb,
Action,
ActionResult,
VerbHandler,
} from 'openverb';
const library: VerbLibrary = {
namespace: 'my.app',
version: '1.0.0',
verbs: [...]
};
const action: Action = {
verb: 'create_item',
params: {...}
};
const handler: VerbHandler = (params) => {
return {
verb: 'create_item',
status: 'success',
data: {...}
};
};
Based on the official spec:
{
"namespace": "openverb.core",
"version": "0.1.0",
"description": "Core verbs for AI-driven applications",
"verbs": [
{
"name": "create_item",
"category": "data",
"description": "Create a new item in a logical collection",
"params": {
"collection": {
"type": "string",
"description": "Collection name",
"required": true
},
"data": {
"type": "object",
"description": "Item data",
"required": true
}
},
"returns": {
"id": {
"type": "string",
"description": "Created item ID"
},
"data": {
"type": "object",
"description": "Created item with system fields"
}
},
"destructive": false,
"requires_confirmation": false
}
]
}
import { loadLibrary, createExecutor } from 'openverb';
import type { Action } from 'openverb';
// Simple in-memory database
const db: Record<string, any[]> = {
jobs: [],
};
// Load library
const library = loadLibrary({
namespace: 'my.app',
version: '1.0.0',
verbs: [
{
name: 'create_item',
category: 'data',
description: 'Create an item',
params: {
collection: { type: 'string', description: 'Collection', required: true },
data: { type: 'object', description: 'Data', required: true },
},
},
{
name: 'list_items',
category: 'data',
description: 'List items',
params: {
collection: { type: 'string', description: 'Collection', required: true },
},
},
],
});
// Create executor
const executor = createExecutor(library);
// Register handlers
executor.register('create_item', (params) => {
const { collection, data } = params;
if (!db[collection]) db[collection] = [];
const id = String(db[collection].length);
const item = { id, ...data };
db[collection].push(item);
return {
verb: 'create_item',
status: 'success',
data: item,
};
});
executor.register('list_items', (params) => {
const { collection } = params;
return {
verb: 'list_items',
status: 'success',
items: db[collection] || [],
};
});
// Execute actions
async function main() {
// Create item
const createAction: Action = {
verb: 'create_item',
params: {
collection: 'jobs',
data: {
client: 'Smith Construction',
job_type: 'Boundary Survey',
},
},
};
const result1 = await executor.execute(createAction);
console.log('Created:', result1);
// List items
const listAction: Action = {
verb: 'list_items',
params: { collection: 'jobs' },
};
const result2 = await executor.execute(listAction);
console.log('Jobs:', result2);
}
main();
// 1. Provide the library to the AI in your prompt
const verbs = executor.getVerbs();
const prompt = `
Available actions: ${verbs.join(', ')}
You can perform these actions by responding with:
{ "verb": "create_item", "params": { "collection": "jobs", "data": {...} } }
`;
// 2. Parse AI response and execute
const aiResponse = '{"verb":"create_item","params":{...}}';
const action = JSON.parse(aiResponse);
const result = await executor.execute(action);
The official openverb.core library includes these verbs:
Data:
create_item - Create a new item in a collectionget_item - Fetch a single item by IDlist_items - List items with optional filteringupdate_item - Update fields on an itemdelete_item - Delete an itemsearch_items - Search items with free-text queryFile System:
create_file - Create a new fileread_file - Read file contentswrite_file - Write/overwrite filedelete_file - Delete a fileNavigation:
navigate - Navigate to a route/viewCommunication:
notify_user - Show user notificationSystem:
log_message - Write to application logrun_command - Execute pre-approved commandAnalysis:
calculate - Perform calculationsNLP:
summarize_text - Generate text summariestransform_text - Transform text (rewrite, translate, etc.)Download from: https://github.com/sgthancel/openverb/blob/main/libraries/openverb.core.json
From the OpenVerb README:
AI already "thinks" and talks in verbs. OpenVerb turns that into a clear, reusable action API.
OpenVerb is:
MIT © Roman Hancel
FAQs
Helpers for loading and validating OpenVerb verb libraries
We found that openverb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.