Application Manager
Operate a chat-first manager for a shared application registry.
Treat the registry file as the source of truth.
Prefer updating the registry over inventing one-off launch rules in chat.
Keep the interaction menu-driven when the user asks to manage the registry directly.
Also use the registry to resolve natural-language application launch requests like open last z.
Core rules
- - Use one shared registry file for registered applications.
- Treat each app entry as a policy object, not just a path shortcut.
- Do not guess executable paths.
- Prefer storing enough information to both start and stop an app reliably.
- For Windows apps, a shortcut path alone may be enough to launch but not enough to stop.
- When known, store the real runtime executable path and process name.
- Show the current stored values before editing an existing entry.
- Confirm before saving additions, edits, deletions, or policy changes.
- When asked to launch a registered app, first check whether the requesting agent is allowed by the app entry.
- If mode is
off, do not launch the app. - If mode is
allowlist, only agents listed in allowed_agents may launch it. - If mode is
full, any agent may launch it. - Prefer stable launcher shapes for Windows execution, such as
cmd.exe /c start "" "<path>", rather than ambiguous interpreter-style launch forms. - Keep entries human-readable and pretty-printed in JSON.
Canonical registry location
Preferred registry path:
If the registry file does not exist yet:
- - say so plainly
- offer to create it
- initialize it as an empty JSON object: INLINECODE7
Trigger phrases
Treat requests like these as a request to open this skill's wizard:
- - INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
Also treat natural-language app-launch requests as a request to use this skill's registry lookup and launch behavior, for example:
- - INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
Start menu
When this skill is triggered for registry management, open an app-first menu.
If the registry has entries, show the apps first as numbered launch targets.
Choosing an app number should launch it directly.
Management actions should be typed as words, not numbered.
Preferred shape:
CODEBLOCK0
If multiple apps exist, continue numbering only the app list.
If the registry file exists but is empty, show:
CODEBLOCK1
If the registry file does not yet exist, say:
CODEBLOCK2
Menu behavior
Start screen app launching
On the start screen, list registered applications as numbered launch targets.
Choosing an app number launches that app directly from the menu.
Treat only app numbers as numeric choices.
Treat management commands as words like add, edit, delete, policy, validate, and quit.
When launching from the start screen:
- - read the registry fresh
- map the chosen number to the selected app
- evaluate launch access using the current agent id
- if mode is
off, refuse launch plainly - if mode is
allowlist, allow launch only when the current agent id is in INLINECODE37 - if mode is
full, allow launch - if access is allowed, prefer a stable Windows launcher shape:
-
cmd.exe /c start "" "<launch_path>"
- - report success or the exact launcher error
- after the result, repeat the start menu
If the user wants details instead of launch, the skill may show the selected app entry before acting only when needed for confirmation or troubleshooting.
Add application
Prompt for:
- - friendly app name
- Windows launch path to executable or shortcut
- optional real runtime executable path
- optional process name used to stop the app
- mode:
full, allowlist, or INLINECODE42 - allowed agents if mode is INLINECODE43
Rules:
- - use the friendly app name as the registry key unless a different stable key is already established
- reject duplicate names unless the user explicitly switches to Edit
- if mode is
full, store an empty allowed_agents array - if mode is
off, store an empty allowed_agents array - if mode is
allowlist, require at least one allowed agent
Before saving, show the proposed entry and ask for explicit confirmation.
After save, repeat the start menu.
Edit application
Show the numbered list of apps.
The user chooses an entry number.
Allow back or quit.
Then show:
CODEBLOCK3
Show the proposed updated entry before writing.
Ask for explicit confirmation.
Then repeat the start menu.
Delete application
Show the numbered list.
The user chooses an entry number.
Allow back or quit.
Then show the selected entry and ask for explicit confirmation.
Do not delete without confirmation.
After delete, confirm success and repeat the start menu.
Change launch policy
Show the numbered list.
The user chooses an entry number.
Allow back or quit.
Then offer:
CODEBLOCK4
Rules:
- - if switching to
full, clear INLINECODE56 - if switching to
off, clear INLINECODE58 - if switching to
allowlist, require at least one allowed agent - always show the final proposed policy before saving
- ask for explicit confirmation before writing
Validate registry
Read the registry fresh and validate each entry.
For each app, check:
- - entry is a JSON object
- INLINECODE60 exists and is non-empty
- INLINECODE61 is optional
- INLINECODE62 is optional
- INLINECODE63 is one of
full, allowlist, INLINECODE66 - INLINECODE67 is an array
- INLINECODE68 is non-empty when mode is INLINECODE69
Display grouped results:
- - valid
- incomplete
- malformed
- policy mismatch
Do not guess repairs.
If JSON is malformed, stop and report the parse error clearly.
After reporting, repeat the start menu.
Quit
Exit cleanly with a short completion message.
Registry shape
Use this JSON shape:
CODEBLOCK5
Keep the schema simple unless a stronger need appears later.
Do not add extra metadata fields by default.
Launch behavior guidance
When a user asks to run a registered app, including natural-language requests like open last z:
- - read the registry fresh
- match the requested app name against friendly names in the registry, preferring exact case-insensitive match before looser contains matching
- if one clear match is found, use it
- if multiple plausible matches are found, ask a short disambiguation question
- if no match is found, say so plainly and offer to open the Application Manager menu
- evaluate access using the current agent id
- if access is denied, say so plainly
- if access is allowed, prefer a stable Windows launcher shape such as:
-
cmd.exe /c start "" "<launch_path>"
- - report success or the exact launcher error
When a user asks to stop or close a registered app:
- - read the registry fresh
- match the requested app name against friendly names in the registry
- if
process_name is present, prefer stopping by that process name or PID discovery based on that process - if only
runtime_exe is present, identify the running process from that executable path, then stop it - if neither
process_name nor runtime_exe is present, say the app can be launched but does not yet have enough stop metadata stored - report success or the exact stop error
If a direct .lnk or interpreter-style launch fails due to execution-policy shape, retry with a stable launcher executable before concluding the app cannot be opened.
Implementation guidance
When reading or writing the registry:
- - create
~/.openclaw/registries/ if needed - read the current JSON fresh each time before mutation
- preserve valid existing entries
- write pretty-printed JSON for readability
- never leave the file partially written
If JSON is malformed:
- - stop
- report the parse error clearly
- do not guess repairs without approval
Optional reference
If needed for future expansion, add references under references/ for:
- - registry schema notes
- launcher patterns
- agent-policy examples
应用程序管理器
为共享的应用程序注册表操作一个以聊天为先的管理器。
将注册表文件视为事实来源。
优先更新注册表,而不是在聊天中临时创建一次性启动规则。
当用户要求直接管理注册表时,保持菜单驱动的交互方式。
同时使用注册表来解析自然语言的应用程序启动请求,例如打开 last z。
核心规则
- - 使用一个共享的注册表文件来管理已注册的应用程序。
- 将每个应用条目视为策略对象,而不仅仅是路径快捷方式。
- 不要猜测可执行文件路径。
- 优先存储足够的信息,以便可靠地启动和停止应用程序。
- 对于Windows应用程序,单独的快捷方式路径可能足以启动,但不足以停止。
- 如果已知,存储真实的运行时可执行文件路径和进程名称。
- 在编辑现有条目之前,显示当前存储的值。
- 在保存添加、编辑、删除或策略更改之前进行确认。
- 当被要求启动已注册的应用程序时,首先检查请求代理是否被该应用条目允许。
- 如果模式为off,则不启动应用程序。
- 如果模式为allowlist,只有列在allowed_agents中的代理才能启动它。
- 如果模式为full,任何代理都可以启动它。
- 对于Windows执行,优先使用稳定的启动器形式,例如cmd.exe /c start ,而不是模糊的解释器式启动形式。
- 保持条目易于阅读,并以JSON格式漂亮打印。
规范注册表位置
首选注册表路径:
- - ~/.openclaw/registries/application_registry.json
如果注册表文件尚不存在:
- - 直接说明
- 提供创建选项
- 初始化为空JSON对象:{}
触发短语
将以下请求视为打开此技能向导的请求:
- - 应用程序管理器
- 打开应用程序管理器
- 显示应用程序管理器
- 应用程序注册表
- 打开应用程序注册表
- 显示应用程序注册表
- 应用注册表
- 注册应用程序
- 添加应用程序
- 编辑应用程序
- 更改应用程序策略
- 谁可以运行此应用
- 列出已注册的应用
同时将自然语言的应用启动请求视为使用此技能的注册表查找和启动行为,例如:
- - 打开 last z
- 启动 last z
- 运行 last z
- 开始 last z
- 打开 <已注册的应用名称>
- 启动 <已注册的应用名称>
- 运行 <已注册的应用名称>
- 开始 <已注册的应用名称>
启动菜单
当此技能被触发进行注册表管理时,打开一个以应用优先的菜单。
如果注册表中有条目,首先将应用显示为编号的启动目标。
选择应用编号应直接启动它。
管理操作应以文字形式输入,而不是编号。
首选格式:
text
应用程序管理器
注册表文件: ~/.openclaw/registries/application_registry.json
应用程序
- 1. Last Z
命令
- - add
- edit
- delete
- policy
- validate
- quit
回复应用编号以启动它,或输入add、edit、delete、policy、validate或quit。
如果存在多个应用,仅对应用列表继续编号。
如果注册表文件存在但为空,显示:
text
应用程序管理器
注册表文件: ~/.openclaw/registries/application_registry.json
状态: 尚未注册任何应用程序
命令
回复add或quit。
如果注册表文件尚不存在,显示:
text
应用程序管理器
注册表文件: ~/.openclaw/registries/application_registry.json
状态: 尚未创建
命令
回复create或quit。
菜单行为
启动屏幕应用启动
在启动屏幕上,将已注册的应用程序列为编号的启动目标。
选择应用编号直接从菜单启动该应用。
仅将应用编号视为数字选择。
将管理命令视为文字,如add、edit、delete、policy、validate和quit。
从启动屏幕启动时:
- - 重新读取注册表
- 将所选编号映射到所选应用
- 使用当前代理ID评估启动访问权限
- 如果模式为off,直接拒绝启动
- 如果模式为allowlist,仅当当前代理ID在allowed_agents中时才允许启动
- 如果模式为full,允许启动
- 如果允许访问,优先使用稳定的Windows启动器形式:
- cmd.exe /c start
- - 报告成功或确切的启动器错误
- 在结果之后,重复启动菜单
如果用户想要详细信息而不是启动,技能可以在必要时显示所选应用条目,仅用于确认或故障排除。
添加应用程序
提示输入:
- - 友好的应用名称
- Windows启动路径(可执行文件或快捷方式)
- 可选的真实运行时可执行文件路径
- 可选的用于停止应用的进程名称
- 模式:full、allowlist或off
- 如果模式为allowlist,允许的代理
规则:
- - 使用友好的应用名称作为注册表键,除非已建立不同的稳定键
- 拒绝重复名称,除非用户明确切换到编辑
- 如果模式为full,存储空的allowedagents数组
- 如果模式为off,存储空的allowedagents数组
- 如果模式为allowlist,至少需要一个允许的代理
在保存之前,显示提议的条目并要求明确确认。
保存后,重复启动菜单。
编辑应用程序
显示编号的应用列表。
用户选择一个条目编号。
允许back或quit。
然后显示:
text
编辑应用程序
已选择: Last Z
当前值:
- - launchpath: C:\Users\greg\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Last Z\Last Z.lnk
- runtimeexe: C:\Users\greg\AppData\Local\Last Z\Game\Survival.exe
- processname: Survival.exe
- mode: allowlist
- allowedagents: system_engineer
回复:
- 1. 编辑启动路径
- 编辑运行时可执行文件路径
- 编辑进程名称
- 编辑模式
- 编辑允许的代理
- 编辑全部
输入back返回或quit退出。
在写入之前显示提议的更新条目。
要求明确确认。
然后重复启动菜单。
删除应用程序
显示编号列表。
用户选择一个条目编号。
允许back或quit。
然后显示所选条目并要求明确确认。
未经确认不删除。
删除后,确认成功并重复启动菜单。
更改启动策略
显示编号列表。
用户选择一个条目编号。
允许back或quit。
然后提供:
text
更改启动策略
已选择: Last Z
当前模式: allowlist
当前allowedagents: systemengineer
回复:
- 1. 将模式设置为full
- 将模式设置为allowlist
- 将模式设置为off
- 仅编辑允许的代理
输入back返回或quit退出。
规则:
- - 如果切换到full,清空allowedagents
- 如果切换到off,清空allowedagents
- 如果切换到allowlist,至少需要一个允许的代理
- 在保存之前始终显示最终的提议策略
- 在写入之前要求明确确认
验证注册表
重新读取注册表并验证每个条目。
对于每个应用,检查:
- - 条目是JSON对象
- launchpath存在且非空
- runtimeexe是可选的
- processname是可选的
- mode是full、allowlist、off之一
- allowedagents是数组
- 当模式为allowlist时,allowed_agents非空
显示分组结果:
不要猜测修复。
如果JSON格式错误,停止并清晰报告解析错误。
报告后,重复启动菜单。
退出
以简短完成消息干净退出。
注册表格式
使用此JSON格式:
json
{
Last Z: {
launch_path: C:\\Users\\greg\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Last Z\\Last Z.lnk,
runtime_exe: C:\\Users\\greg\\AppData\\Local\\Last Z\\Game\\Survival.exe,
process_name: Survival.exe,
mode: allowlist,
allowed_agents: [
system_engineer
]
}
}
保持模式简单,除非以后出现更强的需求。
默认不添加额外的元数据字段。
启动行为指导
当用户要求运行已注册的应用程序时,包括自然语言请求如open last z:
-