openclaw-node-harness 2.0.0
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.
- package/LICENSE +21 -0
- package/README.md +184 -0
- package/bin/discord-read.js +228 -0
- package/bin/fleet-deploy.js +365 -0
- package/bin/lane-watchdog.js +232 -0
- package/bin/mesh-agent.js +714 -0
- package/bin/mesh-bridge.js +535 -0
- package/bin/mesh-deploy-listener.js +322 -0
- package/bin/mesh-deploy.js +1048 -0
- package/bin/mesh-health-publisher.js +247 -0
- package/bin/mesh-task-daemon.js +451 -0
- package/bin/mesh-tool-discord.js +293 -0
- package/bin/mesh.js +649 -0
- package/boot/manifest.yaml +187 -0
- package/cli.js +35 -0
- package/config/daemon.json.template +16 -0
- package/config/obsidian-sync.json.template +39 -0
- package/config/openclaw.json.template +124 -0
- package/config/transcript-sources.json.template +22 -0
- package/identity/AGENTS.md +201 -0
- package/identity/CLAUDE.md +64 -0
- package/identity/DELEGATION.md +304 -0
- package/identity/HEARTBEAT.md +163 -0
- package/identity/MEMORY_SPEC.md +368 -0
- package/identity/PRINCIPLES.md +81 -0
- package/identity/SOUL.md +48 -0
- package/identity/TOOLS.md +47 -0
- package/install.sh +895 -0
- package/lib/agent-activity.js +390 -0
- package/lib/kanban-io.js +352 -0
- package/lib/mesh-registry.js +194 -0
- package/lib/mesh-roles.js +13 -0
- package/lib/mesh-tasks.js +306 -0
- package/lib/nats-resolve.js +108 -0
- package/mission-control/README.md +36 -0
- package/mission-control/drizzle/0000_simple_silhouette.sql +62 -0
- package/mission-control/drizzle/meta/0000_snapshot.json +413 -0
- package/mission-control/drizzle/meta/_journal.json +13 -0
- package/mission-control/drizzle.config.ts +13 -0
- package/mission-control/eslint.config.mjs +18 -0
- package/mission-control/next.config.ts +7 -0
- package/mission-control/package-lock.json +10518 -0
- package/mission-control/package.json +49 -0
- package/mission-control/postcss.config.mjs +7 -0
- package/mission-control/public/file.svg +1 -0
- package/mission-control/public/globe.svg +1 -0
- package/mission-control/public/next.svg +1 -0
- package/mission-control/public/vercel.svg +1 -0
- package/mission-control/public/window.svg +1 -0
- package/mission-control/scripts/enrich-descriptions.js +193 -0
- package/mission-control/scripts/gen-chronology.js +102 -0
- package/mission-control/scripts/import-pipeline-v2.js +523 -0
- package/mission-control/scripts/import-pipeline.js +295 -0
- package/mission-control/src/app/api/activity/live/route.ts +27 -0
- package/mission-control/src/app/api/activity/route.ts +47 -0
- package/mission-control/src/app/api/burndown/route.ts +112 -0
- package/mission-control/src/app/api/critical-path/route.ts +159 -0
- package/mission-control/src/app/api/dependencies/route.ts +176 -0
- package/mission-control/src/app/api/memory/categories/route.ts +93 -0
- package/mission-control/src/app/api/memory/consolidate/route.ts +107 -0
- package/mission-control/src/app/api/memory/doc/route.ts +89 -0
- package/mission-control/src/app/api/memory/flush/route.ts +129 -0
- package/mission-control/src/app/api/memory/graph/route.ts +105 -0
- package/mission-control/src/app/api/memory/items/route.ts +86 -0
- package/mission-control/src/app/api/memory/list/route.ts +48 -0
- package/mission-control/src/app/api/memory/retrieve/route.ts +51 -0
- package/mission-control/src/app/api/memory/search/route.ts +143 -0
- package/mission-control/src/app/api/memory/sync/route.ts +23 -0
- package/mission-control/src/app/api/memory/wikilinks/route.ts +75 -0
- package/mission-control/src/app/api/mesh/events/route.ts +67 -0
- package/mission-control/src/app/api/mesh/nodes/route.ts +221 -0
- package/mission-control/src/app/api/mesh/tokens/route.ts +133 -0
- package/mission-control/src/app/api/projects/route.ts +102 -0
- package/mission-control/src/app/api/resolve-path/route.ts +92 -0
- package/mission-control/src/app/api/scheduler/tick/route.ts +38 -0
- package/mission-control/src/app/api/scheduler/waves/route.ts +54 -0
- package/mission-control/src/app/api/screenshot/route.ts +127 -0
- package/mission-control/src/app/api/settings/gateway/route.ts +92 -0
- package/mission-control/src/app/api/skills/[id]/health/route.ts +57 -0
- package/mission-control/src/app/api/skills/list/route.ts +41 -0
- package/mission-control/src/app/api/souls/[id]/evolution/route.ts +253 -0
- package/mission-control/src/app/api/souls/[id]/prompt/route.ts +205 -0
- package/mission-control/src/app/api/souls/[id]/propagate/route.ts +146 -0
- package/mission-control/src/app/api/souls/route.ts +174 -0
- package/mission-control/src/app/api/tasks/[id]/handoff/route.ts +115 -0
- package/mission-control/src/app/api/tasks/[id]/route.ts +266 -0
- package/mission-control/src/app/api/tasks/[id]/tree/route.ts +94 -0
- package/mission-control/src/app/api/tasks/route.ts +253 -0
- package/mission-control/src/app/api/tts/route.ts +47 -0
- package/mission-control/src/app/api/workspace/files/route.ts +88 -0
- package/mission-control/src/app/api/workspace/read/route.ts +73 -0
- package/mission-control/src/app/burndown/page.tsx +309 -0
- package/mission-control/src/app/calendar/page.tsx +839 -0
- package/mission-control/src/app/favicon.ico +0 -0
- package/mission-control/src/app/globals.css +67 -0
- package/mission-control/src/app/graph/page.tsx +352 -0
- package/mission-control/src/app/layout.tsx +35 -0
- package/mission-control/src/app/live/page.tsx +232 -0
- package/mission-control/src/app/memory/page.tsx +154 -0
- package/mission-control/src/app/mesh/page.tsx +457 -0
- package/mission-control/src/app/obsidian/page.tsx +252 -0
- package/mission-control/src/app/page.tsx +70 -0
- package/mission-control/src/app/roadmap/page.tsx +1757 -0
- package/mission-control/src/app/settings/page.tsx +260 -0
- package/mission-control/src/app/souls/page.tsx +573 -0
- package/mission-control/src/components/board/activity-timeline.tsx +96 -0
- package/mission-control/src/components/board/daily-board.tsx +373 -0
- package/mission-control/src/components/board/kanban-board.tsx +364 -0
- package/mission-control/src/components/board/kanban-column.tsx +105 -0
- package/mission-control/src/components/board/live-stream.tsx +116 -0
- package/mission-control/src/components/board/skill-health-card.tsx +128 -0
- package/mission-control/src/components/board/status-banner.tsx +124 -0
- package/mission-control/src/components/board/task-card.tsx +454 -0
- package/mission-control/src/components/board/unified-task-dialog.tsx +1043 -0
- package/mission-control/src/components/layout/resizable-layout.tsx +68 -0
- package/mission-control/src/components/layout/sidebar.tsx +90 -0
- package/mission-control/src/components/live/audio-spectrum.tsx +106 -0
- package/mission-control/src/components/live/chat-bubble.tsx +52 -0
- package/mission-control/src/components/live/chat-input.tsx +92 -0
- package/mission-control/src/components/memory/doc-reader.tsx +172 -0
- package/mission-control/src/components/memory/memory-list.tsx +169 -0
- package/mission-control/src/components/memory/search-bar.tsx +67 -0
- package/mission-control/src/components/memory/search-results.tsx +149 -0
- package/mission-control/src/components/obsidian/backlinks-panel.tsx +52 -0
- package/mission-control/src/components/obsidian/file-tree.tsx +186 -0
- package/mission-control/src/components/obsidian/local-graph.tsx +107 -0
- package/mission-control/src/components/obsidian/obsidian-graph.tsx +192 -0
- package/mission-control/src/components/obsidian/obsidian-reader.tsx +246 -0
- package/mission-control/src/lib/activity.ts +29 -0
- package/mission-control/src/lib/config.ts +21 -0
- package/mission-control/src/lib/db/index.ts +429 -0
- package/mission-control/src/lib/db/schema.ts +218 -0
- package/mission-control/src/lib/gateway-notify.ts +113 -0
- package/mission-control/src/lib/hooks.ts +536 -0
- package/mission-control/src/lib/memory/categories.ts +125 -0
- package/mission-control/src/lib/memory/entities.ts +482 -0
- package/mission-control/src/lib/memory/extract.ts +369 -0
- package/mission-control/src/lib/memory/retrieval.ts +281 -0
- package/mission-control/src/lib/memory/wikilinks.ts +147 -0
- package/mission-control/src/lib/nats.ts +126 -0
- package/mission-control/src/lib/parsers/clawvault-doc.ts +98 -0
- package/mission-control/src/lib/parsers/daily-log.ts +73 -0
- package/mission-control/src/lib/parsers/memory-md.ts +81 -0
- package/mission-control/src/lib/parsers/task-markdown.ts +459 -0
- package/mission-control/src/lib/parsers/transcript.ts +209 -0
- package/mission-control/src/lib/scheduler.ts +394 -0
- package/mission-control/src/lib/speech/use-speech-pipeline.ts +176 -0
- package/mission-control/src/lib/sync/memory.ts +224 -0
- package/mission-control/src/lib/sync/tasks.ts +271 -0
- package/mission-control/src/lib/tts/edge.ts +31 -0
- package/mission-control/src/lib/tts/google.ts +78 -0
- package/mission-control/src/lib/tts/index.ts +39 -0
- package/mission-control/src/lib/tts/types.ts +18 -0
- package/mission-control/tsconfig.json +42 -0
- package/obsidian-vault/.obsidian/app.json +10 -0
- package/obsidian-vault/.obsidian/community-plugins.json +8 -0
- package/obsidian-vault/.obsidian/graph.json +40 -0
- package/obsidian-vault/.obsidian/plugins/obsidian-local-rest-api/main.js +58769 -0
- package/obsidian-vault/.obsidian/plugins/obsidian-local-rest-api/manifest.json +10 -0
- package/obsidian-vault/.obsidian/plugins/obsidian-local-rest-api/styles.css +47 -0
- package/obsidian-vault/00-meta/.gitkeep +0 -0
- package/obsidian-vault/01-architecture/.gitkeep +0 -0
- package/obsidian-vault/02-smart-contracts/.gitkeep +0 -0
- package/obsidian-vault/03-backend/.gitkeep +0 -0
- package/obsidian-vault/04-mobile/.gitkeep +0 -0
- package/obsidian-vault/05-ar-mapping/.gitkeep +0 -0
- package/obsidian-vault/06-3d-assets/.gitkeep +0 -0
- package/obsidian-vault/07-sound-music/.gitkeep +0 -0
- package/obsidian-vault/08-lore/.gitkeep +0 -0
- package/obsidian-vault/09-quests-playthrough/.gitkeep +0 -0
- package/obsidian-vault/10-economy/.gitkeep +0 -0
- package/obsidian-vault/11-nft-assets/.gitkeep +0 -0
- package/obsidian-vault/12-nft-mechanics/.gitkeep +0 -0
- package/obsidian-vault/13-dao-guild-social/.gitkeep +0 -0
- package/obsidian-vault/14-game-progression/.gitkeep +0 -0
- package/obsidian-vault/15-analytics/.gitkeep +0 -0
- package/obsidian-vault/16-security/.gitkeep +0 -0
- package/obsidian-vault/17-devops/.gitkeep +0 -0
- package/obsidian-vault/18-marketplace/.gitkeep +0 -0
- package/obsidian-vault/19-decisions/.gitkeep +0 -0
- package/obsidian-vault/20-business-strategy/.gitkeep +0 -0
- package/obsidian-vault/21-legal-regulatory/.gitkeep +0 -0
- package/obsidian-vault/nodes/.gitkeep +0 -0
- package/openclaw.env.example +17 -0
- package/package.json +45 -0
- package/services/launchd/ai.openclaw.gateway.plist +59 -0
- package/services/launchd/ai.openclaw.lane-watchdog.plist +32 -0
- package/services/launchd/ai.openclaw.log-rotate.plist +28 -0
- package/services/launchd/ai.openclaw.memory-daemon.plist +36 -0
- package/services/launchd/ai.openclaw.mesh-agent.plist +38 -0
- package/services/launchd/ai.openclaw.mesh-bridge.plist +36 -0
- package/services/launchd/ai.openclaw.mesh-deploy-listener.plist +33 -0
- package/services/launchd/ai.openclaw.mesh-health-publisher.plist +29 -0
- package/services/launchd/ai.openclaw.mesh-task-daemon.plist +36 -0
- package/services/launchd/ai.openclaw.mesh-tool-discord.plist +36 -0
- package/services/launchd/ai.openclaw.mission-control.plist +41 -0
- package/services/service-manifest.json +13 -0
- package/services/systemd/openclaw-gateway.service +21 -0
- package/services/systemd/openclaw-lane-watchdog.service +21 -0
- package/services/systemd/openclaw-log-rotate.service +13 -0
- package/services/systemd/openclaw-log-rotate.timer +9 -0
- package/services/systemd/openclaw-memory-daemon.service +21 -0
- package/services/systemd/openclaw-mesh-agent.service +19 -0
- package/services/systemd/openclaw-mesh-bridge.service +21 -0
- package/services/systemd/openclaw-mesh-deploy-listener.service +23 -0
- package/services/systemd/openclaw-mesh-health-publisher.service +21 -0
- package/services/systemd/openclaw-mesh-task-daemon.service +21 -0
- package/services/systemd/openclaw-mesh-tool-discord.service +21 -0
- package/services/systemd/openclaw-mission-control.service +22 -0
- package/skills/1password/.clawhub/origin.json +7 -0
- package/skills/1password/SKILL.md +63 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/acquisition-channel-advisor/SKILL.md +643 -0
- package/skills/acquisition-channel-advisor/examples/conversation-flow.md +531 -0
- package/skills/agent-browser/.clawhub/origin.json +7 -0
- package/skills/agent-browser/CONTRIBUTING.md +63 -0
- package/skills/agent-browser/SKILL.md +338 -0
- package/skills/agentic-compass/.clawhub/origin.json +7 -0
- package/skills/agentic-compass/README.md +96 -0
- package/skills/agentic-compass/SKILL.md +112 -0
- package/skills/agentic-compass/references/README.md +5 -0
- package/skills/agentic-compass/scripts/agentic-compass.py +196 -0
- package/skills/arcane-dev-ops/SKILL.md +61 -0
- package/skills/arcane-dev-ops/references/checklist.md +22 -0
- package/skills/arcane-dev-ops/references/validation-cases.md +11 -0
- package/skills/arcane-dev-ops/scripts/prepush_check.sh +41 -0
- package/skills/auto-updater/.clawhub/origin.json +7 -0
- package/skills/auto-updater/SKILL.md +158 -0
- package/skills/auto-updater/references/agent-guide.md +152 -0
- package/skills/auto-updater/references/summary-examples.md +109 -0
- package/skills/business-health-diagnostic/SKILL.md +782 -0
- package/skills/byterover/.clawhub/origin.json +7 -0
- package/skills/byterover/SKILL.md +105 -0
- package/skills/byterover/TROUBLESHOOTING.md +50 -0
- package/skills/byterover/WORKFLOWS.md +229 -0
- package/skills/capability-evolver/.clawhub/origin.json +7 -0
- package/skills/capability-evolver/CONTRIBUTING.md +11 -0
- package/skills/capability-evolver/README.md +157 -0
- package/skills/capability-evolver/README.zh-CN.md +112 -0
- package/skills/capability-evolver/SKILL.md +93 -0
- package/skills/capability-evolver/assets/gep/capsules.json +5 -0
- package/skills/capability-evolver/assets/gep/genes.json +104 -0
- package/skills/capability-evolver/index.js +59 -0
- package/skills/capability-evolver/package.json +22 -0
- package/skills/capability-evolver/scripts/analyze_by_skill.js +121 -0
- package/skills/capability-evolver/scripts/build_public.js +350 -0
- package/skills/capability-evolver/scripts/export_history.js +98 -0
- package/skills/capability-evolver/scripts/extract_log.js +85 -0
- package/skills/capability-evolver/scripts/generate_history.js +75 -0
- package/skills/capability-evolver/scripts/human_report.js +147 -0
- package/skills/capability-evolver/scripts/publish_public.js +516 -0
- package/skills/capability-evolver/scripts/suggest_version.js +89 -0
- package/skills/capability-evolver/src/evolve.js +594 -0
- package/skills/capability-evolver/src/gep/assetStore.js +204 -0
- package/skills/capability-evolver/src/gep/candidates.js +134 -0
- package/skills/capability-evolver/src/gep/paths.js +23 -0
- package/skills/capability-evolver/src/gep/prompt.js +254 -0
- package/skills/capability-evolver/src/gep/selector.js +89 -0
- package/skills/capability-evolver/src/gep/signals.js +27 -0
- package/skills/cc-godmode/.clawhub/origin.json +7 -0
- package/skills/cc-godmode/CHANGELOG.md +66 -0
- package/skills/cc-godmode/README.md +293 -0
- package/skills/cc-godmode/SKILL.md +242 -0
- package/skills/cc-godmode/docs/AGENTS.md +332 -0
- package/skills/cc-godmode/docs/MIGRATION.md +206 -0
- package/skills/cc-godmode/docs/TROUBLESHOOTING.md +357 -0
- package/skills/cc-godmode/docs/WORKFLOWS.md +329 -0
- package/skills/cc-godmode/references/agents.md +433 -0
- package/skills/cc-godmode/scripts/build-skill.js +232 -0
- package/skills/clawdbot-filesystem/.clawhub/origin.json +7 -0
- package/skills/clawdbot-filesystem/LICENSE.md +21 -0
- package/skills/clawdbot-filesystem/README.md +322 -0
- package/skills/clawdbot-filesystem/SKILL.md +219 -0
- package/skills/clawdbot-filesystem/config.json +41 -0
- package/skills/clawdbot-filesystem/package.json +69 -0
- package/skills/clawdbot-security-check/.clawhub/origin.json +7 -0
- package/skills/clawdbot-security-check/README.md +168 -0
- package/skills/clawdbot-security-check/SKILL.md +145 -0
- package/skills/clawdbot-security-check/references/audit-checks.md +521 -0
- package/skills/clawdbot-security-check/skill.json +42 -0
- package/skills/clawddocs/.clawhub/origin.json +7 -0
- package/skills/clawddocs/SKILL.md +176 -0
- package/skills/clawddocs/package.json +9 -0
- package/skills/clawddocs/scripts/build-index.sh +17 -0
- package/skills/clawddocs/scripts/cache.sh +13 -0
- package/skills/clawddocs/scripts/fetch-doc.sh +7 -0
- package/skills/clawddocs/scripts/recent.sh +5 -0
- package/skills/clawddocs/scripts/search.sh +8 -0
- package/skills/clawddocs/scripts/sitemap.sh +23 -0
- package/skills/clawddocs/scripts/track-changes.sh +16 -0
- package/skills/clawddocs/snippets/common-configs.md +69 -0
- package/skills/clawguard/.clawhub/origin.json +7 -0
- package/skills/clawguard/SKILL.md +137 -0
- package/skills/company-research/SKILL.md +393 -0
- package/skills/company-research/examples/sample.md +164 -0
- package/skills/company-research/template.md +60 -0
- package/skills/crypto-price/.clawhub/origin.json +7 -0
- package/skills/crypto-price/ARCHITECTURE.md +437 -0
- package/skills/crypto-price/README.md +194 -0
- package/skills/crypto-price/SKILL.md +61 -0
- package/skills/crypto-price/requirements.txt +1 -0
- package/skills/crypto-price/scripts/get_price_chart.py +988 -0
- package/skills/customer-journey-map/SKILL.md +343 -0
- package/skills/customer-journey-map/examples/sample.md +33 -0
- package/skills/customer-journey-map/template.md +28 -0
- package/skills/customer-journey-mapping-workshop/SKILL.md +522 -0
- package/skills/deep-research/.clawhub/origin.json +7 -0
- package/skills/deep-research/SKILL.md +93 -0
- package/skills/deep-research/rules/logic.md +32 -0
- package/skills/discord-telegram-triage/SKILL.md +59 -0
- package/skills/discord-telegram-triage/references/discord-runbook.md +28 -0
- package/skills/discord-telegram-triage/references/validation-cases.md +11 -0
- package/skills/discord-telegram-triage/scripts/triage_snapshot.sh +23 -0
- package/skills/discovery-interview-prep/SKILL.md +408 -0
- package/skills/discovery-process/SKILL.md +503 -0
- package/skills/discovery-process/examples/sample.md +60 -0
- package/skills/discovery-process/template.md +39 -0
- package/skills/dist/arcane-dev-ops.skill +0 -0
- package/skills/dist/discord-telegram-triage.skill +0 -0
- package/skills/dist/founder-brief-summarizer.skill +0 -0
- package/skills/epic-breakdown-advisor/SKILL.md +664 -0
- package/skills/epic-hypothesis/SKILL.md +285 -0
- package/skills/epic-hypothesis/examples/sample.md +104 -0
- package/skills/epic-hypothesis/template.md +30 -0
- package/skills/excel/.clawhub/origin.json +7 -0
- package/skills/excel/SKILL.md +332 -0
- package/skills/excel/scripts/excel.py +1120 -0
- package/skills/fast-browser-use/.clawhub/origin.json +7 -0
- package/skills/fast-browser-use/CODEBUDDY.md +142 -0
- package/skills/fast-browser-use/Cargo.toml +77 -0
- package/skills/fast-browser-use/README.md +62 -0
- package/skills/fast-browser-use/SKILL.md +217 -0
- package/skills/fast-browser-use/package-lock.json +28 -0
- package/skills/fast-browser-use/package.json +8 -0
- package/skills/fast-browser-use/rustfmt.toml +10 -0
- package/skills/fast-browser-use/src/bin/cli.rs +373 -0
- package/skills/fast-browser-use/src/bin/mcp_server.rs +203 -0
- package/skills/fast-browser-use/src/browser/config.rs +136 -0
- package/skills/fast-browser-use/src/browser/debug.rs +16 -0
- package/skills/fast-browser-use/src/browser/mod.rs +61 -0
- package/skills/fast-browser-use/src/browser/session.rs +478 -0
- package/skills/fast-browser-use/src/dom/element.rs +442 -0
- package/skills/fast-browser-use/src/dom/extract_dom.js +849 -0
- package/skills/fast-browser-use/src/dom/mod.rs +14 -0
- package/skills/fast-browser-use/src/dom/tree.rs +296 -0
- package/skills/fast-browser-use/src/dom/yaml.rs +149 -0
- package/skills/fast-browser-use/src/error.rs +115 -0
- package/skills/fast-browser-use/src/lib.rs +17 -0
- package/skills/fast-browser-use/src/mcp/handler.rs +63 -0
- package/skills/fast-browser-use/src/mcp/mod.rs +81 -0
- package/skills/fast-browser-use/src/tools/Readability.min.js +1480 -0
- package/skills/fast-browser-use/src/tools/annotate.rs +165 -0
- package/skills/fast-browser-use/src/tools/click.rs +84 -0
- package/skills/fast-browser-use/src/tools/close.rs +35 -0
- package/skills/fast-browser-use/src/tools/close_tab.rs +45 -0
- package/skills/fast-browser-use/src/tools/convert_to_markdown.js +117 -0
- package/skills/fast-browser-use/src/tools/cookies.rs +58 -0
- package/skills/fast-browser-use/src/tools/debug.rs +44 -0
- package/skills/fast-browser-use/src/tools/evaluate.rs +40 -0
- package/skills/fast-browser-use/src/tools/extract.rs +66 -0
- package/skills/fast-browser-use/src/tools/go_back.rs +35 -0
- package/skills/fast-browser-use/src/tools/go_forward.rs +35 -0
- package/skills/fast-browser-use/src/tools/hover.js +33 -0
- package/skills/fast-browser-use/src/tools/hover.rs +97 -0
- package/skills/fast-browser-use/src/tools/html_to_markdown.rs +99 -0
- package/skills/fast-browser-use/src/tools/input.rs +93 -0
- package/skills/fast-browser-use/src/tools/local_storage.rs +159 -0
- package/skills/fast-browser-use/src/tools/markdown.rs +181 -0
- package/skills/fast-browser-use/src/tools/mod.rs +326 -0
- package/skills/fast-browser-use/src/tools/navigate.rs +55 -0
- package/skills/fast-browser-use/src/tools/new_tab.rs +60 -0
- package/skills/fast-browser-use/src/tools/press_key.rs +78 -0
- package/skills/fast-browser-use/src/tools/read_links.rs +59 -0
- package/skills/fast-browser-use/src/tools/readability_script.rs +8 -0
- package/skills/fast-browser-use/src/tools/screenshot.rs +47 -0
- package/skills/fast-browser-use/src/tools/scroll.js +22 -0
- package/skills/fast-browser-use/src/tools/scroll.rs +95 -0
- package/skills/fast-browser-use/src/tools/select.js +23 -0
- package/skills/fast-browser-use/src/tools/select.rs +129 -0
- package/skills/fast-browser-use/src/tools/sitemap.rs +426 -0
- package/skills/fast-browser-use/src/tools/snapshot.rs +324 -0
- package/skills/fast-browser-use/src/tools/switch_tab.rs +69 -0
- package/skills/fast-browser-use/src/tools/tab_list.rs +76 -0
- package/skills/fast-browser-use/src/tools/utils.rs +92 -0
- package/skills/fast-browser-use/src/tools/wait.rs +53 -0
- package/skills/fast-browser-use/test_auth.json +3 -0
- package/skills/fast-browser-use/test_state.json +6 -0
- package/skills/fast-browser-use/tests/browser_tools_integration.rs +233 -0
- package/skills/fast-browser-use/tests/cli_recipes_integration.rs +112 -0
- package/skills/fast-browser-use/tests/cookies_integration.rs +56 -0
- package/skills/fast-browser-use/tests/debug_integration.rs +83 -0
- package/skills/fast-browser-use/tests/dom_integration.rs +170 -0
- package/skills/fast-browser-use/tests/local_storage_integration.rs +75 -0
- package/skills/fast-browser-use/tests/markdown_integration.rs +448 -0
- package/skills/fast-browser-use/tests/navigation_integration.rs +241 -0
- package/skills/fast-browser-use/tests/sitemap_integration.rs +326 -0
- package/skills/fast-browser-use/tests/tab_management_integration.rs +300 -0
- package/skills/feature-investment-advisor/SKILL.md +639 -0
- package/skills/feature-investment-advisor/examples/conversation-flow.md +538 -0
- package/skills/finance-based-pricing-advisor/SKILL.md +763 -0
- package/skills/finance-metrics-quickref/SKILL.md +309 -0
- package/skills/find-skills/.clawhub/origin.json +7 -0
- package/skills/find-skills/SKILL.md +143 -0
- package/skills/flavor-text-writer/SKILL.md +27 -0
- package/skills/founder-brief-summarizer/SKILL.md +52 -0
- package/skills/founder-brief-summarizer/references/response-templates.md +15 -0
- package/skills/founder-brief-summarizer/references/validation-cases.md +11 -0
- package/skills/founder-brief-summarizer/scripts/brief_template.sh +28 -0
- package/skills/frontend-design/.clawhub/origin.json +7 -0
- package/skills/frontend-design/LICENSE.txt +190 -0
- package/skills/frontend-design/SKILL.md +53 -0
- package/skills/gemini/.clawhub/origin.json +7 -0
- package/skills/gemini/SKILL.md +33 -0
- package/skills/gemini-deep-research/.clawhub/origin.json +7 -0
- package/skills/gemini-deep-research/SKILL.md +78 -0
- package/skills/gemini-deep-research/scripts/deep_research.py +176 -0
- package/skills/git-essentials/.clawhub/origin.json +7 -0
- package/skills/git-essentials/SKILL.md +239 -0
- package/skills/git-essentials/references/advanced.md +211 -0
- package/skills/github/.clawhub/origin.json +7 -0
- package/skills/github/SKILL.md +57 -0
- package/skills/google-drive/.clawhub/origin.json +7 -0
- package/skills/google-drive/LICENSE.txt +21 -0
- package/skills/google-drive/SKILL.md +320 -0
- package/skills/growth-loop/SKILL.md +270 -0
- package/skills/growth-loop/_meta.json +9 -0
- package/skills/growth-loop/references/diagnosis-framework.md +84 -0
- package/skills/growth-loop/references/platform-benchmarks.md +79 -0
- package/skills/growth-loop/scripts/init-campaign.sh +274 -0
- package/skills/humanize-ai-text/.clawhub/origin.json +7 -0
- package/skills/humanize-ai-text/SKILL.md +192 -0
- package/skills/humanize-ai-text/scripts/compare.py +58 -0
- package/skills/humanize-ai-text/scripts/detect.py +160 -0
- package/skills/humanize-ai-text/scripts/patterns.json +191 -0
- package/skills/humanize-ai-text/scripts/transform.py +127 -0
- package/skills/humanizer/.clawhub/origin.json +7 -0
- package/skills/humanizer/README.md +82 -0
- package/skills/humanizer/SKILL.md +443 -0
- package/skills/jobs-to-be-done/SKILL.md +378 -0
- package/skills/jobs-to-be-done/examples/sample.md +80 -0
- package/skills/jobs-to-be-done/template.md +65 -0
- package/skills/lean-ux-canvas/SKILL.md +561 -0
- package/skills/lean-ux-canvas/examples/sample.md +88 -0
- package/skills/lean-ux-canvas/template.md +32 -0
- package/skills/markdown-formatter/.clawhub/origin.json +7 -0
- package/skills/markdown-formatter/README.md +137 -0
- package/skills/markdown-formatter/SKILL.md +369 -0
- package/skills/markdown-formatter/config.json +20 -0
- package/skills/markdown-formatter/index.js +439 -0
- package/skills/markdown-formatter/package.json +23 -0
- package/skills/markdown-formatter/test.js +23 -0
- package/skills/marketing-mode/.clawhub/origin.json +7 -0
- package/skills/marketing-mode/README.md +49 -0
- package/skills/marketing-mode/SKILL.md +703 -0
- package/skills/marketing-mode/mode-prompt.md +39 -0
- package/skills/marketing-mode/skill.json +51 -0
- package/skills/memory-hygiene/.clawhub/origin.json +7 -0
- package/skills/memory-hygiene/SKILL.md +91 -0
- package/skills/memory-setup/.clawhub/origin.json +7 -0
- package/skills/memory-setup/SKILL.md +180 -0
- package/skills/memorylayer/.clawhub/origin.json +7 -0
- package/skills/memorylayer/README.md +197 -0
- package/skills/memorylayer/SKILL.md +227 -0
- package/skills/memorylayer/examples/agent-integration.js +145 -0
- package/skills/memorylayer/examples/basic-usage.js +87 -0
- package/skills/memorylayer/examples/token-savings-demo.js +183 -0
- package/skills/memorylayer/index.js +115 -0
- package/skills/memorylayer/package-lock.json +295 -0
- package/skills/memorylayer/package.json +27 -0
- package/skills/memorylayer/python/memorylayer_skill.py +230 -0
- package/skills/memorylayer/python/requirements.txt +7 -0
- package/skills/mesh/SKILL.md +184 -0
- package/skills/model-usage/.clawhub/origin.json +7 -0
- package/skills/model-usage/SKILL.md +54 -0
- package/skills/model-usage/references/codexbar-cli.md +28 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/moltbook-interact/.clawhub/origin.json +7 -0
- package/skills/moltbook-interact/INSTALL.md +139 -0
- package/skills/moltbook-interact/README.md +198 -0
- package/skills/moltbook-interact/SKILL.md +72 -0
- package/skills/moltbook-interact/references/api.md +106 -0
- package/skills/moltbook-interact/scripts/moltbook.sh +142 -0
- package/skills/moltbook-registry/.clawhub/origin.json +7 -0
- package/skills/moltbook-registry/README.md +26 -0
- package/skills/moltbook-registry/SKILL.md +82 -0
- package/skills/moltbook-registry/index.js +180 -0
- package/skills/moltbook-registry/package.json +11 -0
- package/skills/mythril-scanner/SKILL.md +27 -0
- package/skills/n8n/.clawhub/origin.json +7 -0
- package/skills/n8n/SKILL.md +141 -0
- package/skills/n8n/references/api.md +156 -0
- package/skills/n8n/scripts/n8n_api.py +158 -0
- package/skills/n8n-workflow-automation/.clawhub/origin.json +7 -0
- package/skills/n8n-workflow-automation/SKILL.md +103 -0
- package/skills/n8n-workflow-automation/assets/runbook-template.md +32 -0
- package/skills/narrative-designer/SKILL.md +27 -0
- package/skills/ontology/.clawhub/origin.json +7 -0
- package/skills/ontology/SKILL.md +236 -0
- package/skills/ontology/references/queries.md +211 -0
- package/skills/ontology/references/schema.md +322 -0
- package/skills/ontology/scripts/ontology.py +374 -0
- package/skills/openai-image-gen/.clawhub/origin.json +7 -0
- package/skills/openai-image-gen/SKILL.md +45 -0
- package/skills/openai-image-gen/scripts/gen.py +227 -0
- package/skills/openclaw-agent-optimize/.clawhub/origin.json +7 -0
- package/skills/openclaw-agent-optimize/SKILL.md +33 -0
- package/skills/openclaw-agent-optimize/references/agent-orchestration.md +20 -0
- package/skills/openclaw-agent-optimize/references/context-management.md +15 -0
- package/skills/openclaw-agent-optimize/references/continuous-learning.md +14 -0
- package/skills/openclaw-agent-optimize/references/cron-optimization.md +16 -0
- package/skills/openclaw-agent-optimize/references/memory-patterns.md +14 -0
- package/skills/openclaw-agent-optimize/references/model-selection.md +18 -0
- package/skills/openclaw-skill-scanner/.clawhub/origin.json +7 -0
- package/skills/openclaw-skill-scanner/SKILL.md +88 -0
- package/skills/openclaw-skill-scanner/install-hook.sh +294 -0
- package/skills/openclaw-skill-scanner/report-template.md +53 -0
- package/skills/openclaw-skill-scanner/scanner.py +929 -0
- package/skills/openclaw-skill-scanner/whitelist.json +18 -0
- package/skills/opportunity-solution-tree/SKILL.md +428 -0
- package/skills/opportunity-solution-tree/examples/sample.md +104 -0
- package/skills/opportunity-solution-tree/template.md +33 -0
- package/skills/pdf/.clawhub/origin.json +7 -0
- package/skills/pdf/SKILL.md +304 -0
- package/skills/pestel-analysis/SKILL.md +384 -0
- package/skills/pestel-analysis/examples/sample.md +143 -0
- package/skills/pestel-analysis/template.md +53 -0
- package/skills/pol-probe/SKILL.md +217 -0
- package/skills/pol-probe/examples/sample.md +136 -0
- package/skills/pol-probe/template.md +59 -0
- package/skills/pol-probe-advisor/SKILL.md +492 -0
- package/skills/positioning-statement/SKILL.md +229 -0
- package/skills/positioning-statement/examples/sample.md +51 -0
- package/skills/positioning-statement/template.md +25 -0
- package/skills/positioning-workshop/SKILL.md +424 -0
- package/skills/prd-development/SKILL.md +654 -0
- package/skills/prd-development/examples/sample.md +43 -0
- package/skills/prd-development/template.md +55 -0
- package/skills/press-release/SKILL.md +277 -0
- package/skills/press-release/examples/sample.md +73 -0
- package/skills/press-release/template.md +39 -0
- package/skills/prioritization-advisor/SKILL.md +451 -0
- package/skills/proactive-messages/.clawhub/origin.json +7 -0
- package/skills/proactive-messages/SKILL.md +91 -0
- package/skills/problem-framing-canvas/SKILL.md +466 -0
- package/skills/problem-framing-canvas/examples/sample.md +58 -0
- package/skills/problem-framing-canvas/template.md +22 -0
- package/skills/problem-statement/SKILL.md +255 -0
- package/skills/problem-statement/examples/sample.md +82 -0
- package/skills/problem-statement/template.md +37 -0
- package/skills/product-strategy-session/SKILL.md +434 -0
- package/skills/product-strategy-session/examples/sample.md +67 -0
- package/skills/product-strategy-session/template.md +38 -0
- package/skills/prompt-guard/.clawhub/origin.json +7 -0
- package/skills/prompt-guard/ARCHITECTURE.md +364 -0
- package/skills/prompt-guard/CHANGELOG.md +200 -0
- package/skills/prompt-guard/README.md +215 -0
- package/skills/prompt-guard/SECURITY.md +66 -0
- package/skills/prompt-guard/SKILL.md +174 -0
- package/skills/prompt-guard/blog/how-i-secured-my-ai-agent.md +185 -0
- package/skills/prompt-guard/config.example.yaml +56 -0
- package/skills/prompt-guard/references/detection-patterns.md +298 -0
- package/skills/prompt-guard/requirements.txt +1 -0
- package/skills/prompt-guard/scripts/analyze_log.py +224 -0
- package/skills/prompt-guard/scripts/audit.py +344 -0
- package/skills/prompt-guard/scripts/detect.py +1587 -0
- package/skills/prompt-guard/scripts/hivefence.py +345 -0
- package/skills/proto-persona/SKILL.md +336 -0
- package/skills/proto-persona/examples/sample.md +97 -0
- package/skills/proto-persona/template.md +45 -0
- package/skills/recommendation-canvas/SKILL.md +382 -0
- package/skills/recommendation-canvas/examples/sample.md +94 -0
- package/skills/recommendation-canvas/template.md +86 -0
- package/skills/refactor-suggest/.clawhub/origin.json +7 -0
- package/skills/refactor-suggest/SKILL.md +94 -0
- package/skills/roadmap-planning/SKILL.md +506 -0
- package/skills/roadmap-planning/examples/sample.md +62 -0
- package/skills/roadmap-planning/template.md +30 -0
- package/skills/saas-economics-efficiency-metrics/SKILL.md +694 -0
- package/skills/saas-economics-efficiency-metrics/examples/cash-trap.md +365 -0
- package/skills/saas-economics-efficiency-metrics/examples/healthy-unit-economics.md +279 -0
- package/skills/saas-economics-efficiency-metrics/template.md +263 -0
- package/skills/saas-revenue-growth-metrics/SKILL.md +629 -0
- package/skills/saas-revenue-growth-metrics/examples/healthy-saas.md +131 -0
- package/skills/saas-revenue-growth-metrics/examples/warning-signs.md +229 -0
- package/skills/saas-revenue-growth-metrics/template.md +192 -0
- package/skills/save-money/.clawhub/origin.json +7 -0
- package/skills/save-money/SKILL.md +173 -0
- package/skills/scripts/golden_skills_v3.sh +32 -0
- package/skills/search/.clawhub/origin.json +7 -0
- package/skills/search/SKILL.md +18 -0
- package/skills/search/skill.json +1 -0
- package/skills/second-brain/.clawhub/origin.json +7 -0
- package/skills/second-brain/SKILL.md +278 -0
- package/skills/second-brain/scripts/ensue-api.sh +37 -0
- package/skills/self-improving-agent/.clawhub/origin.json +7 -0
- package/skills/self-improving-agent/.learnings/ERRORS.md +5 -0
- package/skills/self-improving-agent/.learnings/FEATURE_REQUESTS.md +5 -0
- package/skills/self-improving-agent/.learnings/LEARNINGS.md +5 -0
- package/skills/self-improving-agent/SKILL.md +130 -0
- package/skills/self-improving-agent/assets/LEARNINGS.md +45 -0
- package/skills/self-improving-agent/assets/SKILL-TEMPLATE.md +177 -0
- package/skills/self-improving-agent/hooks/openclaw/HOOK.md +23 -0
- package/skills/self-improving-agent/hooks/openclaw/handler.js +56 -0
- package/skills/self-improving-agent/hooks/openclaw/handler.ts +62 -0
- package/skills/self-improving-agent/references/examples.md +374 -0
- package/skills/self-improving-agent/references/hooks-setup.md +223 -0
- package/skills/self-improving-agent/references/openclaw-integration.md +248 -0
- package/skills/self-improving-agent/references/templates.md +480 -0
- package/skills/self-improving-agent/scripts/activator.sh +20 -0
- package/skills/self-improving-agent/scripts/error-detector.sh +55 -0
- package/skills/self-improving-agent/scripts/extract-skill.sh +203 -0
- package/skills/self-improving-agent-1-0-2/.clawhub/origin.json +7 -0
- package/skills/self-improving-agent-1-0-2/SKILL.md +562 -0
- package/skills/self-improving-agent-1-0-2/assets/LEARNINGS.md +45 -0
- package/skills/self-improving-agent-1-0-2/assets/SKILL-TEMPLATE.md +182 -0
- package/skills/self-improving-agent-1-0-2/references/clawdbot-integration.md +311 -0
- package/skills/self-improving-agent-1-0-2/references/examples.md +374 -0
- package/skills/self-improving-agent-1-0-2/references/hooks-setup.md +223 -0
- package/skills/self-improving-agent-1-0-2/scripts/activator.sh +20 -0
- package/skills/self-improving-agent-1-0-2/scripts/error-detector.sh +55 -0
- package/skills/self-improving-agent-1-0-2/scripts/extract-skill.sh +203 -0
- package/skills/self-love-confidence/.clawhub/origin.json +7 -0
- package/skills/self-love-confidence/SKILL.md +79 -0
- package/skills/self-reflection/.clawhub/origin.json +7 -0
- package/skills/self-reflection/README.md +292 -0
- package/skills/self-reflection/SKILL.md +110 -0
- package/skills/self-reflection/self-reflection.example.json +6 -0
- package/skills/slither-analyzer/SKILL.md +27 -0
- package/skills/solidity-audit/SKILL.md +27 -0
- package/skills/soulcraft/.clawhub/origin.json +7 -0
- package/skills/soulcraft/README.md +123 -0
- package/skills/soulcraft/SKILL.md +340 -0
- package/skills/soulcraft/references/question-bank.md +154 -0
- package/skills/soulcraft/references/soul-examples.md +207 -0
- package/skills/soulcraft/research/RESEARCH_REPORT.md +317 -0
- package/skills/spotify-player/.clawhub/origin.json +7 -0
- package/skills/spotify-player/SKILL.md +44 -0
- package/skills/storyboard/SKILL.md +259 -0
- package/skills/storyboard/examples/sample.md +71 -0
- package/skills/storyboard/template.md +41 -0
- package/skills/summarize/.clawhub/origin.json +7 -0
- package/skills/summarize/SKILL.md +59 -0
- package/skills/superdesign/.clawhub/origin.json +7 -0
- package/skills/superdesign/SKILL.md +224 -0
- package/skills/tam-sam-som-calculator/SKILL.md +399 -0
- package/skills/tam-sam-som-calculator/examples/sample.md +142 -0
- package/skills/tam-sam-som-calculator/scripts/market-sizing.py +95 -0
- package/skills/tam-sam-som-calculator/template.md +35 -0
- package/skills/tavily-search/.clawhub/origin.json +7 -0
- package/skills/tavily-search/SKILL.md +49 -0
- package/skills/tavily-search/scripts/extract.mjs +59 -0
- package/skills/tavily-search/scripts/search.mjs +101 -0
- package/skills/twitter/SKILL.md +74 -0
- package/skills/twitter/_meta.json +9 -0
- package/skills/twitter/references/validation-cases.md +53 -0
- package/skills/twitter/scripts/twitter.sh +421 -0
- package/skills/ui-ux-pro-max/.clawhub/origin.json +7 -0
- package/skills/ui-ux-pro-max/SKILL.md +54 -0
- package/skills/ui-ux-pro-max/assets/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/assets/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/assets/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/assets/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/assets/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/assets/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/assets/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/assets/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/assets/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/assets/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/assets/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/references/upstream-README.md +488 -0
- package/skills/ui-ux-pro-max/references/upstream-skill-content.md +288 -0
- package/skills/ui-ux-pro-max/scripts/__init__.py +0 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1071 -0
- package/skills/ui-ux-pro-max/scripts/search.py +111 -0
- package/skills/user-story/SKILL.md +272 -0
- package/skills/user-story/examples/sample.md +110 -0
- package/skills/user-story/scripts/user-story-template.py +65 -0
- package/skills/user-story/template.md +32 -0
- package/skills/user-story-mapping/SKILL.md +296 -0
- package/skills/user-story-mapping/examples/sample.md +77 -0
- package/skills/user-story-mapping/template.md +41 -0
- package/skills/user-story-mapping-workshop/SKILL.md +485 -0
- package/skills/user-story-mapping-workshop/template.md +28 -0
- package/skills/user-story-splitting/SKILL.md +313 -0
- package/skills/user-story-splitting/examples/sample.md +147 -0
- package/skills/user-story-splitting/template.md +37 -0
- package/skills/wacli/.clawhub/origin.json +7 -0
- package/skills/wacli/SKILL.md +53 -0
- package/skills/web-search/.clawhub/origin.json +7 -0
- package/skills/web-search/SKILL.md +151 -0
- package/skills/web-search/references/api-details.md +207 -0
- package/skills/web-search/scripts/search.py +576 -0
- package/skills/workshop-facilitation/SKILL.md +88 -0
- package/skills/world-builder/SKILL.md +27 -0
- package/souls/blockchain-auditor/PRINCIPLES.md +75 -0
- package/souls/blockchain-auditor/SOUL.md +56 -0
- package/souls/blockchain-auditor/capabilities.json +33 -0
- package/souls/blockchain-auditor/evolution/capsules.json +4 -0
- package/souls/blockchain-auditor/evolution/events.jsonl +1 -0
- package/souls/blockchain-auditor/evolution/genes.json +62 -0
- package/souls/daedalus/PRINCIPLES.md +78 -0
- package/souls/daedalus/SOUL.md +48 -0
- package/souls/daedalus/capabilities.json +46 -0
- package/souls/identity-architect/PRINCIPLES.md +83 -0
- package/souls/identity-architect/SOUL.md +66 -0
- package/souls/identity-architect/capabilities.json +38 -0
- package/souls/identity-architect/evolution/capsules.json +4 -0
- package/souls/identity-architect/evolution/events.jsonl +0 -0
- package/souls/identity-architect/evolution/genes.json +4 -0
- package/souls/infra-ops/PRINCIPLES.md +77 -0
- package/souls/infra-ops/SOUL.md +56 -0
- package/souls/infra-ops/capabilities.json +33 -0
- package/souls/infra-ops/evolution/capsules.json +4 -0
- package/souls/infra-ops/evolution/events.jsonl +0 -0
- package/souls/infra-ops/evolution/genes.json +4 -0
- package/souls/lore-writer/PRINCIPLES.md +74 -0
- package/souls/lore-writer/SOUL.md +54 -0
- package/souls/lore-writer/capabilities.json +37 -0
- package/souls/lore-writer/evolution/capsules.json +4 -0
- package/souls/lore-writer/evolution/events.jsonl +0 -0
- package/souls/lore-writer/evolution/genes.json +4 -0
- package/souls/qa-evidence/PRINCIPLES.md +97 -0
- package/souls/qa-evidence/SOUL.md +66 -0
- package/souls/qa-evidence/capabilities.json +32 -0
- package/souls/qa-evidence/evolution/capsules.json +4 -0
- package/souls/qa-evidence/evolution/events.jsonl +0 -0
- package/souls/qa-evidence/evolution/genes.json +4 -0
- package/souls/registry.json +211 -0
- package/souls/sync-registry.js +65 -0
- package/uninstall.sh +102 -0
- package/workspace-bin/auto-checkpoint +60 -0
- package/workspace-bin/clawvault-access-control +65 -0
- package/workspace-bin/clawvault-local +28 -0
- package/workspace-bin/compile-boot +494 -0
- package/workspace-bin/daily-log-writer.mjs +251 -0
- package/workspace-bin/evolve +540 -0
- package/workspace-bin/fitness_score.py +395 -0
- package/workspace-bin/hooks/pre-commit +80 -0
- package/workspace-bin/install-daemon +299 -0
- package/workspace-bin/lane-watchdog.js +232 -0
- package/workspace-bin/lib/__init__.py +0 -0
- package/workspace-bin/lib/frontmatter.py +114 -0
- package/workspace-bin/memory-daemon.mjs +879 -0
- package/workspace-bin/memory-maintenance.mjs +531 -0
- package/workspace-bin/mesh-bridge.mjs +154 -0
- package/workspace-bin/multi-review +130 -0
- package/workspace-bin/obsidian +125 -0
- package/workspace-bin/obsidian-sync.mjs +888 -0
- package/workspace-bin/openclaw-register-source +102 -0
- package/workspace-bin/proactive-scan +147 -0
- package/workspace-bin/quality-gate +175 -0
- package/workspace-bin/screenshot +96 -0
- package/workspace-bin/session-recap +453 -0
- package/workspace-bin/skill-audit +494 -0
- package/workspace-bin/skill-quality-check +134 -0
- package/workspace-bin/skill-routing-eval +599 -0
- package/workspace-bin/soul-prompt +251 -0
- package/workspace-bin/subagent-audit.mjs +267 -0
- package/workspace-bin/test-multi-soul-workflow +130 -0
- package/workspace-bin/trust-registry +465 -0
- package/workspace-docs/AGENTS.md +201 -0
- package/workspace-docs/CLAUDE.md +64 -0
- package/workspace-docs/PRINCIPLES.md +81 -0
- package/workspace-docs/SOUL.md +48 -0
package/bin/mesh.js
ADDED
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* mesh — CLI bridge for OpenClaw ↔ NATS mesh interaction.
|
|
5
|
+
*
|
|
6
|
+
* ARCHITECTURE:
|
|
7
|
+
* OpenClaw (via bash tool) → mesh CLI → NATS → agent.js on target node → result back
|
|
8
|
+
*
|
|
9
|
+
* This is a short-lived process: connects to NATS, sends the request,
|
|
10
|
+
* waits for a response, prints the result, exits. No daemon. No state.
|
|
11
|
+
*
|
|
12
|
+
* SUBCOMMANDS:
|
|
13
|
+
* mesh status — show all online nodes
|
|
14
|
+
* mesh exec "<command>" — run command on remote (Ubuntu) node
|
|
15
|
+
* mesh exec --node <id> "<command>" — run command on specific node
|
|
16
|
+
* mesh capture — screenshot local machine
|
|
17
|
+
* mesh capture --node ubuntu — screenshot remote node
|
|
18
|
+
* mesh ls [subdir] — list shared folder contents
|
|
19
|
+
* mesh put <filepath> [subdir] — copy file into shared folder
|
|
20
|
+
* mesh broadcast "<message>" — send message to all nodes
|
|
21
|
+
*
|
|
22
|
+
* ENVIRONMENT:
|
|
23
|
+
* OPENCLAW_NATS — NATS server URL (auto-detected from env or ~/.openclaw/openclaw.env)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const { connect, StringCodec, createInbox } = require('nats');
|
|
27
|
+
const fs = require('fs');
|
|
28
|
+
const path = require('path');
|
|
29
|
+
const os = require('os');
|
|
30
|
+
|
|
31
|
+
// ─── Config ──────────────────────────────────────────
|
|
32
|
+
// NATS URL resolved via shared lib (env var → openclaw.env → .mesh-config → localhost fallback)
|
|
33
|
+
const { NATS_URL, natsConnectOpts } = require('../lib/nats-resolve');
|
|
34
|
+
const SHARED_DIR = path.join(os.homedir(), 'openclaw', 'shared');
|
|
35
|
+
const LOCAL_NODE = os.hostname().toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
36
|
+
const sc = StringCodec();
|
|
37
|
+
|
|
38
|
+
// ─── Known nodes (for --node shortcuts) ──────────────
|
|
39
|
+
// Load from ~/.openclaw/mesh-aliases.json if it exists, otherwise empty.
|
|
40
|
+
let NODE_ALIASES = {};
|
|
41
|
+
try {
|
|
42
|
+
const aliasFile = path.join(os.homedir(), '.openclaw', 'mesh-aliases.json');
|
|
43
|
+
if (fs.existsSync(aliasFile)) {
|
|
44
|
+
NODE_ALIASES = JSON.parse(fs.readFileSync(aliasFile, 'utf8'));
|
|
45
|
+
}
|
|
46
|
+
} catch {
|
|
47
|
+
// File missing or malformed — proceed with no aliases
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Resolve a node name — accepts aliases, full IDs, or "self"/"local"
|
|
52
|
+
*/
|
|
53
|
+
function resolveNode(name) {
|
|
54
|
+
if (!name || name === 'self' || name === 'local') return LOCAL_NODE;
|
|
55
|
+
const lower = name.toLowerCase();
|
|
56
|
+
return NODE_ALIASES[lower] || lower;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Find the "other" node (not this one).
|
|
61
|
+
* Used as default target for exec/capture.
|
|
62
|
+
*/
|
|
63
|
+
function remoteNode() {
|
|
64
|
+
const allNodes = Object.values(NODE_ALIASES);
|
|
65
|
+
return allNodes.find(n => n !== LOCAL_NODE) || LOCAL_NODE;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ─── Exec safety ─────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
const DESTRUCTIVE_PATTERNS = [
|
|
71
|
+
/\brm\s+(-[a-zA-Z]*)?r[a-zA-Z]*f/, // rm -rf, rm -fr, rm --recursive --force
|
|
72
|
+
/\brm\s+(-[a-zA-Z]*)?f[a-zA-Z]*r/, // rm -fr variants
|
|
73
|
+
/\bmkfs\b/, // format filesystem
|
|
74
|
+
/\bdd\s+.*of=/, // raw disk write
|
|
75
|
+
/\b>\s*\/dev\/[sh]d/, // write to raw device
|
|
76
|
+
/\bcurl\b.*\|\s*(ba)?sh/, // curl pipe to shell
|
|
77
|
+
/\bwget\b.*\|\s*(ba)?sh/, // wget pipe to shell
|
|
78
|
+
/\bchmod\s+(-[a-zA-Z]*\s+)?777\s+\//, // chmod 777 on root paths
|
|
79
|
+
/\b:(){ :\|:& };:/, // fork bomb
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
function checkExecSafety(command) {
|
|
83
|
+
for (const pattern of DESTRUCTIVE_PATTERNS) {
|
|
84
|
+
if (pattern.test(command)) {
|
|
85
|
+
console.error(`BLOCKED: Command matches destructive pattern.`);
|
|
86
|
+
console.error(` Command: ${command}`);
|
|
87
|
+
console.error(` Pattern: ${pattern}`);
|
|
88
|
+
console.error(`\nIf this is intentional, SSH into the node and run it directly.`);
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ─── NATS helpers ────────────────────────────────────
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Connect to NATS with a short timeout (this is a CLI tool, not a daemon).
|
|
98
|
+
*/
|
|
99
|
+
async function natsConnect() {
|
|
100
|
+
try {
|
|
101
|
+
return await connect(natsConnectOpts({ timeout: 5000 }));
|
|
102
|
+
} catch (err) {
|
|
103
|
+
console.error(`Error: Cannot connect to NATS at ${NATS_URL}`);
|
|
104
|
+
console.error(`Is the NATS server running? Is Tailscale connected?`);
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Send a NATS request and wait for a response (with timeout).
|
|
111
|
+
*/
|
|
112
|
+
async function natsRequest(nc, subject, payload, timeoutMs = 35000) {
|
|
113
|
+
try {
|
|
114
|
+
const data = typeof payload === 'string' ? payload : JSON.stringify(payload);
|
|
115
|
+
const msg = await nc.request(subject, sc.encode(data), { timeout: timeoutMs });
|
|
116
|
+
return JSON.parse(sc.decode(msg.data));
|
|
117
|
+
} catch (err) {
|
|
118
|
+
if (err.code === '503' || err.message?.includes('503')) {
|
|
119
|
+
console.error(`Error: No responder on subject "${subject}". Is the target node's agent running?`);
|
|
120
|
+
} else if (err.code === 'TIMEOUT' || err.message?.includes('TIMEOUT')) {
|
|
121
|
+
console.error(`Error: Request timed out after ${timeoutMs / 1000}s. The target node may be offline or the command is taking too long.`);
|
|
122
|
+
} else {
|
|
123
|
+
console.error(`Error: ${err.message}`);
|
|
124
|
+
}
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Collect recent heartbeats to build node status.
|
|
131
|
+
*/
|
|
132
|
+
async function collectHeartbeats(nc, waitMs = 3000) {
|
|
133
|
+
const nodes = {};
|
|
134
|
+
const sub = nc.subscribe('openclaw.*.heartbeat');
|
|
135
|
+
|
|
136
|
+
// Also grab our own status
|
|
137
|
+
nodes[LOCAL_NODE] = {
|
|
138
|
+
node: LOCAL_NODE, platform: os.platform(), status: 'online (local)',
|
|
139
|
+
mem: { total: Math.round(os.totalmem() / 1048576), free: Math.round(os.freemem() / 1048576) },
|
|
140
|
+
uptime: os.uptime(),
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// Force-unsubscribe after deadline to prevent hanging if no messages arrive
|
|
144
|
+
const timer = setTimeout(() => sub.unsubscribe(), waitMs);
|
|
145
|
+
|
|
146
|
+
// Listen for heartbeats for a few seconds
|
|
147
|
+
const deadline = Date.now() + waitMs;
|
|
148
|
+
for await (const msg of sub) {
|
|
149
|
+
try {
|
|
150
|
+
const s = JSON.parse(sc.decode(msg.data));
|
|
151
|
+
if (s.node !== LOCAL_NODE) {
|
|
152
|
+
nodes[s.node] = s;
|
|
153
|
+
}
|
|
154
|
+
} catch {}
|
|
155
|
+
if (Date.now() >= deadline) break;
|
|
156
|
+
}
|
|
157
|
+
clearTimeout(timer);
|
|
158
|
+
sub.unsubscribe();
|
|
159
|
+
return nodes;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ─── Subcommands ─────────────────────────────────────
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* mesh status — show online nodes with platform, memory, uptime, shared files.
|
|
166
|
+
*/
|
|
167
|
+
async function cmdStatus() {
|
|
168
|
+
const nc = await natsConnect();
|
|
169
|
+
console.log('Scanning mesh...\n');
|
|
170
|
+
const nodes = await collectHeartbeats(nc, 3000);
|
|
171
|
+
|
|
172
|
+
for (const [id, info] of Object.entries(nodes)) {
|
|
173
|
+
const memFree = info.mem?.free || '?';
|
|
174
|
+
const memTotal = info.mem?.total || '?';
|
|
175
|
+
const upHours = info.uptime ? (info.uptime / 3600).toFixed(1) : '?';
|
|
176
|
+
const shared = info.sharedFiles ?? '?';
|
|
177
|
+
const role = id === 'moltymacs-virtual-machine-local' ? 'LEAD' : 'WORKER';
|
|
178
|
+
const local = id === LOCAL_NODE ? ' (this machine)' : '';
|
|
179
|
+
|
|
180
|
+
console.log(` ${info.status === 'online' || info.status === 'online (local)' ? '●' : '○'} ${id}${local}`);
|
|
181
|
+
console.log(` Platform: ${info.platform}`);
|
|
182
|
+
console.log(` Role: ${role}`);
|
|
183
|
+
console.log(` Memory: ${memFree}MB free / ${memTotal}MB total`);
|
|
184
|
+
console.log(` Uptime: ${upHours}h`);
|
|
185
|
+
console.log(` Shared files: ${shared}`);
|
|
186
|
+
console.log('');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
await nc.close();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* mesh exec "<command>" — run command on remote node.
|
|
194
|
+
*/
|
|
195
|
+
async function cmdExec(args) {
|
|
196
|
+
// Parse --node flag
|
|
197
|
+
let targetNode = remoteNode();
|
|
198
|
+
let command = '';
|
|
199
|
+
|
|
200
|
+
let i = 0;
|
|
201
|
+
while (i < args.length) {
|
|
202
|
+
if (args[i] === '--node' && args[i + 1]) {
|
|
203
|
+
targetNode = resolveNode(args[i + 1]);
|
|
204
|
+
i += 2;
|
|
205
|
+
} else {
|
|
206
|
+
command += (command ? ' ' : '') + args[i];
|
|
207
|
+
i++;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (!command) {
|
|
212
|
+
console.error('Usage: mesh exec [--node <name>] "<command>"');
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
checkExecSafety(command);
|
|
217
|
+
|
|
218
|
+
const nc = await natsConnect();
|
|
219
|
+
const result = await natsRequest(nc, `openclaw.${targetNode}.exec`, command);
|
|
220
|
+
|
|
221
|
+
// Print output cleanly
|
|
222
|
+
if (result.output) process.stdout.write(result.output);
|
|
223
|
+
if (result.exitCode !== 0) {
|
|
224
|
+
console.error(`\n[exit code: ${result.exitCode}]`);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
await nc.close();
|
|
228
|
+
process.exit(result.exitCode || 0);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* mesh capture — take screenshot on a node.
|
|
233
|
+
*/
|
|
234
|
+
async function cmdCapture(args) {
|
|
235
|
+
let targetNode = LOCAL_NODE;
|
|
236
|
+
let label = 'capture';
|
|
237
|
+
|
|
238
|
+
let i = 0;
|
|
239
|
+
while (i < args.length) {
|
|
240
|
+
if (args[i] === '--node' && args[i + 1]) {
|
|
241
|
+
targetNode = resolveNode(args[i + 1]);
|
|
242
|
+
i += 2;
|
|
243
|
+
} else if (args[i] === '--label' && args[i + 1]) {
|
|
244
|
+
label = args[i + 1];
|
|
245
|
+
i += 2;
|
|
246
|
+
} else {
|
|
247
|
+
i++;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const nc = await natsConnect();
|
|
252
|
+
const result = await natsRequest(nc, `openclaw.${targetNode}.capture`, { label });
|
|
253
|
+
|
|
254
|
+
if (result.sharedPath) {
|
|
255
|
+
console.log(result.sharedPath);
|
|
256
|
+
} else if (result.screenshotPath) {
|
|
257
|
+
console.log(result.screenshotPath);
|
|
258
|
+
} else {
|
|
259
|
+
console.error('Screenshot failed — no path returned.');
|
|
260
|
+
process.exit(1);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
await nc.close();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* mesh ls [subdir] — list shared folder contents.
|
|
268
|
+
*/
|
|
269
|
+
function cmdLs(args) {
|
|
270
|
+
const subdir = args[0] || '';
|
|
271
|
+
const target = path.join(SHARED_DIR, subdir);
|
|
272
|
+
|
|
273
|
+
if (!fs.existsSync(target)) {
|
|
274
|
+
console.error(`Not found: ${target}`);
|
|
275
|
+
process.exit(1);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const stat = fs.statSync(target);
|
|
279
|
+
if (!stat.isDirectory()) {
|
|
280
|
+
// Single file — show info
|
|
281
|
+
console.log(`${target} (${(stat.size / 1024).toFixed(1)}KB, ${stat.mtime.toISOString()})`);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// List directory recursively with sizes
|
|
286
|
+
listDir(target, '');
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function listDir(dir, prefix) {
|
|
290
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
291
|
+
for (const entry of entries) {
|
|
292
|
+
const full = path.join(dir, entry.name);
|
|
293
|
+
if (entry.isDirectory()) {
|
|
294
|
+
console.log(`${prefix}${entry.name}/`);
|
|
295
|
+
listDir(full, prefix + ' ');
|
|
296
|
+
} else {
|
|
297
|
+
const size = fs.statSync(full).size;
|
|
298
|
+
const sizeStr = size < 1024 ? `${size}B` : size < 1048576 ? `${(size / 1024).toFixed(1)}KB` : `${(size / 1048576).toFixed(1)}MB`;
|
|
299
|
+
console.log(`${prefix}${entry.name} (${sizeStr})`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* mesh put <filepath> [subdir] — copy file into shared folder.
|
|
306
|
+
*/
|
|
307
|
+
function cmdPut(args) {
|
|
308
|
+
const srcPath = args[0];
|
|
309
|
+
const destSubdir = args[1] || '';
|
|
310
|
+
|
|
311
|
+
if (!srcPath) {
|
|
312
|
+
console.error('Usage: mesh put <filepath> [subdir]');
|
|
313
|
+
process.exit(1);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (!fs.existsSync(srcPath)) {
|
|
317
|
+
console.error(`Not found: ${srcPath}`);
|
|
318
|
+
process.exit(1);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const destDir = path.join(SHARED_DIR, destSubdir);
|
|
322
|
+
if (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });
|
|
323
|
+
|
|
324
|
+
const filename = path.basename(srcPath);
|
|
325
|
+
const destPath = path.join(destDir, filename);
|
|
326
|
+
|
|
327
|
+
fs.copyFileSync(srcPath, destPath);
|
|
328
|
+
const relPath = path.relative(SHARED_DIR, destPath);
|
|
329
|
+
console.log(`~/openclaw/shared/${relPath}`);
|
|
330
|
+
console.log(`(will sync to other nodes automatically)`);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* mesh broadcast "<message>" — send to all nodes.
|
|
335
|
+
*/
|
|
336
|
+
async function cmdBroadcast(args) {
|
|
337
|
+
const message = args.join(' ');
|
|
338
|
+
if (!message) {
|
|
339
|
+
console.error('Usage: mesh broadcast "<message>"');
|
|
340
|
+
process.exit(1);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const nc = await natsConnect();
|
|
344
|
+
nc.publish('openclaw.broadcast', sc.encode(JSON.stringify({
|
|
345
|
+
fromNode: LOCAL_NODE,
|
|
346
|
+
message,
|
|
347
|
+
timestamp: new Date().toISOString(),
|
|
348
|
+
})));
|
|
349
|
+
|
|
350
|
+
// Give it a moment to flush
|
|
351
|
+
await nc.flush();
|
|
352
|
+
console.log(`Broadcast sent: "${message}"`);
|
|
353
|
+
await nc.close();
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* mesh submit <task.yaml|-> — submit a task to the mesh.
|
|
358
|
+
*
|
|
359
|
+
* Reads YAML from a file or stdin, publishes to mesh.tasks.submit.
|
|
360
|
+
* Also accepts --id <task-id> to submit a task from active-tasks.md.
|
|
361
|
+
*/
|
|
362
|
+
async function cmdSubmit(args) {
|
|
363
|
+
const yaml = require('yaml');
|
|
364
|
+
|
|
365
|
+
// Option A: submit from active-tasks.md by ID
|
|
366
|
+
const idIdx = args.indexOf('--id');
|
|
367
|
+
if (idIdx >= 0 && args[idIdx + 1]) {
|
|
368
|
+
const taskId = args[idIdx + 1];
|
|
369
|
+
const { readTasks, updateTaskInPlace, isoTimestamp, ACTIVE_TASKS_PATH } = require('../lib/kanban-io');
|
|
370
|
+
const tasks = readTasks(ACTIVE_TASKS_PATH);
|
|
371
|
+
const task = tasks.find(t => t.task_id === taskId);
|
|
372
|
+
if (!task) { console.error(`Task ${taskId} not found in active-tasks.md`); process.exit(1); }
|
|
373
|
+
if (task.status !== 'queued') { console.error(`Task ${taskId} is ${task.status}, not queued`); process.exit(1); }
|
|
374
|
+
|
|
375
|
+
const nc = await natsConnect();
|
|
376
|
+
const result = await natsRequest(nc, 'mesh.tasks.submit', {
|
|
377
|
+
task_id: task.task_id,
|
|
378
|
+
title: task.title,
|
|
379
|
+
description: task.description || '',
|
|
380
|
+
budget_minutes: task.budget_minutes || 30,
|
|
381
|
+
metric: task.metric || null,
|
|
382
|
+
success_criteria: task.success_criteria || [],
|
|
383
|
+
scope: task.scope || [],
|
|
384
|
+
priority: task.auto_priority || 0,
|
|
385
|
+
});
|
|
386
|
+
console.log(`Submitted: ${result.data.task_id} [${result.data.status}]`);
|
|
387
|
+
// Mark as 'submitted' — NOT 'running'. The card reflects actual mesh state.
|
|
388
|
+
// The bridge event handler promotes to 'running' when mesh.events.claimed fires.
|
|
389
|
+
// This prevents the Schrödinger state where kanban says 'running' before any agent has claimed.
|
|
390
|
+
updateTaskInPlace(ACTIVE_TASKS_PATH, taskId, { status: 'submitted', owner: 'mesh', updated_at: isoTimestamp() });
|
|
391
|
+
console.log(`Kanban updated: ${taskId} → submitted (will become 'running' on agent claim)`);
|
|
392
|
+
await nc.close();
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Option B: read YAML from file or stdin
|
|
397
|
+
let input;
|
|
398
|
+
const filePath = args.find(a => !a.startsWith('-'));
|
|
399
|
+
if (filePath && filePath !== '-') {
|
|
400
|
+
if (!fs.existsSync(filePath)) { console.error(`File not found: ${filePath}`); process.exit(1); }
|
|
401
|
+
input = fs.readFileSync(filePath, 'utf8');
|
|
402
|
+
} else {
|
|
403
|
+
// Stdin mode — but only if actually piped (not interactive TTY)
|
|
404
|
+
if (process.stdin.isTTY) {
|
|
405
|
+
console.error('Usage: mesh submit <task.yaml>');
|
|
406
|
+
console.error(' mesh submit --id <task-id>');
|
|
407
|
+
console.error(' cat task.yaml | mesh submit');
|
|
408
|
+
process.exit(1);
|
|
409
|
+
}
|
|
410
|
+
// Read from stdin with 5s timeout
|
|
411
|
+
const chunks = [];
|
|
412
|
+
process.stdin.setEncoding('utf8');
|
|
413
|
+
const stdinTimeout = setTimeout(() => {
|
|
414
|
+
console.error('Error: stdin read timed out after 5s');
|
|
415
|
+
process.exit(1);
|
|
416
|
+
}, 5000);
|
|
417
|
+
for await (const chunk of process.stdin) { chunks.push(chunk); }
|
|
418
|
+
clearTimeout(stdinTimeout);
|
|
419
|
+
input = chunks.join('');
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (!input.trim()) { console.error('No input. Provide a YAML file or pipe from stdin.'); process.exit(1); }
|
|
423
|
+
|
|
424
|
+
const task = yaml.parse(input);
|
|
425
|
+
if (!task.task_id || !task.title) { console.error('YAML must have task_id and title.'); process.exit(1); }
|
|
426
|
+
|
|
427
|
+
const nc = await natsConnect();
|
|
428
|
+
const result = await natsRequest(nc, 'mesh.tasks.submit', {
|
|
429
|
+
task_id: task.task_id,
|
|
430
|
+
title: task.title,
|
|
431
|
+
description: task.description || '',
|
|
432
|
+
budget_minutes: task.budget_minutes || 30,
|
|
433
|
+
metric: task.metric || null,
|
|
434
|
+
on_fail: task.on_fail || 'revert and log approach',
|
|
435
|
+
success_criteria: task.success_criteria || [],
|
|
436
|
+
scope: task.scope || [],
|
|
437
|
+
priority: task.priority || 0,
|
|
438
|
+
tags: task.tags || [],
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
console.log(`Submitted: ${result.data.task_id} "${result.data.title}"`);
|
|
442
|
+
console.log(` Status: ${result.data.status}`);
|
|
443
|
+
console.log(` Budget: ${result.data.budget_minutes}m`);
|
|
444
|
+
console.log(` Metric: ${result.data.metric || 'none'}`);
|
|
445
|
+
await nc.close();
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* mesh tasks [--status <filter>] — list mesh tasks.
|
|
450
|
+
*/
|
|
451
|
+
async function cmdTasks(args) {
|
|
452
|
+
const nc = await natsConnect();
|
|
453
|
+
const filter = {};
|
|
454
|
+
const statusIdx = args.indexOf('--status');
|
|
455
|
+
if (statusIdx >= 0 && args[statusIdx + 1]) filter.status = args[statusIdx + 1];
|
|
456
|
+
|
|
457
|
+
const result = await natsRequest(nc, 'mesh.tasks.list', filter);
|
|
458
|
+
const tasks = result.data || [];
|
|
459
|
+
|
|
460
|
+
if (tasks.length === 0) {
|
|
461
|
+
console.log('No tasks in mesh.');
|
|
462
|
+
await nc.close();
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
for (const t of tasks) {
|
|
467
|
+
const elapsed = t.started_at && t.completed_at
|
|
468
|
+
? ((new Date(t.completed_at) - new Date(t.started_at)) / 1000).toFixed(0) + 's'
|
|
469
|
+
: t.started_at
|
|
470
|
+
? ((Date.now() - new Date(t.started_at)) / 1000).toFixed(0) + 's (running)'
|
|
471
|
+
: '-';
|
|
472
|
+
console.log(` ${t.task_id} [${t.status}] "${t.title}"`);
|
|
473
|
+
console.log(` Owner: ${t.owner || '-'} Elapsed: ${elapsed} Attempts: ${t.attempts.length}`);
|
|
474
|
+
if (t.metric) console.log(` Metric: ${t.metric}`);
|
|
475
|
+
if (t.result?.summary) console.log(` Result: ${t.result.summary.slice(0, 120)}`);
|
|
476
|
+
console.log('');
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
await nc.close();
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* mesh health [--json] [--all] — run health check on this node or all nodes.
|
|
484
|
+
*
|
|
485
|
+
* --all: also runs health on remote node via NATS exec.
|
|
486
|
+
* --json: structured JSON output for programmatic parsing.
|
|
487
|
+
*/
|
|
488
|
+
async function cmdHealth(args) {
|
|
489
|
+
const jsonMode = args.includes('--json');
|
|
490
|
+
const allNodes = args.includes('--all');
|
|
491
|
+
const scriptDir = path.join(os.homedir(), 'openclaw', 'bin');
|
|
492
|
+
const healthScript = path.join(scriptDir, 'mesh-health.sh');
|
|
493
|
+
|
|
494
|
+
if (!fs.existsSync(healthScript)) {
|
|
495
|
+
console.error(`Health script not found at ${healthScript}`);
|
|
496
|
+
console.error('Run install-mesh-skill.sh to install.');
|
|
497
|
+
process.exit(1);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// Run local health check
|
|
501
|
+
const localArgs = jsonMode ? '--json' : '';
|
|
502
|
+
try {
|
|
503
|
+
const { execSync } = require('child_process');
|
|
504
|
+
const output = execSync(`bash "${healthScript}" ${localArgs}`, {
|
|
505
|
+
encoding: 'utf8', timeout: 15000, stdio: ['pipe', 'pipe', 'pipe']
|
|
506
|
+
});
|
|
507
|
+
process.stdout.write(output);
|
|
508
|
+
} catch (err) {
|
|
509
|
+
// exit code 1 = unhealthy, still valid output
|
|
510
|
+
if (err.stdout) process.stdout.write(err.stdout);
|
|
511
|
+
if (err.stderr) process.stderr.write(err.stderr);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// If --all, also check the remote node
|
|
515
|
+
if (allNodes) {
|
|
516
|
+
const remote = remoteNode();
|
|
517
|
+
if (!jsonMode) console.log(`\n── Remote node: ${remote} ──\n`);
|
|
518
|
+
const nc = await natsConnect();
|
|
519
|
+
try {
|
|
520
|
+
const remoteCmd = `bash openclaw/bin/mesh-health.sh ${localArgs}`;
|
|
521
|
+
const result = await natsRequest(nc, `openclaw.${remote}.exec`, remoteCmd, 20000);
|
|
522
|
+
if (result.output) process.stdout.write(result.output);
|
|
523
|
+
} catch (e) {
|
|
524
|
+
console.error('Could not reach remote node for health check.');
|
|
525
|
+
}
|
|
526
|
+
await nc.close();
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* mesh repair [--all] — self-repair this node (or all nodes).
|
|
532
|
+
*
|
|
533
|
+
* Runs health check first, then fixes every failed service.
|
|
534
|
+
* Requires sudo for service restarts.
|
|
535
|
+
* --all: also repairs the remote node via NATS exec.
|
|
536
|
+
*/
|
|
537
|
+
async function cmdRepair(args) {
|
|
538
|
+
const allNodes = args.includes('--all');
|
|
539
|
+
const scriptDir = path.join(os.homedir(), 'openclaw', 'bin');
|
|
540
|
+
const repairScript = path.join(scriptDir, 'mesh-repair.sh');
|
|
541
|
+
|
|
542
|
+
if (!fs.existsSync(repairScript)) {
|
|
543
|
+
console.error(`Repair script not found at ${repairScript}`);
|
|
544
|
+
console.error('Run install-mesh-skill.sh to install.');
|
|
545
|
+
process.exit(1);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
// Run local repair (needs sudo for service restarts)
|
|
549
|
+
try {
|
|
550
|
+
const { execSync } = require('child_process');
|
|
551
|
+
execSync(`sudo bash "${repairScript}"`, {
|
|
552
|
+
encoding: 'utf8', timeout: 120000, stdio: 'inherit'
|
|
553
|
+
});
|
|
554
|
+
} catch (err) {
|
|
555
|
+
// repair may exit non-zero if some repairs failed
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// If --all, also repair remote
|
|
559
|
+
if (allNodes) {
|
|
560
|
+
const remote = remoteNode();
|
|
561
|
+
console.log(`\n══ Remote repair: ${remote} ══\n`);
|
|
562
|
+
const nc = await natsConnect();
|
|
563
|
+
try {
|
|
564
|
+
const result = await natsRequest(nc,
|
|
565
|
+
`openclaw.${remote}.exec`,
|
|
566
|
+
`bash openclaw/bin/mesh-repair.sh`,
|
|
567
|
+
120000
|
|
568
|
+
);
|
|
569
|
+
if (result.output) process.stdout.write(result.output);
|
|
570
|
+
} catch (e) {
|
|
571
|
+
console.error('Could not reach remote node for repair.');
|
|
572
|
+
console.error('SSH in and run: sudo bash openclaw/bin/mesh-repair.sh');
|
|
573
|
+
}
|
|
574
|
+
await nc.close();
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* mesh help — show usage.
|
|
580
|
+
*/
|
|
581
|
+
function cmdHelp() {
|
|
582
|
+
console.log([
|
|
583
|
+
'',
|
|
584
|
+
'mesh -- OpenClaw multi-node mesh CLI',
|
|
585
|
+
'',
|
|
586
|
+
'USAGE:',
|
|
587
|
+
' mesh status Show online nodes',
|
|
588
|
+
' mesh exec "<command>" Run command on remote node',
|
|
589
|
+
' mesh exec --node <n> "<command>" Run command on specific node',
|
|
590
|
+
' mesh capture Screenshot this machine',
|
|
591
|
+
' mesh capture --node ubuntu Screenshot remote node',
|
|
592
|
+
' mesh ls [subdir] List shared folder',
|
|
593
|
+
' mesh put <file> [subdir] Copy file to shared folder',
|
|
594
|
+
' mesh broadcast "<message>" Send message to all nodes',
|
|
595
|
+
' mesh submit <task.yaml> Submit a task YAML to the mesh',
|
|
596
|
+
' mesh submit --id <task-id> Submit a kanban card by ID',
|
|
597
|
+
' cat task.yaml | mesh submit Submit from stdin',
|
|
598
|
+
' mesh tasks List all mesh tasks',
|
|
599
|
+
' mesh tasks --status running Filter mesh tasks by status',
|
|
600
|
+
' mesh health Health check this node',
|
|
601
|
+
' mesh health --all Health check ALL nodes',
|
|
602
|
+
' mesh health --json Health check (JSON output)',
|
|
603
|
+
' mesh repair Self-repair this node',
|
|
604
|
+
' mesh repair --all Self-repair ALL nodes',
|
|
605
|
+
'',
|
|
606
|
+
'NODE ALIASES:',
|
|
607
|
+
' ubuntu, linux = Ubuntu VM (calos-vmware-virtual-platform)',
|
|
608
|
+
' mac, macos = macOS VM (moltymacs-virtual-machine-local)',
|
|
609
|
+
'',
|
|
610
|
+
'SHARED FOLDER:',
|
|
611
|
+
' ~/openclaw/shared/ -- auto-synced between all nodes via NATS',
|
|
612
|
+
'',
|
|
613
|
+
'ENVIRONMENT:',
|
|
614
|
+
' OPENCLAW_NATS -- NATS server URL (auto-detected from env or ~/.openclaw/openclaw.env)',
|
|
615
|
+
'',
|
|
616
|
+
].join('\n'));
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// --- Main dispatch ---------------------------------------------------
|
|
620
|
+
|
|
621
|
+
async function main() {
|
|
622
|
+
const [cmd, ...args] = process.argv.slice(2);
|
|
623
|
+
|
|
624
|
+
switch (cmd) {
|
|
625
|
+
case 'status': return cmdStatus();
|
|
626
|
+
case 'exec': return cmdExec(args);
|
|
627
|
+
case 'capture': return cmdCapture(args);
|
|
628
|
+
case 'ls': return cmdLs(args);
|
|
629
|
+
case 'put': return cmdPut(args);
|
|
630
|
+
case 'broadcast': return cmdBroadcast(args);
|
|
631
|
+
case 'submit': return cmdSubmit(args);
|
|
632
|
+
case 'tasks': return cmdTasks(args);
|
|
633
|
+
case 'health': return cmdHealth(args);
|
|
634
|
+
case 'repair': return cmdRepair(args);
|
|
635
|
+
case 'help':
|
|
636
|
+
case '--help':
|
|
637
|
+
case '-h': return cmdHelp();
|
|
638
|
+
default:
|
|
639
|
+
if (!cmd) return cmdHelp();
|
|
640
|
+
console.error(`Unknown command: ${cmd}`);
|
|
641
|
+
console.error(`Run "mesh help" for usage.`);
|
|
642
|
+
process.exit(1);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
main().catch(err => {
|
|
647
|
+
console.error(`mesh error: ${err.message}`);
|
|
648
|
+
process.exit(1);
|
|
649
|
+
});
|