metame-cli 1.5.10 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +49 -6
  2. package/index.js +266 -72
  3. package/package.json +7 -3
  4. package/scripts/daemon-admin-commands.js +34 -0
  5. package/scripts/daemon-agent-commands.js +6 -2
  6. package/scripts/daemon-bridges.js +41 -10
  7. package/scripts/daemon-claude-engine.js +128 -29
  8. package/scripts/daemon-command-router.js +16 -0
  9. package/scripts/daemon-command-session-route.js +3 -1
  10. package/scripts/daemon-default.yaml +3 -1
  11. package/scripts/daemon-engine-runtime.js +1 -5
  12. package/scripts/daemon-message-pipeline.js +113 -44
  13. package/scripts/daemon-ops-commands.js +25 -11
  14. package/scripts/daemon-reactive-lifecycle.js +757 -76
  15. package/scripts/daemon-session-commands.js +3 -2
  16. package/scripts/daemon-session-store.js +82 -27
  17. package/scripts/daemon-team-dispatch.js +21 -5
  18. package/scripts/daemon-utils.js +3 -1
  19. package/scripts/daemon.js +80 -2
  20. package/scripts/distill.js +1 -1
  21. package/scripts/docs/file-transfer.md +1 -0
  22. package/scripts/docs/maintenance-manual.md +55 -2
  23. package/scripts/docs/pointer-map.md +34 -0
  24. package/scripts/feishu-adapter.js +25 -0
  25. package/scripts/hooks/intent-file-transfer.js +2 -1
  26. package/scripts/hooks/intent-perpetual.js +109 -0
  27. package/scripts/hooks/intent-research.js +112 -0
  28. package/scripts/intent-registry.js +4 -0
  29. package/scripts/memory-extract.js +29 -1
  30. package/scripts/memory-nightly-reflect.js +104 -0
  31. package/scripts/ops-mission-queue.js +258 -0
  32. package/scripts/ops-verifier.js +197 -0
  33. package/scripts/signal-capture.js +3 -3
  34. package/scripts/skill-evolution.js +11 -2
  35. package/skills/agent-browser/SKILL.md +153 -0
  36. package/skills/agent-reach/SKILL.md +66 -0
  37. package/skills/agent-reach/evolution.json +13 -0
  38. package/skills/deep-research/SKILL.md +77 -0
  39. package/skills/find-skills/SKILL.md +133 -0
  40. package/skills/heartbeat-task-manager/SKILL.md +63 -0
  41. package/skills/macos-local-orchestrator/SKILL.md +192 -0
  42. package/skills/macos-local-orchestrator/agents/openai.yaml +4 -0
  43. package/skills/macos-local-orchestrator/references/tooling-landscape.md +70 -0
  44. package/skills/macos-mail-calendar/SKILL.md +394 -0
  45. package/skills/mcp-installer/SKILL.md +138 -0
  46. package/skills/skill-creator/LICENSE.txt +202 -0
  47. package/skills/skill-creator/README.md +72 -0
  48. package/skills/skill-creator/SKILL.md +96 -0
  49. package/skills/skill-creator/evolution.json +6 -0
  50. package/skills/skill-creator/references/creation-guide.md +116 -0
  51. package/skills/skill-creator/references/evolution-guide.md +74 -0
  52. package/skills/skill-creator/references/output-patterns.md +82 -0
  53. package/skills/skill-creator/references/workflows.md +28 -0
  54. package/skills/skill-creator/scripts/align_all.py +32 -0
  55. package/skills/skill-creator/scripts/auto_evolve_hook.js +247 -0
  56. package/skills/skill-creator/scripts/init_skill.py +303 -0
  57. package/skills/skill-creator/scripts/merge_evolution.py +70 -0
  58. package/skills/skill-creator/scripts/package_skill.py +110 -0
  59. package/skills/skill-creator/scripts/quick_validate.py +103 -0
  60. package/skills/skill-creator/scripts/setup.py +141 -0
  61. package/skills/skill-creator/scripts/smart_stitch.py +82 -0
  62. package/skills/skill-manager/SKILL.md +112 -0
  63. package/skills/skill-manager/scripts/delete_skill.py +31 -0
  64. package/skills/skill-manager/scripts/list_skills.py +61 -0
  65. package/skills/skill-manager/scripts/scan_and_check.py +125 -0
  66. package/skills/skill-manager/scripts/sync_index.py +144 -0
  67. package/skills/skill-manager/scripts/update_helper.py +39 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: find-skills
