feat: Add intelligent auto-router and enhanced integrations
- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
4
dexto/packages/image-local/.gitignore
vendored
Normal file
4
dexto/packages/image-local/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
node_modules/
|
||||
dist/
|
||||
*.log
|
||||
.DS_Store
|
||||
108
dexto/packages/image-local/CHANGELOG.md
Normal file
108
dexto/packages/image-local/CHANGELOG.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# @dexto/image-local
|
||||
|
||||
## 1.5.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 042f4f0: ### CLI Improvements
|
||||
- Add `/export` command to export conversations as Markdown or JSON
|
||||
- Add `Ctrl+T` toggle for task list visibility during processing
|
||||
- Improve task list UI with collapsible view near the processing message
|
||||
- Fix race condition causing duplicate rendering (mainly visible with explore tool)
|
||||
- Don't truncate `pattern` and `question` args in tool output display
|
||||
|
||||
### Bug Fixes
|
||||
- Fix build script to preserve `.dexto` storage (conversations, logs) during clean builds
|
||||
- Fix `@dexto/tools-todo` versioning - add to fixed version group in changeset config
|
||||
|
||||
### Configuration Changes
|
||||
- Remove approval timeout defaults - now waits indefinitely (better UX for CLI)
|
||||
- Add package versioning guidelines to AGENTS.md
|
||||
|
||||
- Updated dependencies [042f4f0]
|
||||
- @dexto/agent-management@1.5.6
|
||||
- @dexto/tools-filesystem@1.5.6
|
||||
- @dexto/tools-process@1.5.6
|
||||
- @dexto/tools-todo@1.5.6
|
||||
- @dexto/core@1.5.6
|
||||
|
||||
## 1.5.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 9ab3eac: Added todo tools.
|
||||
- Updated dependencies [9ab3eac]
|
||||
- Updated dependencies [63fa083]
|
||||
- Updated dependencies [6df3ca9]
|
||||
- @dexto/tools-todo@0.1.1
|
||||
- @dexto/core@1.5.5
|
||||
- @dexto/tools-filesystem@1.5.5
|
||||
- @dexto/tools-process@1.5.5
|
||||
- @dexto/agent-management@1.5.5
|
||||
|
||||
## 1.5.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0016cd3]
|
||||
- Updated dependencies [499b890]
|
||||
- Updated dependencies [aa2c9a0]
|
||||
- @dexto/core@1.5.4
|
||||
- @dexto/agent-management@1.5.4
|
||||
- @dexto/tools-filesystem@1.5.4
|
||||
- @dexto/tools-process@1.5.4
|
||||
|
||||
## 1.5.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4f00295: Added spawn-agent tools and explore agent.
|
||||
- Updated dependencies [4f00295]
|
||||
- Updated dependencies [69c944c]
|
||||
- @dexto/agent-management@1.5.3
|
||||
- @dexto/tools-filesystem@1.5.3
|
||||
- @dexto/core@1.5.3
|
||||
- @dexto/tools-process@1.5.3
|
||||
|
||||
## 1.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8a85ea4]
|
||||
- Updated dependencies [527f3f9]
|
||||
- @dexto/core@1.5.2
|
||||
- @dexto/tools-filesystem@1.5.2
|
||||
- @dexto/tools-process@1.5.2
|
||||
|
||||
## 1.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [bfcc7b1]
|
||||
- Updated dependencies [4aabdb7]
|
||||
- @dexto/core@1.5.1
|
||||
- @dexto/tools-filesystem@1.5.1
|
||||
- @dexto/tools-process@1.5.1
|
||||
|
||||
## 1.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- e7722e5: Minor version bump for new release with bundler, custom tool pkgs, etc.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1e7e974: Added image bundler, @dexto/image-local and moved tool services outside core. Added registry providers to select core services.
|
||||
- 5fa79fa: Renamed compression to compaction, added context-awareness to hono, updated cli tool display formatting and added integration test for image-local.
|
||||
- Updated dependencies [ee12727]
|
||||
- Updated dependencies [1e7e974]
|
||||
- Updated dependencies [4c05310]
|
||||
- Updated dependencies [5fa79fa]
|
||||
- Updated dependencies [ef40e60]
|
||||
- Updated dependencies [e714418]
|
||||
- Updated dependencies [e7722e5]
|
||||
- Updated dependencies [7d5ab19]
|
||||
- Updated dependencies [436a900]
|
||||
- @dexto/core@1.5.0
|
||||
- @dexto/tools-filesystem@1.5.0
|
||||
- @dexto/tools-process@1.5.0
|
||||
200
dexto/packages/image-local/README.md
Normal file
200
dexto/packages/image-local/README.md
Normal file
@@ -0,0 +1,200 @@
|
||||
# @dexto/image-local
|
||||
|
||||
Local development base image for Dexto agents with filesystem and process tools.
|
||||
|
||||
## Features
|
||||
|
||||
- **SQLite database** - Persistent, local data storage
|
||||
- **Local filesystem blob storage** - Store blobs on local disk
|
||||
- **In-memory caching** - Fast temporary storage
|
||||
- **FileSystem tools** - read, write, edit, glob, grep operations
|
||||
- **Process tools** - bash exec, output, kill operations
|
||||
- **Offline-capable** - No external dependencies required
|
||||
- **Zero configuration** - Sensible defaults for local development
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pnpm add @dexto/image-local @dexto/core @dexto/agent-management
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Create Agent Config
|
||||
|
||||
```yaml
|
||||
# agents/my-agent.yml
|
||||
systemPrompt:
|
||||
contributors:
|
||||
- type: static
|
||||
content: |
|
||||
You are a helpful AI assistant with filesystem and process capabilities.
|
||||
|
||||
llm:
|
||||
provider: anthropic
|
||||
model: claude-sonnet-4-5-20250514
|
||||
|
||||
# Enable filesystem and process tools
|
||||
customTools:
|
||||
- type: filesystem-tools
|
||||
allowedPaths: ['.']
|
||||
blockedPaths: ['.git', 'node_modules']
|
||||
- type: process-tools
|
||||
securityLevel: moderate
|
||||
```
|
||||
|
||||
### 2. Create Your App
|
||||
|
||||
```typescript
|
||||
// index.ts
|
||||
import { createAgent } from '@dexto/image-local';
|
||||
import { loadAgentConfig } from '@dexto/agent-management';
|
||||
|
||||
const config = await loadAgentConfig('./agents/my-agent.yml');
|
||||
|
||||
// Providers already registered! Just create and use.
|
||||
const agent = createAgent(config, './agents/my-agent.yml');
|
||||
await agent.start();
|
||||
|
||||
// Agent now has filesystem and process tools available
|
||||
const response = await agent.run('List the files in the current directory');
|
||||
console.log(response.content);
|
||||
|
||||
await agent.shutdown();
|
||||
```
|
||||
|
||||
**Important**: When using an image, only import from the image package (`@dexto/image-local`). Do not import from `@dexto/core` directly - the image provides everything you need.
|
||||
|
||||
## What's Included
|
||||
|
||||
### Registered Providers
|
||||
|
||||
- **Blob Storage**: `local`, `in-memory`
|
||||
- **Custom Tools**: `filesystem-tools`, `process-tools`
|
||||
|
||||
### FileSystem Tools
|
||||
|
||||
When `filesystem-tools` is enabled in your config:
|
||||
|
||||
- `read_file` - Read file contents with pagination
|
||||
- `write_file` - Write or overwrite files
|
||||
- `edit_file` - Edit files with search/replace operations
|
||||
- `glob_files` - Find files matching glob patterns
|
||||
- `grep_content` - Search file contents using regex
|
||||
|
||||
### Process Tools
|
||||
|
||||
When `process-tools` is enabled in your config:
|
||||
|
||||
- `bash_exec` - Execute bash commands (foreground or background)
|
||||
- `bash_output` - Retrieve output from background processes
|
||||
- `kill_process` - Terminate background processes
|
||||
|
||||
## Configuration
|
||||
|
||||
### FileSystem Tools Config
|
||||
|
||||
```yaml
|
||||
customTools:
|
||||
- type: filesystem-tools
|
||||
allowedPaths: ['.', '/tmp']
|
||||
blockedPaths: ['.git', 'node_modules', '.env']
|
||||
blockedExtensions: ['.exe', '.dll']
|
||||
maxFileSize: 10485760 # 10MB
|
||||
workingDirectory: /path/to/project
|
||||
enableBackups: true
|
||||
backupPath: ./backups
|
||||
backupRetentionDays: 7
|
||||
```
|
||||
|
||||
### Process Tools Config
|
||||
|
||||
```yaml
|
||||
customTools:
|
||||
- type: process-tools
|
||||
securityLevel: moderate # strict | moderate | permissive
|
||||
workingDirectory: /path/to/project
|
||||
maxTimeout: 30000 # milliseconds
|
||||
maxConcurrentProcesses: 5
|
||||
maxOutputBuffer: 1048576 # 1MB
|
||||
allowedCommands: ['ls', 'cat', 'grep'] # strict mode only
|
||||
blockedCommands: ['rm -rf', 'sudo']
|
||||
environment:
|
||||
MY_VAR: value
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
### On-Demand Service Initialization
|
||||
|
||||
Services are initialized only when needed:
|
||||
|
||||
- **FileSystemService** is created when `filesystem-tools` provider is used
|
||||
- **ProcessService** is created when `process-tools` provider is used
|
||||
- No overhead if tools aren't configured
|
||||
|
||||
### Provider Registration
|
||||
|
||||
The image uses **side-effect registration** - providers are registered automatically when you import from the package:
|
||||
|
||||
```typescript
|
||||
import { createAgent } from '@dexto/image-local';
|
||||
// Providers registered as side-effect! ✓
|
||||
```
|
||||
|
||||
All exports from the image (`createAgent`, registries, etc.) trigger provider registration on first import.
|
||||
|
||||
## Default Configuration
|
||||
|
||||
The image provides sensible defaults:
|
||||
|
||||
```typescript
|
||||
{
|
||||
storage: {
|
||||
blob: { type: 'local', storePath: './data/blobs' },
|
||||
database: { type: 'sqlite', path: './data/agent.db' },
|
||||
cache: { type: 'in-memory' }
|
||||
},
|
||||
logging: {
|
||||
level: 'info',
|
||||
fileLogging: true
|
||||
},
|
||||
customTools: [
|
||||
{
|
||||
type: 'filesystem-tools',
|
||||
allowedPaths: ['.'],
|
||||
blockedPaths: ['.git', 'node_modules/.bin', '.env']
|
||||
},
|
||||
{
|
||||
type: 'process-tools',
|
||||
securityLevel: 'moderate'
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
### FileSystem Tools
|
||||
|
||||
- Path validation prevents directory traversal
|
||||
- Blocked paths and extensions prevent access to sensitive files
|
||||
- File size limits prevent memory exhaustion
|
||||
- Optional backups protect against data loss
|
||||
|
||||
### Process Tools
|
||||
|
||||
- Command validation blocks dangerous patterns
|
||||
- Injection detection prevents command injection
|
||||
- Configurable security levels (strict/moderate/permissive)
|
||||
- Process limits prevent resource exhaustion
|
||||
|
||||
## See Also
|
||||
|
||||
- [@dexto/core](../core) - Core agent framework
|
||||
- [@dexto/bundler](../bundler) - Image bundler
|
||||
- [Image Tutorial](../../docs/docs/tutorials/images/) - Learn about images
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
104
dexto/packages/image-local/dexto.image.ts
Normal file
104
dexto/packages/image-local/dexto.image.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Local Development Image
|
||||
*
|
||||
* Pre-configured base image for local agent development with:
|
||||
* - SQLite database (persistent, local)
|
||||
* - Local filesystem blob storage
|
||||
* - In-memory caching
|
||||
* - FileSystem tools (read, write, edit, glob, grep)
|
||||
* - Process tools (bash exec, output, kill)
|
||||
* - Offline-capable
|
||||
*
|
||||
* Tools are automatically registered when this image is imported.
|
||||
* Services are initialized on-demand when tools are used.
|
||||
*/
|
||||
|
||||
import { defineImage } from '@dexto/core';
|
||||
import { PLUGIN_PATH as planToolsPluginPath } from '@dexto/tools-plan';
|
||||
|
||||
export default defineImage({
|
||||
name: 'image-local',
|
||||
version: '1.0.0',
|
||||
description: 'Local development image with filesystem and process tools',
|
||||
target: 'local-development',
|
||||
|
||||
// Bundled plugins - automatically discovered alongside user/project plugins
|
||||
bundledPlugins: [planToolsPluginPath],
|
||||
|
||||
// Provider registration
|
||||
// These providers are registered as side-effects when the image is imported
|
||||
providers: {
|
||||
// Blob storage providers from core
|
||||
blobStore: {
|
||||
register: async () => {
|
||||
const { localBlobStoreProvider, inMemoryBlobStoreProvider } = await import(
|
||||
'@dexto/core'
|
||||
);
|
||||
const { blobStoreRegistry } = await import('@dexto/core');
|
||||
|
||||
blobStoreRegistry.register(localBlobStoreProvider);
|
||||
blobStoreRegistry.register(inMemoryBlobStoreProvider);
|
||||
},
|
||||
},
|
||||
|
||||
// Custom tool providers from separate packages
|
||||
customTools: {
|
||||
register: async () => {
|
||||
const { fileSystemToolsProvider } = await import('@dexto/tools-filesystem');
|
||||
const { processToolsProvider } = await import('@dexto/tools-process');
|
||||
const { agentSpawnerToolsProvider } = await import('@dexto/agent-management');
|
||||
const { todoToolsProvider } = await import('@dexto/tools-todo');
|
||||
const { planToolsProvider } = await import('@dexto/tools-plan');
|
||||
const { customToolRegistry } = await import('@dexto/core');
|
||||
|
||||
customToolRegistry.register(fileSystemToolsProvider);
|
||||
customToolRegistry.register(processToolsProvider);
|
||||
customToolRegistry.register(agentSpawnerToolsProvider);
|
||||
customToolRegistry.register(todoToolsProvider);
|
||||
customToolRegistry.register(planToolsProvider);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Default configuration values
|
||||
defaults: {
|
||||
storage: {
|
||||
blob: {
|
||||
type: 'local',
|
||||
storePath: './data/blobs',
|
||||
},
|
||||
database: {
|
||||
type: 'sqlite',
|
||||
path: './data/agent.db',
|
||||
},
|
||||
cache: {
|
||||
type: 'in-memory',
|
||||
},
|
||||
},
|
||||
logging: {
|
||||
level: 'info',
|
||||
fileLogging: true,
|
||||
},
|
||||
// Default custom tools configuration
|
||||
// Users can add these to their config to enable filesystem and process tools
|
||||
customTools: [
|
||||
{
|
||||
type: 'filesystem-tools',
|
||||
allowedPaths: ['.'],
|
||||
blockedPaths: ['.git', 'node_modules/.bin', '.env'],
|
||||
blockedExtensions: ['.exe', '.dll', '.so'],
|
||||
enableBackups: false,
|
||||
},
|
||||
{
|
||||
type: 'process-tools',
|
||||
securityLevel: 'moderate',
|
||||
},
|
||||
{
|
||||
type: 'todo-tools',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Runtime constraints
|
||||
constraints: ['filesystem-required', 'offline-capable'],
|
||||
});
|
||||
45
dexto/packages/image-local/package.json
Normal file
45
dexto/packages/image-local/package.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "@dexto/image-local",
|
||||
"version": "1.5.6",
|
||||
"description": "Local development base image for Dexto agents with filesystem and process tools",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsx ../image-bundler/dist/cli.js build",
|
||||
"test": "vitest run",
|
||||
"test:integ": "vitest run",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"clean": "rm -rf dist"
|
||||
},
|
||||
"keywords": [
|
||||
"dexto",
|
||||
"image",
|
||||
"local-development",
|
||||
"base-image",
|
||||
"filesystem",
|
||||
"process"
|
||||
],
|
||||
"dependencies": {
|
||||
"@dexto/agent-management": "workspace:*",
|
||||
"@dexto/core": "workspace:*",
|
||||
"@dexto/tools-filesystem": "workspace:*",
|
||||
"@dexto/tools-plan": "workspace:*",
|
||||
"@dexto/tools-process": "workspace:*",
|
||||
"@dexto/tools-todo": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dexto/image-bundler": "workspace:*",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
43
dexto/packages/image-local/test/import.integration.test.ts
Normal file
43
dexto/packages/image-local/test/import.integration.test.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
/**
|
||||
* Integration test to ensure image-local can be imported successfully.
|
||||
* This catches issues where generated code references renamed/missing exports.
|
||||
*/
|
||||
describe('Image Local - Import Integration', () => {
|
||||
it('should import image-local without errors', async () => {
|
||||
// This will fail if the generated code has incorrect imports
|
||||
const module = await import('@dexto/image-local');
|
||||
|
||||
expect(module).toBeDefined();
|
||||
expect(module.createAgent).toBeDefined();
|
||||
expect(module.imageMetadata).toBeDefined();
|
||||
});
|
||||
|
||||
it('should have correct registry exports', async () => {
|
||||
const module = await import('@dexto/image-local');
|
||||
|
||||
// Verify all registries are exported with correct names
|
||||
expect(module.customToolRegistry).toBeDefined();
|
||||
expect(module.pluginRegistry).toBeDefined();
|
||||
expect(module.compactionRegistry).toBeDefined();
|
||||
expect(module.blobStoreRegistry).toBeDefined();
|
||||
});
|
||||
|
||||
it('should not reference old registry names', async () => {
|
||||
// Read the generated file to ensure no old names remain
|
||||
const fs = await import('fs/promises');
|
||||
const path = await import('path');
|
||||
const { fileURLToPath } = await import('url');
|
||||
|
||||
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
const distPath = path.resolve(currentDir, '../dist/index.js');
|
||||
const content = await fs.readFile(distPath, 'utf-8');
|
||||
|
||||
// Should not contain old name
|
||||
expect(content).not.toContain('compressionRegistry');
|
||||
|
||||
// Should contain new name
|
||||
expect(content).toContain('compactionRegistry');
|
||||
});
|
||||
});
|
||||
19
dexto/packages/image-local/tsconfig.json
Normal file
19
dexto/packages/image-local/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": ["ES2022"],
|
||||
"outDir": "./dist",
|
||||
"rootDir": ".",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["dexto.image.ts"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
8
dexto/packages/image-local/vitest.config.ts
Normal file
8
dexto/packages/image-local/vitest.config.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
include: ['test/**/*.integration.test.ts'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user