@dexto/image-local
Dexto 的本地开发图像 .
此包默认导出一个键入 DextoImage (无副作用,无登记). 主机
(CLI/server/apps)装入图像并解析配置 → 混凝土服务通过 @dexto/agent-config。 。 。 .
包含的内容
- 存储: 当地
DextoStores用文件系统文物、 SQLite 会话数据以及默认的模拟快状态所建 - 工作空间控件: 用于本地 CLI/ app 运行的本地文件系统工作空间控件
- 技能: 通过 Core 打开本地和插件技能目录
Skills合同 - 工具工厂: 内建、 文件系统、 进程、 待办事宜、 计划、 代理发布器
- 钩子:内容政策、响应-卫生
- 压缩:反应性流量,无
- 锁定器页:1
defaultLoggerFactory
CLI 使用情况
将图像安装到 Dexto 图像存储器中, 然后从 YAML 引用 :
dexto image install @dexto/image-local
# agents/my-agent.yml
image: "@dexto/image-local"
systemPrompt:
contributors:
- type: static
content: You are a helpful assistant.
llm:
provider: anthropic
model: claude-sonnet-4-5-20250514
tools:
- type: filesystem-tools
allowedPaths: ["."]
blockedPaths: [".git", "node_modules"]
- type: process-tools
securityLevel: moderate
注释:
- 奥米
tools:用于image.defaults.tools。 。 。 . - 存储默认来自
image.defaults.storage解决的方式storage.createStores(...)。 。 。 . filesystem-tools.allowedPaths定义静态沙盒。 在手动模式下,试图访问沙盒外的路径会触发目录访问批准提示;如果批准,则允许当前会话或单一事件访问.
App 用途( 直接导入)
import imageLocal from '@dexto/image-local';
import { DextoAgent } from '@dexto/core';
import { loadAgentConfig, enrichAgentConfig } from '@dexto/agent-management';
import {
AgentConfigSchema,
applyImageDefaults,
resolveServicesFromConfig,
toDextoAgentOptions,
} from '@dexto/agent-config';
const configPath = './agents/my-agent.yml';
const raw = await loadAgentConfig(configPath);
const withDefaults = applyImageDefaults(raw, imageLocal.defaults);
const enriched = enrichAgentConfig(withDefaults, configPath);
const config = AgentConfigSchema.parse(enriched);
const services = await resolveServicesFromConfig(config, imageLocal);
const agent = new DextoAgent(toDextoAgentOptions({ config, services }));
await agent.start();