3
+ description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
4
+ ---
5
+
6
+ # Find Skills
7
+
8
+ This skill helps you discover and install skills from the open agent skills ecosystem.
9
+
10
+ ## When to Use This Skill
11
+
12
+ Use this skill when the user:
13
+
14
+ - Asks "how do I do X" where X might be a common task with an existing skill
15
+ - Says "find a skill for X" or "is there a skill for X"
16
+ - Asks "can you do X" where X is a specialized capability
17
+ - Expresses interest in extending agent capabilities
18
+ - Wants to search for tools, templates, or workflows
19
+ - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
20
+
21
+ ## What is the Skills CLI?
22
+
23
+ The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
24
+
25
+ **Key commands:**
26
+
27
+ - `npx skills find [query]` - Search for skills interactively or by keyword
28
+ - `npx skills add <package>` - Install a skill from GitHub or other sources
29
+ - `npx skills check` - Check for skill updates
30
+ - `npx skills update` - Update all installed skills
31
+
32
+ **Browse skills at:** https://skills.sh/
33
+
34
+ ## How to Help Users Find Skills
35
+
36
+ ### Step 1: Understand What They Need
37
+
38
+ When a user asks for help with something, identify:
39
+
40
+ 1. The domain (e.g., React, testing, design, deployment)
41
+ 2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
42
+ 3. Whether this is a common enough task that a skill likely exists
43
+
44
+ ### Step 2: Search for Skills
45
+
46
+ Run the find command with a relevant query:
47
+
48
+ ```bash
49
+ npx skills find [query]
50
+ ```
51
+
52
+ For example:
53
+
54
+ - User asks "how do I make my React app faster?" → `npx skills find react performance`
55
+ - User asks "can you help me with PR reviews?" → `npx skills find pr review`
56
+ - User asks "I need to create a changelog" → `npx skills find changelog`
57
+
58
+ The command will return results like:
59
+
60
+ ```
61
+ Install with npx skills add <owner/repo@skill>
62
+
63
+ vercel-labs/agent-skills@vercel-react-best-practices
64
+ └ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
65
+ ```
66
+
67
+ ### Step 3: Present Options to the User
68
+
69
+ When you find relevant skills, present them to the user with:
70
+
71
+ 1. The skill name and what it does
72
+ 2. The install command they can run
73
+ 3. A link to learn more at skills.sh
74
+
75
+ Example response:
76
+
77
+ ```
78
+ I found a skill that might help! The "vercel-react-best-practices" skill provides
79
+ React and Next.js performance optimization guidelines from Vercel Engineering.
80
+
81
+ To install it:
82
+ npx skills add vercel-labs/agent-skills@vercel-react-best-practices
83
+
84
+ Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
85
+ ```
86
+
87
+ ### Step 4: Offer to Install
88
+
89
+ If the user wants to proceed, you can install the skill for them:
90
+
91
+ ```bash
92
+ npx skills add <owner/repo@skill> -g -y
93
+ ```
94
+
95
+ The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
96
+
97
+ ## Common Skill Categories
98
+
99
+ When searching, consider these common categories:
100
+
101
+ | Category | Example Queries |
102
+ | --------------- | ---------------------------------------- |
103
+ | Web Development | react, nextjs, typescript, css, tailwind |
104
+ | Testing | testing, jest, playwright, e2e |
105
+ | DevOps | deploy, docker, kubernetes, ci-cd |
106
+ | Documentation | docs, readme, changelog, api-docs |
107
+ | Code Quality | review, lint, refactor, best-practices |
108
+ | Design | ui, ux, design-system, accessibility |
109
+ | Productivity | workflow, automation, git |
110
+
111
+ ## Tips for Effective Searches
112
+
113
+ 1. **Use specific keywords**: "react testing" is better than just "testing"
114
+ 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
115
+ 3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
116
+
117
+ ## When No Skills Are Found
118
+
119
+ If no relevant skills exist:
120
+
121
+ 1. Acknowledge that no existing skill was found
122
+ 2. Offer to help with the task directly using your general capabilities
123
+ 3. Suggest the user could create their own skill with `npx skills init`
124
+
125
+ Example:
126
+
127
+ ```
128
+ I searched for skills related to "xyz" but didn't find any matches.
129
+ I can still help you with this task directly! Would you like me to proceed?
130
+
131
+ If this is something you do often, you could create your own skill:
132
+ npx skills init my-xyz-skill
133
+ ```
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: heartbeat-task-manager
3
+ description: |
4
+ 管理 MetaMe Desktop 的心跳任务(提醒任务)。
5
+ 当用户说“每天提醒我…”、“6点提醒我…”时,优先用本技能自动创建/更新任务,
6
+ 并通过 /tasks、/run <task> 与手机端协同。
7
+ ---
8
+
9
+ # Heartbeat Task Manager
10
+
11
+ 用于 MetaMe Desktop Daemon 的心跳任务管理。
12
+
13
+ ## 适用场景
14
+
15
+ - 用户说“每天提醒我…”
16
+ - 用户说“6点提醒我…”
17
+ - 用户要查看已有任务
18
+ - 用户要让后台立即执行某个任务
19
+
20
+ ## 强约束
21
+
22
+ 1. 仅操作 `~/.metame-desktop/config-desktop.yaml` 对应的 Desktop 任务域。
23
+ 2. 不操作外部项目 daemon,不执行全局进程控制。
24
+ 3. 优先使用 CLI 子命令,不手改 YAML 文本。
25
+
26
+ ## 推荐流程
27
+
28
+ ### 1) 新增/更新提醒任务
29
+
30
+ 当用户给出提醒语句时,执行:
31
+
32
+ ```bash
33
+ metame daemon --sub add-task --text "<用户原话>"
34
+ ```
35
+
36
+ 示例:
37
+
38
+ ```bash
39
+ metame daemon --sub add-task --text "每天6点提醒我喝水"
40
+ metame daemon --sub add-task --text "每天提醒我复盘今天进展"
41
+ ```
42
+
43
+ ### 2) 查看任务列表
44
+
45
+ ```bash
46
+ metame daemon --sub tasks
47
+ ```
48
+
49
+ ### 3) 手机端联动提示
50
+
51
+ 创建成功后,告诉用户:
52
+
53
+ - 手机可发送 `/tasks` 查看列表
54
+ - 手机可发送 `/run <task>` 立即执行
55
+
56
+ ## 回复模板(简短)
57
+
58
+ - 成功:
59
+ - 已帮你设置提醒任务。
60
+ - 你可以在手机输入 `/tasks` 查看,或 `/run <task>` 立即执行。
61
+ - 失败(语义不匹配):
62
+ - 我没识别到提醒语义,请改成“每天提醒我…”或“每天6点提醒我…”。
63
+
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: macos-local-orchestrator
3
+ description: |
4
+ macOS 本地自动化编排与能力融合。通过 Bash + osascript/JXA + Shortcuts + launchd
5
+ 实现自然语言电脑管家,并在需要时编排 Hammerspoon、AeroSpace、yabai/skhd、
6
+ Raycast Script Commands、Keyboard Maestro 等第三方工具。适用于应用控制、系统控制、
7
+ 权限引导、窗口管理、快捷操作、定时任务与桌面自动化场景。
8
+ ---
9
+
10
+ # macOS Local Orchestrator
11
+
12
+ Use local deterministic automation on macOS with minimal token usage.
13
+
14
+ ## Execution Policy
15
+
16
+ 1. Prefer local deterministic tools first: `Bash` + `osascript`/JXA.
17
+ 2. Prefer built-in macOS capabilities before third-party tools.
18
+ 3. Avoid screenshot/visual workflows unless user explicitly asks for them.
19
+ 4. Classify every request before execution:
20
+ - Read/query action: execute directly.
21
+ - Side-effect action: show a short preview and ask for explicit confirmation first.
22
+ 5. Keep output short: success/failure + key result only.
23
+
24
+ ## Capability Ladder
25
+
26
+ ### L0 Native (default)
27
+
28
+ Use these first because they are stable and dependency-free:
29
+ - `osascript` AppleScript/JXA for app/system control
30
+ - `open` and `x-apple.systempreferences:` for settings navigation
31
+ - `shortcuts` CLI for reusable workflows
32
+ - `launchctl` + `~/Library/LaunchAgents` for scheduled/background jobs
33
+ - `pmset` for power scheduling
34
+
35
+ ### L1 Optional Integrations (when user already has them)
36
+
37
+ Detect tool availability and then use:
38
+ - `AeroSpace` for tiling/workspace (SIP-friendly, CLI-first)
39
+ - `yabai` + `skhd` for advanced window + hotkey control
40
+ - `Hammerspoon` for event-driven automation (`~/.hammerspoon/init.lua`)
41
+ - `Raycast` Script Commands / Deeplinks for launcher workflows
42
+ - `Keyboard Maestro` CLI trigger for mature macro pipelines
43
+
44
+ Do not force-install tools automatically unless user explicitly requests installation.
45
+
46
+ ## Tool Selection Rules
47
+
48
+ 1. If user asks app open/quit, volume, lock/sleep, permissions: use `osascript` first.
49
+ 2. If user asks reusable multi-step workflow: prefer `shortcuts run`.
50
+ 3. If user asks scheduled recurring action: prefer `launchd` or `pmset`.
51
+ 4. If user asks keyboard-first window tiling:
52
+ - Prefer `AeroSpace` if installed.
53
+ - Else use `yabai/skhd` if installed.
54
+ - Else fallback to native scripting and explain capability limits.
55
+ 5. If user asks event-driven desktop reactions (wifi change, battery alerts, app watcher): use `Hammerspoon` if installed.
56
+ 6. If user already uses Raycast/Keyboard Maestro ecosystem, integrate by calling their commands instead of rebuilding features.
57
+
58
+ For ecosystem-level tool tradeoffs and install decisions, read:
59
+ `references/tooling-landscape.md`
60
+
61
+ ## Side-Effect Confirmation Rules
62
+
63
+ Require confirmation before any action that changes state, including:
64
+ - Sending email, creating/deleting/modifying calendar events
65
+ - Quitting apps, system sleep, lock screen
66
+ - Writing/moving/deleting files or folders
67
+ - Any command with unclear scope or risk
68
+
69
+ Use this confirmation template:
70
+ - `准备执行:<one-line action>`
71
+ - `命令:<exact command>`
72
+ - `请回复“确认执行”后继续。`
73
+
74
+ ## Native Command Patterns
75
+
76
+ Open app:
77
+
78
+ ```bash
79
+ osascript -e 'tell application "WeChat" to activate'
80
+ ```
81
+
82
+ Quit app:
83
+
84
+ ```bash
85
+ osascript -e 'tell application "WeChat" to quit'
86
+ ```
87
+
88
+ Set volume:
89
+
90
+ ```bash
91
+ osascript -e 'set volume output volume 35'
92
+ ```
93
+
94
+ Mute / unmute:
95
+
96
+ ```bash
97
+ osascript -e 'set volume with output muted'
98
+ osascript -e 'set volume without output muted'
99
+ ```
100
+
101
+ Lock screen:
102
+
103
+ ```bash
104
+ osascript -e 'tell application "System Events" to keystroke "q" using {control down, command down}'
105
+ ```
106
+
107
+ Sleep:
108
+
109
+ ```bash
110
+ osascript -e 'tell application "System Events" to sleep'
111
+ ```
112
+
113
+ Open permissions/settings:
114
+
115
+ ```bash
116
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_Automation"
117
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"
118
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"
119
+ ```
120
+
121
+ Run shortcut:
122
+
123
+ ```bash
124
+ shortcuts list
125
+ shortcuts run "My Shortcut"
126
+ shortcuts run "My Shortcut" -i ~/Desktop/input.txt -o ~/Desktop/output.txt
127
+ ```
128
+
129
+ Create/refresh LaunchAgent job:
130
+
131
+ ```bash
132
+ launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.metame.task.plist 2>/dev/null || true
133
+ launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.metame.task.plist
134
+ launchctl print gui/$(id -u)/com.metame.task
135
+ ```
136
+
137
+ Power schedule:
138
+
139
+ ```bash
140
+ pmset -g sched
141
+ sudo pmset repeat wake M 08:00:00
142
+ sudo pmset repeat cancel
143
+ ```
144
+
145
+ ## Optional Tool Patterns
146
+
147
+ AeroSpace (if installed):
148
+
149
+ ```bash
150
+ aerospace list-workspaces --all
151
+ aerospace focus-workspace 2
152
+ aerospace move-node-to-workspace 2
153
+ ```
154
+
155
+ yabai/skhd (if installed):
156
+
157
+ ```bash
158
+ yabai -m query --windows --window
159
+ yabai -m window --focus east
160
+ skhd --reload
161
+ ```
162
+
163
+ Keyboard Maestro CLI (if installed):
164
+
165
+ ```bash
166
+ ls "/Applications/Keyboard Maestro.app/Contents/MacOS" 2>/dev/null
167
+ ```
168
+
169
+ ## Error Handling
170
+
171
+ 1. If command output is empty for successful action, report as `已执行` (not `no output`).
172
+ 2. If permission is missing, explain which permission is required and guide user to open the corresponding settings page, then retry.
173
+ 3. If app name is ambiguous, ask a clarification question before executing.
174
+ 4. If requested third-party tool is missing, provide:
175
+ - current state (`未检测到 <tool>`)
176
+ - minimal install command (only when user asks to install)
177
+ - immediate native fallback plan.
178
+
179
+ ## Permission Checklist
180
+
181
+ - Automation: Privacy & Security -> Automation
182
+ - Accessibility: Privacy & Security -> Accessibility
183
+ - Screen & System Audio Recording (only if screen pipeline is explicitly needed)
184
+ - Full Disk Access (only for file-heavy operations)
185
+
186
+ Permission onboarding commands:
187
+
188
+ ```bash
189
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_Automation"
190
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"
191
+ open "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"
192
+ ```
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "macOS Local Orchestrator"
3
+ short_description: "Use local Bash/AppleScript to automate Mac tasks safely"
4
+ default_prompt: "Use this skill to automate macOS with local scripts and confirmation for side effects."
@@ -0,0 +1,70 @@
1
+ # macOS Automation Tooling Landscape (Fusion Notes)
2
+
3
+ ## Goal
4
+
5
+ Map mature macOS automation ecosystems into one orchestration skill, with a native-first strategy.
6
+
7
+ ## Native Foundation (Always Available)
8
+
9
+ 1. AppleScript / JXA via `osascript`
10
+ - Use for app control, system actions, and cross-app scripting.
11
+ 2. Shortcuts CLI (`shortcuts`)
12
+ - Use for reusable multi-step workflows and parameterized runs.
13
+ 3. `launchd` / `launchctl`
14
+ - Use for resilient user-level background tasks (`~/Library/LaunchAgents`).
15
+ 4. `pmset`
16
+ - Use for wake/sleep scheduling.
17
+ 5. System Settings deep links (`x-apple.systempreferences:`)
18
+ - Use for permission onboarding and recovery.
19
+
20
+ ## Third-Party Integrations (Optional)
21
+
22
+ 1. Hammerspoon
23
+ - Best for event-driven automation and custom hotkey/event hooks.
24
+ - Needs Accessibility permissions.
25
+ 2. AeroSpace
26
+ - Best for keyboard-first tiling workspace management.
27
+ - CLI-oriented and SIP-friendly.
28
+ 3. yabai + skhd
29
+ - Best for advanced window tree manipulation + hotkey daemon.
30
+ - Powerful but setup can be more complex than native/AeroSpace.
31
+ 4. Raycast Script Commands
32
+ - Best for launcher-style command catalog and human-triggered flows.
33
+ 5. Keyboard Maestro
34
+ - Best for mature macro workflows in GUI-heavy productivity use cases.
35
+
36
+ ## Fusion Strategy
37
+
38
+ 1. Keep one unified intent layer in `macos-local-orchestrator`.
39
+ 2. Apply runtime detection:
40
+ - If requested tool exists, use it.
41
+ - If missing, fallback to native path and report gap briefly.
42
+ 3. Keep confirmation gate for all side effects.
43
+ 4. Prefer native fallback before introducing new dependencies.
44
+
45
+ ## Source Links
46
+
47
+ - Apple: Mac Automation Scripting Guide
48
+ https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/
49
+ - Apple: `shortcuts` command-line docs
50
+ https://support.apple.com/guide/shortcuts-mac/command-line-interface-apd455c82f02/mac
51
+ - Apple: Launch daemons and agents
52
+ https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html
53
+ - Apple: `pmset` usage
54
+ https://support.apple.com/en-sa/guide/mac-help/mchl40376151/mac
55
+ - Apple: Allow apps to control your Mac (Automation permission)
56
+ https://support.apple.com/en-vn/guide/mac-help/mchl108e1718/mac
57
+ - Apple: Allow accessibility apps to access your Mac
58
+ https://support.apple.com/en-kz/guide/mac-help/mh43185/mac
59
+ - Hammerspoon docs
60
+ https://www.hammerspoon.org/docs/
61
+ - AeroSpace repo/docs
62
+ https://github.com/nikitabobko/AeroSpace
63
+ - yabai repo/docs
64
+ https://github.com/koekeishiya/yabai
65
+ - skhd repo/docs
66
+ https://github.com/koekeishiya/skhd
67
+ - Raycast Script Commands
68
+ https://developers.raycast.com/information/lifecycle/script-commands
69
+ - Keyboard Maestro docs
70
+ https://wiki.keyboardmaestro.com