Library Tools
Library tools are built-in tool integrations you can include by listing them in .devassure/library.yaml.
# .devassure/library.yaml
tools:
- 'authenticator'
- 'faker:*'
faker — Fake Data Generators
Faker provides fake data generators for tests
| Tool | Description |
|---|---|
first_name | Generate a random first name |
last_name | Generate a random last name |
full_name | Generate a random full name |
email | Generate a random email address |
phone | Generate a random phone number |
authenticator — TOTP Helper
Authenticator provides TOTP (Time-based One-Time Password) helpers:
| Tool | Description |
|---|---|
get_authenticator_otp | Generate a TOTP code from an authenticator secret |
Custom Tools
Custom tools let you run any command or script and pass its output to the agent. Configuration lives in .devassure/tools/index.yaml.
tools/index.yaml must exist at .devassure/tools/index.yaml for tools to be available.
Tool Fields
| Field | Required | Description |
|---|---|---|
name | ✅ | Unique identifier for the tool |
description | ✅ | What the tool does |
exec | ✅ | Command to run; supports ${argName} substitution |
cwd | Optional | Working directory relative to the tools/ folder |
args | Optional | List of input parameters (each has name, type, and optional optional: true) |
Supported arg types: string, number, boolean, object
Minimal Example
# .devassure/tools/index.yaml
tools:
- name: "getProjectDetails"
description: "Get project details from API"
cwd: "api-tools"
args:
- name: projectId
type: string
exec: npm run getProjectDetails ${projectId}
Multi-line exec
Use YAML block style for multi-command sequences:
exec: |
npm run warmupTestingProcess
npm run getProjectDetails ${projectId} "${projectName}"
npm run cleanupTestingProcess
Top-level Settings and Setup
settings — Default options applied to every tool and setup step:
| Option | Description |
|---|---|
timeoutSec | Max execution time in seconds |
output.start / output.end | Stdout markers; only content between them is captured as tool output |
env | List of KEY: value environment variables |
ignore_failure | If true, non-zero exit does not fail the run |
setup — Optional steps run once per session before tests start (e.g., npm install). Each step can have name, cwd, and exec.
Capturing Output with Markers
When your script prints extra content (logs, progress), use output markers so only the relevant result is captured:
// In your script (e.g., getProjectDetails.js)
const startMarker = "__TOOL_OUTPUT_START__";
const endMarker = "__TOOL_OUTPUT_END__";
// ... do work, then:
console.log(startMarker);
console.log(JSON.stringify(result));
console.log(endMarker);
# In tools/index.yaml
settings:
output:
start: "__TOOL_OUTPUT_START__"
end: "__TOOL_OUTPUT_END__"
Full tools/index.yaml Example
settings:
timeoutSec: 10
output:
start: "__TOOL_OUTPUT_START__"
end: "__TOOL_OUTPUT_END__"
env:
- BUILD_ENV: "dev"
- DB_NAME: "legacy-db"
ignore_failure: false
setup:
- name: "Install dependencies"
cwd: "api-tools"
exec: "npm install"
tools:
- name: "getProjectDetails"
description: "Get project details from API"
cwd: "api-tools"
args:
- name: projectId
type: string
- name: projectName
type: string
optional: true
exec: |
npm run warmupTestingProcess
npm run getProjectDetails ${projectId} "${projectName}"
npm run cleanupTestingProcess