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
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mesh
|
|
3
|
+
description: >
|
|
4
|
+
Multi-node mesh network for cross-machine file sharing, remote command execution,
|
|
5
|
+
screenshots, and visual verification. Two nodes: macOS (lead) and Ubuntu (worker).
|
|
6
|
+
Files dropped in ~/openclaw/shared/ auto-sync to all nodes via NATS.
|
|
7
|
+
Use when you need to: run commands on the other machine, take screenshots on either
|
|
8
|
+
node, share files between machines, verify visual output across nodes, or coordinate
|
|
9
|
+
work across the mesh.
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
user-invocable: true
|
|
12
|
+
metadata:
|
|
13
|
+
openclaw:
|
|
14
|
+
requires:
|
|
15
|
+
bins:
|
|
16
|
+
- mesh
|
|
17
|
+
os:
|
|
18
|
+
- macos
|
|
19
|
+
- linux
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Mesh — Multi-Node Coordination
|
|
23
|
+
|
|
24
|
+
You have access to a **two-node mesh network** connected via NATS over Tailscale.
|
|
25
|
+
|
|
26
|
+
## Nodes
|
|
27
|
+
|
|
28
|
+
| Node | Platform | Role | Tailscale IP |
|
|
29
|
+
|------|----------|------|-------------|
|
|
30
|
+
| macOS (this machine) | darwin | **Lead** — orchestrates, delegates | 100.65.201.114 |
|
|
31
|
+
| Ubuntu | linux | **Worker** — executes, renders | 100.91.131.61 |
|
|
32
|
+
|
|
33
|
+
## Shared Folder
|
|
34
|
+
|
|
35
|
+
**`~/openclaw/shared/`** exists on both machines with identical contents.
|
|
36
|
+
Files placed here by either node are automatically synced to the other within seconds via NATS.
|
|
37
|
+
|
|
38
|
+
Use this folder for:
|
|
39
|
+
- Sharing code, configs, markdown, images between nodes
|
|
40
|
+
- Receiving screenshots from either node
|
|
41
|
+
- Passing build artifacts, test results, or renders between machines
|
|
42
|
+
- Any file that both nodes need access to
|
|
43
|
+
|
|
44
|
+
Screenshots are saved to `~/openclaw/shared/captures/`.
|
|
45
|
+
|
|
46
|
+
**The path is the same on both machines.** You can reference `~/openclaw/shared/whatever.png`
|
|
47
|
+
and it resolves correctly on both nodes.
|
|
48
|
+
|
|
49
|
+
## CLI — `mesh` command
|
|
50
|
+
|
|
51
|
+
The `mesh` CLI is available in your PATH. Use it via bash:
|
|
52
|
+
|
|
53
|
+
### Check mesh status
|
|
54
|
+
```bash
|
|
55
|
+
mesh status
|
|
56
|
+
```
|
|
57
|
+
Returns: which nodes are online, memory, uptime, number of shared files.
|
|
58
|
+
|
|
59
|
+
### Run a command on the Ubuntu node
|
|
60
|
+
```bash
|
|
61
|
+
mesh exec "ls -la /home/calos/projects/"
|
|
62
|
+
mesh exec "docker ps"
|
|
63
|
+
mesh exec "cat /etc/os-release"
|
|
64
|
+
```
|
|
65
|
+
Runs the command on the **remote** Ubuntu node and returns stdout/stderr.
|
|
66
|
+
Timeout: 30 seconds. For long-running tasks, background them.
|
|
67
|
+
|
|
68
|
+
### Take a screenshot on a specific node
|
|
69
|
+
```bash
|
|
70
|
+
mesh capture # Screenshot this machine (macOS)
|
|
71
|
+
mesh capture --node ubuntu # Screenshot the Ubuntu node
|
|
72
|
+
```
|
|
73
|
+
Screenshots are saved to `~/openclaw/shared/captures/` and auto-synced.
|
|
74
|
+
The command returns the file path.
|
|
75
|
+
|
|
76
|
+
### Health check the mesh
|
|
77
|
+
```bash
|
|
78
|
+
mesh health # Check this node only
|
|
79
|
+
mesh health --all # Check ALL nodes (local + remote)
|
|
80
|
+
mesh health --json # Machine-readable JSON output
|
|
81
|
+
```
|
|
82
|
+
Checks every service: Tailscale, NATS, MeshCentral, Mumble, OpenClaw agent,
|
|
83
|
+
shared folder, mesh CLI, disk space, peer reachability.
|
|
84
|
+
Returns per-service status: ok / degraded / down.
|
|
85
|
+
|
|
86
|
+
### Self-repair the mesh
|
|
87
|
+
```bash
|
|
88
|
+
mesh repair # Repair this node
|
|
89
|
+
mesh repair --all # Repair ALL nodes (local + remote)
|
|
90
|
+
```
|
|
91
|
+
Runs health check first, then for each failed service:
|
|
92
|
+
- Restarts the systemd unit (Ubuntu) or LaunchDaemon (macOS)
|
|
93
|
+
- Recreates missing directories and fixes permissions
|
|
94
|
+
- Reconnects Tailscale if disconnected
|
|
95
|
+
- Clears stale logs and PID files
|
|
96
|
+
- Reports what it did and whether it worked
|
|
97
|
+
|
|
98
|
+
Requires sudo. Safe to re-run (idempotent).
|
|
99
|
+
|
|
100
|
+
### List shared files
|
|
101
|
+
```bash
|
|
102
|
+
mesh ls
|
|
103
|
+
mesh ls captures/
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Send a file to the shared folder
|
|
107
|
+
```bash
|
|
108
|
+
mesh put /path/to/local/file.txt
|
|
109
|
+
mesh put /path/to/image.png captures/
|
|
110
|
+
```
|
|
111
|
+
Copies the file into `~/openclaw/shared/` (optionally into a subdirectory).
|
|
112
|
+
It will auto-sync to the other node.
|
|
113
|
+
|
|
114
|
+
### Broadcast a message to all nodes
|
|
115
|
+
```bash
|
|
116
|
+
mesh broadcast "Build starting — do not reboot"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## When to use this skill
|
|
120
|
+
|
|
121
|
+
- **"Run this on Linux"** -> `mesh exec "<command>"`
|
|
122
|
+
- **"Check what the Ubuntu machine is showing"** -> `mesh capture --node ubuntu`
|
|
123
|
+
- **"Share this file with the other node"** -> `mesh put <file>`
|
|
124
|
+
- **"Is the other node online?"** -> `mesh status`
|
|
125
|
+
- **"Take a screenshot"** -> `mesh capture`
|
|
126
|
+
- **"Deploy to the Linux server"** -> `mesh exec` + `mesh put` for files
|
|
127
|
+
- **"Verify the UI on both platforms"** -> `mesh capture` + `mesh capture --node ubuntu`
|
|
128
|
+
- **"Is the mesh healthy?"** -> `mesh health --all`
|
|
129
|
+
- **"Something's broken / not responding"** -> `mesh health --all` then `mesh repair --all`
|
|
130
|
+
- **"Fix the mesh"** -> `mesh repair --all`
|
|
131
|
+
- **Before delegating work to the remote node** -> `mesh health --all` first
|
|
132
|
+
- **During heartbeat checks** -> `mesh health --json --all` for structured diagnostics
|
|
133
|
+
- **When a remote exec fails or times out** -> `mesh health` then `mesh repair` then retry
|
|
134
|
+
- Any cross-machine coordination
|
|
135
|
+
|
|
136
|
+
## Autonomous maintenance pattern
|
|
137
|
+
|
|
138
|
+
When using the mesh in HEARTBEAT.md or cron jobs, follow this pattern:
|
|
139
|
+
|
|
140
|
+
1. `mesh health --json --all` -- get structured status of entire mesh
|
|
141
|
+
2. If overall != "ok", run `mesh repair --all`
|
|
142
|
+
3. `mesh health --json --all` -- verify repair worked
|
|
143
|
+
4. If still broken, log the failure to `~/openclaw/shared/mesh-incidents.log`
|
|
144
|
+
and alert the user
|
|
145
|
+
5. Only proceed with delegated work if mesh is healthy
|
|
146
|
+
|
|
147
|
+
This ensures the mesh self-heals before attempting cross-node operations.
|
|
148
|
+
|
|
149
|
+
## Security model
|
|
150
|
+
|
|
151
|
+
**Network isolation:** NATS listens on `0.0.0.0:4222` but is only reachable via Tailscale.
|
|
152
|
+
Tailscale is the authentication layer — no device outside the tailnet can connect.
|
|
153
|
+
There is no additional NATS auth (no tokens, no TLS) because the tailnet is the trust boundary.
|
|
154
|
+
|
|
155
|
+
**Exec audit log:** Every command run via `mesh exec` is logged to
|
|
156
|
+
`~/openclaw/shared/mesh-audit.log` with timestamp, node ID, command, and exit code.
|
|
157
|
+
This log auto-syncs to both nodes. Review it periodically.
|
|
158
|
+
|
|
159
|
+
**Destructive command blocklist:** The CLI blocks known-destructive patterns before they
|
|
160
|
+
reach the remote node:
|
|
161
|
+
- `rm -rf`, `mkfs`, `dd of=`, `curl|sh`, `chmod 777 /`, fork bombs
|
|
162
|
+
- If you need to run a blocked command, SSH into the node directly.
|
|
163
|
+
|
|
164
|
+
**Path traversal protection:** The agent validates all incoming file sync paths stay within
|
|
165
|
+
`~/openclaw/shared/`. Paths containing `../` that escape the shared directory are rejected
|
|
166
|
+
and logged to the audit log.
|
|
167
|
+
|
|
168
|
+
**Node discovery:** Use `mesh status` to discover online nodes dynamically.
|
|
169
|
+
Do not rely on hardcoded Tailscale IPs — they may change if nodes rejoin the tailnet.
|
|
170
|
+
|
|
171
|
+
## Anti-patterns — do NOT do these
|
|
172
|
+
|
|
173
|
+
- **Don't use `mesh exec` for long-running daemons.** The 30s timeout will kill them. Use systemd/launchd on the target node instead.
|
|
174
|
+
- **Don't sync files larger than 10MB via `mesh put`.** Use `scp` over Tailscale directly: `scp file calos@100.91.131.61:~/path/`
|
|
175
|
+
- **Don't run `mesh repair --all` in a tight loop.** It needs time for services to stabilize. Use the autonomous maintenance pattern with backoff.
|
|
176
|
+
- **Don't store secrets in `~/openclaw/shared/`.** It syncs to all nodes unencrypted over NATS. Use Tailscale's built-in file transfer for sensitive data.
|
|
177
|
+
- **Don't assume the shared folder is instant.** Polling interval is 2 seconds. If you write a file and immediately read it on the other node, it may not be there yet. Wait or verify.
|
|
178
|
+
|
|
179
|
+
## Important notes
|
|
180
|
+
|
|
181
|
+
- The Ubuntu node runs headless most of the time. Screenshots may show a terminal or desktop depending on session state.
|
|
182
|
+
- Commands on the remote node run as the `calos` user on Ubuntu.
|
|
183
|
+
- Max file sync size is 10MB per file. For larger files, use `scp` over Tailscale directly.
|
|
184
|
+
- The mesh agent runs as a systemd service (Ubuntu) and LaunchDaemon (macOS) — it survives reboots.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: model-usage
|
|
3
|
+
description: "Summarize per-model usage costs from CodexBar CLI logs. Use when asked for model-level cost breakdowns, current model usage, or full model spending summaries for Codex or Claude."
|
|
4
|
+
triggers:
|
|
5
|
+
- "show my model usage"
|
|
6
|
+
- "how much did I spend on Claude"
|
|
7
|
+
- "codexbar cost breakdown"
|
|
8
|
+
- "what model am I using"
|
|
9
|
+
negative_triggers:
|
|
10
|
+
- "check API rate limits"
|
|
11
|
+
- "configure model settings"
|
|
12
|
+
- "switch to a different model"
|
|
13
|
+
metadata: {"clawdbot":{"emoji":"📊","os":["darwin"],"requires":{"bins":["codexbar"]},"install":[{"id":"brew-cask","kind":"brew","cask":"steipete/tap/codexbar","bins":["codexbar"],"label":"Install CodexBar (brew cask)"}]}}
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Model usage
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
Get per-model usage cost from CodexBar's local cost logs. Supports "current model" (most recent daily entry) or "all models" summaries for Codex or Claude.
|
|
20
|
+
|
|
21
|
+
TODO: add Linux CLI support guidance once CodexBar CLI install path is documented for Linux.
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
1) Fetch cost JSON via CodexBar CLI or pass a JSON file.
|
|
25
|
+
2) Use the bundled script to summarize by model.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python {baseDir}/scripts/model_usage.py --provider codex --mode current
|
|
29
|
+
python {baseDir}/scripts/model_usage.py --provider codex --mode all
|
|
30
|
+
python {baseDir}/scripts/model_usage.py --provider claude --mode all --format json --pretty
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Current model logic
|
|
34
|
+
- Uses the most recent daily row with `modelBreakdowns`.
|
|
35
|
+
- Picks the model with the highest cost in that row.
|
|
36
|
+
- Falls back to the last entry in `modelsUsed` when breakdowns are missing.
|
|
37
|
+
- Override with `--model <name>` when you need a specific model.
|
|
38
|
+
|
|
39
|
+
## Inputs
|
|
40
|
+
- Default: runs `codexbar cost --format json --provider <codex|claude>`.
|
|
41
|
+
- File or stdin:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
codexbar cost --provider codex --format json > /tmp/cost.json
|
|
45
|
+
python {baseDir}/scripts/model_usage.py --input /tmp/cost.json --mode all
|
|
46
|
+
cat /tmp/cost.json | python {baseDir}/scripts/model_usage.py --input - --mode current
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Output
|
|
50
|
+
- Text (default) or JSON (`--format json --pretty`).
|
|
51
|
+
- Values are cost-only per model; tokens are not split by model in CodexBar output.
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
- Read `references/codexbar-cli.md` for CLI flags and cost JSON fields.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# CodexBar CLI quick ref (usage + cost)
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
- App: Preferences -> Advanced -> Install CLI
|
|
5
|
+
- Repo: ./bin/install-codexbar-cli.sh
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
- Usage snapshot (web/cli sources):
|
|
9
|
+
- codexbar usage --format json --pretty
|
|
10
|
+
- codexbar --provider all --format json
|
|
11
|
+
- Local cost usage (Codex + Claude only):
|
|
12
|
+
- codexbar cost --format json --pretty
|
|
13
|
+
- codexbar cost --provider codex|claude --format json
|
|
14
|
+
|
|
15
|
+
## Cost JSON fields
|
|
16
|
+
The payload is an array (one per provider).
|
|
17
|
+
- provider, source, updatedAt
|
|
18
|
+
- sessionTokens, sessionCostUSD
|
|
19
|
+
- last30DaysTokens, last30DaysCostUSD
|
|
20
|
+
- daily[]: date, inputTokens, outputTokens, cacheReadTokens, cacheCreationTokens, totalTokens, totalCost, modelsUsed, modelBreakdowns[]
|
|
21
|
+
- modelBreakdowns[]: modelName, cost
|
|
22
|
+
- totals: totalInputTokens, totalOutputTokens, cacheReadTokens, cacheCreationTokens, totalTokens, totalCost
|
|
23
|
+
|
|
24
|
+
## Notes
|
|
25
|
+
- Cost usage is local-only. It reads JSONL logs under:
|
|
26
|
+
- Codex: ~/.codex/sessions/**/*.jsonl
|
|
27
|
+
- Claude: ~/.config/claude/projects/**/*.jsonl or ~/.claude/projects/**/*.jsonl
|
|
28
|
+
- If web usage is required (non-local), use codexbar usage (not cost).
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Summarize CodexBar local cost usage by model.
|
|
4
|
+
|
|
5
|
+
Defaults to current model (most recent daily entry), or list all models.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import subprocess
|
|
14
|
+
import sys
|
|
15
|
+
from dataclasses import dataclass
|
|
16
|
+
from datetime import date, datetime, timedelta
|
|
17
|
+
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def eprint(msg: str) -> None:
|
|
21
|
+
print(msg, file=sys.stderr)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def run_codexbar_cost(provider: str) -> List[Dict[str, Any]]:
|
|
25
|
+
cmd = ["codexbar", "cost", "--format", "json", "--provider", provider]
|
|
26
|
+
try:
|
|
27
|
+
output = subprocess.check_output(cmd, text=True)
|
|
28
|
+
except FileNotFoundError:
|
|
29
|
+
raise RuntimeError("codexbar not found on PATH. Install CodexBar CLI first.")
|
|
30
|
+
except subprocess.CalledProcessError as exc:
|
|
31
|
+
raise RuntimeError(f"codexbar cost failed (exit {exc.returncode}).")
|
|
32
|
+
try:
|
|
33
|
+
payload = json.loads(output)
|
|
34
|
+
except json.JSONDecodeError as exc:
|
|
35
|
+
raise RuntimeError(f"Failed to parse codexbar JSON output: {exc}")
|
|
36
|
+
if not isinstance(payload, list):
|
|
37
|
+
raise RuntimeError("Expected codexbar cost JSON array.")
|
|
38
|
+
return payload
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def load_payload(input_path: Optional[str], provider: str) -> Dict[str, Any]:
|
|
42
|
+
if input_path:
|
|
43
|
+
if input_path == "-":
|
|
44
|
+
raw = sys.stdin.read()
|
|
45
|
+
else:
|
|
46
|
+
with open(input_path, "r", encoding="utf-8") as handle:
|
|
47
|
+
raw = handle.read()
|
|
48
|
+
data = json.loads(raw)
|
|
49
|
+
else:
|
|
50
|
+
data = run_codexbar_cost(provider)
|
|
51
|
+
|
|
52
|
+
if isinstance(data, dict):
|
|
53
|
+
return data
|
|
54
|
+
|
|
55
|
+
if isinstance(data, list):
|
|
56
|
+
for entry in data:
|
|
57
|
+
if isinstance(entry, dict) and entry.get("provider") == provider:
|
|
58
|
+
return entry
|
|
59
|
+
raise RuntimeError(f"Provider '{provider}' not found in codexbar payload.")
|
|
60
|
+
|
|
61
|
+
raise RuntimeError("Unsupported JSON input format.")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass
|
|
65
|
+
class ModelCost:
|
|
66
|
+
model: str
|
|
67
|
+
cost: float
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def parse_daily_entries(payload: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
71
|
+
daily = payload.get("daily")
|
|
72
|
+
if not daily:
|
|
73
|
+
return []
|
|
74
|
+
if not isinstance(daily, list):
|
|
75
|
+
return []
|
|
76
|
+
return [entry for entry in daily if isinstance(entry, dict)]
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def parse_date(value: str) -> Optional[date]:
|
|
80
|
+
try:
|
|
81
|
+
return datetime.strptime(value, "%Y-%m-%d").date()
|
|
82
|
+
except Exception:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def filter_by_days(entries: List[Dict[str, Any]], days: Optional[int]) -> List[Dict[str, Any]]:
|
|
87
|
+
if not days:
|
|
88
|
+
return entries
|
|
89
|
+
cutoff = date.today() - timedelta(days=days - 1)
|
|
90
|
+
filtered: List[Dict[str, Any]] = []
|
|
91
|
+
for entry in entries:
|
|
92
|
+
day = entry.get("date")
|
|
93
|
+
if not isinstance(day, str):
|
|
94
|
+
continue
|
|
95
|
+
parsed = parse_date(day)
|
|
96
|
+
if parsed and parsed >= cutoff:
|
|
97
|
+
filtered.append(entry)
|
|
98
|
+
return filtered
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def aggregate_costs(entries: Iterable[Dict[str, Any]]) -> Dict[str, float]:
|
|
102
|
+
totals: Dict[str, float] = {}
|
|
103
|
+
for entry in entries:
|
|
104
|
+
breakdowns = entry.get("modelBreakdowns")
|
|
105
|
+
if not breakdowns:
|
|
106
|
+
continue
|
|
107
|
+
if not isinstance(breakdowns, list):
|
|
108
|
+
continue
|
|
109
|
+
for item in breakdowns:
|
|
110
|
+
if not isinstance(item, dict):
|
|
111
|
+
continue
|
|
112
|
+
model = item.get("modelName")
|
|
113
|
+
cost = item.get("cost")
|
|
114
|
+
if not isinstance(model, str):
|
|
115
|
+
continue
|
|
116
|
+
if not isinstance(cost, (int, float)):
|
|
117
|
+
continue
|
|
118
|
+
totals[model] = totals.get(model, 0.0) + float(cost)
|
|
119
|
+
return totals
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def pick_current_model(entries: List[Dict[str, Any]]) -> Tuple[Optional[str], Optional[str]]:
|
|
123
|
+
if not entries:
|
|
124
|
+
return None, None
|
|
125
|
+
sorted_entries = sorted(
|
|
126
|
+
entries,
|
|
127
|
+
key=lambda entry: entry.get("date") or "",
|
|
128
|
+
)
|
|
129
|
+
for entry in reversed(sorted_entries):
|
|
130
|
+
breakdowns = entry.get("modelBreakdowns")
|
|
131
|
+
if isinstance(breakdowns, list) and breakdowns:
|
|
132
|
+
scored: List[ModelCost] = []
|
|
133
|
+
for item in breakdowns:
|
|
134
|
+
if not isinstance(item, dict):
|
|
135
|
+
continue
|
|
136
|
+
model = item.get("modelName")
|
|
137
|
+
cost = item.get("cost")
|
|
138
|
+
if isinstance(model, str) and isinstance(cost, (int, float)):
|
|
139
|
+
scored.append(ModelCost(model=model, cost=float(cost)))
|
|
140
|
+
if scored:
|
|
141
|
+
scored.sort(key=lambda item: item.cost, reverse=True)
|
|
142
|
+
return scored[0].model, entry.get("date") if isinstance(entry.get("date"), str) else None
|
|
143
|
+
models_used = entry.get("modelsUsed")
|
|
144
|
+
if isinstance(models_used, list) and models_used:
|
|
145
|
+
last = models_used[-1]
|
|
146
|
+
if isinstance(last, str):
|
|
147
|
+
return last, entry.get("date") if isinstance(entry.get("date"), str) else None
|
|
148
|
+
return None, None
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def usd(value: Optional[float]) -> str:
|
|
152
|
+
if value is None:
|
|
153
|
+
return "—"
|
|
154
|
+
return f"${value:,.2f}"
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def latest_day_cost(entries: List[Dict[str, Any]], model: str) -> Tuple[Optional[str], Optional[float]]:
|
|
158
|
+
if not entries:
|
|
159
|
+
return None, None
|
|
160
|
+
sorted_entries = sorted(
|
|
161
|
+
entries,
|
|
162
|
+
key=lambda entry: entry.get("date") or "",
|
|
163
|
+
)
|
|
164
|
+
for entry in reversed(sorted_entries):
|
|
165
|
+
breakdowns = entry.get("modelBreakdowns")
|
|
166
|
+
if not isinstance(breakdowns, list):
|
|
167
|
+
continue
|
|
168
|
+
for item in breakdowns:
|
|
169
|
+
if not isinstance(item, dict):
|
|
170
|
+
continue
|
|
171
|
+
if item.get("modelName") == model:
|
|
172
|
+
cost = item.get("cost") if isinstance(item.get("cost"), (int, float)) else None
|
|
173
|
+
day = entry.get("date") if isinstance(entry.get("date"), str) else None
|
|
174
|
+
return day, float(cost) if cost is not None else None
|
|
175
|
+
return None, None
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def render_text_current(
|
|
179
|
+
provider: str,
|
|
180
|
+
model: str,
|
|
181
|
+
latest_date: Optional[str],
|
|
182
|
+
total_cost: Optional[float],
|
|
183
|
+
latest_cost: Optional[float],
|
|
184
|
+
latest_cost_date: Optional[str],
|
|
185
|
+
entry_count: int,
|
|
186
|
+
) -> str:
|
|
187
|
+
lines = [f"Provider: {provider}", f"Current model: {model}"]
|
|
188
|
+
if latest_date:
|
|
189
|
+
lines.append(f"Latest model date: {latest_date}")
|
|
190
|
+
lines.append(f"Total cost (rows): {usd(total_cost)}")
|
|
191
|
+
if latest_cost_date:
|
|
192
|
+
lines.append(f"Latest day cost: {usd(latest_cost)} ({latest_cost_date})")
|
|
193
|
+
lines.append(f"Daily rows: {entry_count}")
|
|
194
|
+
return "\n".join(lines)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def render_text_all(provider: str, totals: Dict[str, float]) -> str:
|
|
198
|
+
lines = [f"Provider: {provider}", "Models:"]
|
|
199
|
+
for model, cost in sorted(totals.items(), key=lambda item: item[1], reverse=True):
|
|
200
|
+
lines.append(f"- {model}: {usd(cost)}")
|
|
201
|
+
return "\n".join(lines)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def build_json_current(
|
|
205
|
+
provider: str,
|
|
206
|
+
model: str,
|
|
207
|
+
latest_date: Optional[str],
|
|
208
|
+
total_cost: Optional[float],
|
|
209
|
+
latest_cost: Optional[float],
|
|
210
|
+
latest_cost_date: Optional[str],
|
|
211
|
+
entry_count: int,
|
|
212
|
+
) -> Dict[str, Any]:
|
|
213
|
+
return {
|
|
214
|
+
"provider": provider,
|
|
215
|
+
"mode": "current",
|
|
216
|
+
"model": model,
|
|
217
|
+
"latestModelDate": latest_date,
|
|
218
|
+
"totalCostUSD": total_cost,
|
|
219
|
+
"latestDayCostUSD": latest_cost,
|
|
220
|
+
"latestDayCostDate": latest_cost_date,
|
|
221
|
+
"dailyRowCount": entry_count,
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def build_json_all(provider: str, totals: Dict[str, float]) -> Dict[str, Any]:
|
|
226
|
+
return {
|
|
227
|
+
"provider": provider,
|
|
228
|
+
"mode": "all",
|
|
229
|
+
"models": [
|
|
230
|
+
{"model": model, "totalCostUSD": cost}
|
|
231
|
+
for model, cost in sorted(totals.items(), key=lambda item: item[1], reverse=True)
|
|
232
|
+
],
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def main() -> int:
|
|
237
|
+
parser = argparse.ArgumentParser(description="Summarize CodexBar model usage from local cost logs.")
|
|
238
|
+
parser.add_argument("--provider", choices=["codex", "claude"], default="codex")
|
|
239
|
+
parser.add_argument("--mode", choices=["current", "all"], default="current")
|
|
240
|
+
parser.add_argument("--model", help="Explicit model name to report instead of auto-current.")
|
|
241
|
+
parser.add_argument("--input", help="Path to codexbar cost JSON (or '-' for stdin).")
|
|
242
|
+
parser.add_argument("--days", type=int, help="Limit to last N days (based on daily rows).")
|
|
243
|
+
parser.add_argument("--format", choices=["text", "json"], default="text")
|
|
244
|
+
parser.add_argument("--pretty", action="store_true", help="Pretty-print JSON output.")
|
|
245
|
+
|
|
246
|
+
args = parser.parse_args()
|
|
247
|
+
|
|
248
|
+
try:
|
|
249
|
+
payload = load_payload(args.input, args.provider)
|
|
250
|
+
except Exception as exc:
|
|
251
|
+
eprint(str(exc))
|
|
252
|
+
return 1
|
|
253
|
+
|
|
254
|
+
entries = parse_daily_entries(payload)
|
|
255
|
+
entries = filter_by_days(entries, args.days)
|
|
256
|
+
|
|
257
|
+
if args.mode == "current":
|
|
258
|
+
model = args.model
|
|
259
|
+
latest_date = None
|
|
260
|
+
if not model:
|
|
261
|
+
model, latest_date = pick_current_model(entries)
|
|
262
|
+
if not model:
|
|
263
|
+
eprint("No model data found in codexbar cost payload.")
|
|
264
|
+
return 2
|
|
265
|
+
totals = aggregate_costs(entries)
|
|
266
|
+
total_cost = totals.get(model)
|
|
267
|
+
latest_cost_date, latest_cost = latest_day_cost(entries, model)
|
|
268
|
+
|
|
269
|
+
if args.format == "json":
|
|
270
|
+
payload_out = build_json_current(
|
|
271
|
+
provider=args.provider,
|
|
272
|
+
model=model,
|
|
273
|
+
latest_date=latest_date,
|
|
274
|
+
total_cost=total_cost,
|
|
275
|
+
latest_cost=latest_cost,
|
|
276
|
+
latest_cost_date=latest_cost_date,
|
|
277
|
+
entry_count=len(entries),
|
|
278
|
+
)
|
|
279
|
+
indent = 2 if args.pretty else None
|
|
280
|
+
print(json.dumps(payload_out, indent=indent, sort_keys=args.pretty))
|
|
281
|
+
else:
|
|
282
|
+
print(
|
|
283
|
+
render_text_current(
|
|
284
|
+
provider=args.provider,
|
|
285
|
+
model=model,
|
|
286
|
+
latest_date=latest_date,
|
|
287
|
+
total_cost=total_cost,
|
|
288
|
+
latest_cost=latest_cost,
|
|
289
|
+
latest_cost_date=latest_cost_date,
|
|
290
|
+
entry_count=len(entries),
|
|
291
|
+
)
|
|
292
|
+
)
|
|
293
|
+
return 0
|
|
294
|
+
|
|
295
|
+
totals = aggregate_costs(entries)
|
|
296
|
+
if not totals:
|
|
297
|
+
eprint("No model breakdowns found in codexbar cost payload.")
|
|
298
|
+
return 2
|
|
299
|
+
|
|
300
|
+
if args.format == "json":
|
|
301
|
+
payload_out = build_json_all(provider=args.provider, totals=totals)
|
|
302
|
+
indent = 2 if args.pretty else None
|
|
303
|
+
print(json.dumps(payload_out, indent=indent, sort_keys=args.pretty))
|
|
304
|
+
else:
|
|
305
|
+
print(render_text_all(provider=args.provider, totals=totals))
|
|
306
|
+
return 0
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
if __name__ == "__main__":
|
|
310
|
+
raise SystemExit(main())
|