wezard 2.9.0 → 3.0.1
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/CLAUDE.md +34 -15
- package/README.md +36 -49
- package/cli/wezard.sh +3 -0
- package/config.example.jsonc +2 -8
- package/dist/cli/init.js +35 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/skills.js +113 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/sync.js.map +1 -1
- package/dist/daemon/apprentice.js +75 -0
- package/dist/daemon/apprentice.js.map +1 -0
- package/dist/daemon/approval.js +26 -7
- package/dist/daemon/approval.js.map +1 -1
- package/dist/daemon/channel-context.js +7 -0
- package/dist/daemon/channel-context.js.map +1 -1
- package/dist/daemon/channel-posts.js +53 -0
- package/dist/daemon/channel-posts.js.map +1 -0
- package/dist/daemon/channel.js +124 -12
- package/dist/daemon/channel.js.map +1 -1
- package/dist/daemon/chat-name.js +24 -161
- package/dist/daemon/chat-name.js.map +1 -1
- package/dist/daemon/classes.js +418 -0
- package/dist/daemon/classes.js.map +1 -0
- package/dist/daemon/config-api.js +1 -1
- package/dist/daemon/detail.js +14 -8
- package/dist/daemon/detail.js.map +1 -1
- package/dist/daemon/handoff.js +51 -50
- package/dist/daemon/handoff.js.map +1 -1
- package/dist/daemon/http.js +25 -18
- package/dist/daemon/http.js.map +1 -1
- package/dist/daemon/idle-reap.js +30 -0
- package/dist/daemon/idle-reap.js.map +1 -0
- package/dist/daemon/inbound.js +360 -142
- package/dist/daemon/inbound.js.map +1 -1
- package/dist/daemon/index.js +2172 -2676
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/last-response.js +44 -9
- package/dist/daemon/last-response.js.map +1 -1
- package/dist/daemon/memory-steward.js +1 -1
- package/dist/daemon/memory-steward.js.map +1 -1
- package/dist/daemon/message-format.js +10 -2
- package/dist/daemon/message-format.js.map +1 -1
- package/dist/daemon/mirror-bridge.js +511 -467
- package/dist/daemon/mirror-bridge.js.map +1 -1
- package/dist/daemon/mirror-store.js +24 -0
- package/dist/daemon/mirror-store.js.map +1 -1
- package/dist/daemon/notices.js +2 -2
- package/dist/daemon/notices.js.map +1 -1
- package/dist/daemon/onboarding.js +384 -0
- package/dist/daemon/onboarding.js.map +1 -0
- package/dist/daemon/outbound.js +21 -11
- package/dist/daemon/outbound.js.map +1 -1
- package/dist/daemon/peers.js +38 -230
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/plans.js.map +1 -1
- package/dist/daemon/room-auto-adhoc.js +18 -0
- package/dist/daemon/room-auto-adhoc.js.map +1 -0
- package/dist/daemon/room-facts.js +35 -0
- package/dist/daemon/room-facts.js.map +1 -0
- package/dist/daemon/room-hub.js +430 -0
- package/dist/daemon/room-hub.js.map +1 -0
- package/dist/daemon/room-overdue.js +98 -0
- package/dist/daemon/room-overdue.js.map +1 -0
- package/dist/daemon/room-prune.js +74 -0
- package/dist/daemon/room-prune.js.map +1 -0
- package/dist/daemon/room-spawn.js +20 -0
- package/dist/daemon/room-spawn.js.map +1 -0
- package/dist/daemon/room-watchdog.js +153 -0
- package/dist/daemon/room-watchdog.js.map +1 -0
- package/dist/daemon/rooms.js +107 -0
- package/dist/daemon/rooms.js.map +1 -0
- package/dist/daemon/route.js +7 -18
- package/dist/daemon/route.js.map +1 -1
- package/dist/daemon/spawn-tmux.js +48 -36
- package/dist/daemon/spawn-tmux.js.map +1 -1
- package/dist/daemon/steward-guard.js +2 -2
- package/dist/daemon/steward.js +132 -0
- package/dist/daemon/steward.js.map +1 -0
- package/dist/daemon/tasks.js +4 -14
- package/dist/daemon/tasks.js.map +1 -1
- package/dist/daemon/turn-opening.js +25 -0
- package/dist/daemon/turn-opening.js.map +1 -0
- package/dist/daemon/wake-tail.js +55 -0
- package/dist/daemon/wake-tail.js.map +1 -0
- package/dist/daemon/weixin-cmd.js +10 -14
- package/dist/daemon/weixin-cmd.js.map +1 -1
- package/dist/daemon/wezard-session.js +6 -2
- package/dist/daemon/wezard-session.js.map +1 -1
- package/dist/daemon/wizard-names.js +0 -22
- package/dist/daemon/wizard-names.js.map +1 -1
- package/dist/daemon/wizard.js +589 -145
- package/dist/daemon/wizard.js.map +1 -1
- package/dist/mcp/output.js +6 -5
- package/dist/mcp/output.js.map +1 -1
- package/dist/mcp/tools.js +247 -242
- package/dist/mcp/tools.js.map +1 -1
- package/dist/shared/allow-rules.js +1 -7
- package/dist/shared/allow-rules.js.map +1 -1
- package/dist/shared/charter-rearm.js +179 -0
- package/dist/shared/charter-rearm.js.map +1 -0
- package/dist/shared/chat-http.js +374 -459
- package/dist/shared/chat-http.js.map +1 -1
- package/dist/shared/chat-record.js +55 -0
- package/dist/shared/chat-record.js.map +1 -0
- package/dist/shared/chat-render.js +7 -4
- package/dist/shared/chat-render.js.map +1 -1
- package/dist/shared/chat-view.js +2 -41
- package/dist/shared/chat-view.js.map +1 -1
- package/dist/shared/cli-backends.js +13 -5
- package/dist/shared/cli-backends.js.map +1 -1
- package/dist/shared/config.js +48 -24
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/detail-render.js +98 -21
- package/dist/shared/detail-render.js.map +1 -1
- package/dist/shared/detail-store.js.map +1 -1
- package/dist/shared/group-members.js +35 -0
- package/dist/shared/group-members.js.map +1 -0
- package/dist/shared/inject-view.js +105 -0
- package/dist/shared/inject-view.js.map +1 -0
- package/dist/shared/legacy-routes.js +199 -0
- package/dist/shared/legacy-routes.js.map +1 -0
- package/dist/shared/mem-guard.js +32 -0
- package/dist/shared/mem-guard.js.map +1 -0
- package/dist/shared/message-footer.js +4 -3
- package/dist/shared/message-footer.js.map +1 -1
- package/dist/shared/pricing.js +5 -0
- package/dist/shared/pricing.js.map +1 -1
- package/dist/shared/reminder.js +30 -38
- package/dist/shared/reminder.js.map +1 -1
- package/dist/shared/role-render.js +209 -210
- package/dist/shared/role-render.js.map +1 -1
- package/dist/shared/role-view.js +61 -299
- package/dist/shared/role-view.js.map +1 -1
- package/dist/shared/room-label.js +13 -0
- package/dist/shared/room-label.js.map +1 -0
- package/dist/shared/room-migrate.js +404 -0
- package/dist/shared/room-migrate.js.map +1 -0
- package/dist/shared/room-overdue.js +81 -0
- package/dist/shared/room-overdue.js.map +1 -0
- package/dist/shared/room-search.js +102 -0
- package/dist/shared/room-search.js.map +1 -0
- package/dist/shared/room-view.js +261 -0
- package/dist/shared/room-view.js.map +1 -0
- package/dist/shared/room.js +610 -0
- package/dist/shared/room.js.map +1 -0
- package/dist/shared/session-hooks.js +20 -8
- package/dist/shared/session-hooks.js.map +1 -1
- package/dist/shared/session-label.js +80 -60
- package/dist/shared/session-label.js.map +1 -1
- package/dist/shared/session-mcp.js +21 -3
- package/dist/shared/session-mcp.js.map +1 -1
- package/dist/shared/session-skills.js +8 -0
- package/dist/shared/session-skills.js.map +1 -1
- package/dist/shared/skill-sync.js +229 -0
- package/dist/shared/skill-sync.js.map +1 -0
- package/dist/shared/smarts.js +39 -0
- package/dist/shared/smarts.js.map +1 -0
- package/dist/shared/stream-page.js +22 -0
- package/dist/shared/stream-page.js.map +1 -0
- package/dist/shared/task-file.js +0 -5
- package/dist/shared/task-file.js.map +1 -1
- package/dist/shared/task-template.js +1 -1
- package/dist/shared/task-template.js.map +1 -1
- package/dist/shared/tool-hints.js +20 -11
- package/dist/shared/tool-hints.js.map +1 -1
- package/dist/shared/workspace-trust.js +8 -0
- package/dist/shared/workspace-trust.js.map +1 -1
- package/dist/shared/world.js +101 -166
- package/dist/shared/world.js.map +1 -1
- package/dist/svr/facts-store.js +26 -0
- package/dist/svr/facts-store.js.map +1 -0
- package/dist/svr/index.js +62 -6
- package/dist/svr/index.js.map +1 -1
- package/hooks/stop.sh +26 -0
- package/package.json +7 -2
- package/scripts/install.sh +11 -0
- package/skills/LICENSE.wecom-unified.txt +21 -0
- package/skills/wecom-unified/SKILL.md +151 -0
- package/skills/wecom-unified/assets/templates/broadside/DESIGN.preset.md +172 -0
- package/skills/wecom-unified/assets/templates/broadside/shell/content.jsx +31 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/02_section.slide +58 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/03_cards.slide +53 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/04_image.slide +64 -0
- package/skills/wecom-unified/assets/templates/cartesian/DESIGN.preset.md +139 -0
- package/skills/wecom-unified/assets/templates/cartesian/shell/content.jsx +28 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/01_cover.slide +44 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/02_compare.slide +79 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/03_table.slide +79 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/DESIGN.preset.md +118 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/shell/content.jsx +24 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/01_cover.slide +61 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/02_structure.slide +85 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/03_data.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/shell/content.jsx +19 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/01_cover.slide +29 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/02_cards.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/03_data.slide +49 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/04_image.slide +46 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/DESIGN.preset.md +119 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/01_cover.slide +36 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/02_section.slide +39 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/03_data.slide +79 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/04_steps.slide +53 -0
- package/skills/wecom-unified/assets/templates/grove/DESIGN.preset.md +159 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content_light.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/slides/01_cover.slide +26 -0
- package/skills/wecom-unified/assets/templates/grove/slides/02_compare.slide +92 -0
- package/skills/wecom-unified/assets/templates/grove/slides/03_table.slide +68 -0
- package/skills/wecom-unified/assets/templates/index.json +280 -0
- package/skills/wecom-unified/assets/templates/long-table/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/long-table/shell/content.jsx +36 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/01_cover.slide +71 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/02_cards.slide +72 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/03_timeline.slide +81 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/04_image.slide +60 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/shell/content.jsx +13 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/01_cover.slide +54 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/02_products.slide +134 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/03_section.slide +30 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/04_schedule.slide +65 -0
- package/skills/wecom-unified/assets/templates/signal/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content_dark.jsx +23 -0
- package/skills/wecom-unified/assets/templates/signal/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/signal/slides/02_cards.slide +67 -0
- package/skills/wecom-unified/assets/templates/signal/slides/03_data.slide +68 -0
- package/skills/wecom-unified/references/wecomcli-calendar-agenda.md +227 -0
- package/skills/wecom-unified/references/wecomcli-calendar-cancel.md +108 -0
- package/skills/wecom-unified/references/wecomcli-calendar-create.md +238 -0
- package/skills/wecom-unified/references/wecomcli-calendar-freebusy.md +207 -0
- package/skills/wecom-unified/references/wecomcli-calendar-meeting-room.md +170 -0
- package/skills/wecom-unified/references/wecomcli-calendar-search.md +209 -0
- package/skills/wecom-unified/references/wecomcli-calendar-update.md +272 -0
- package/skills/wecom-unified/references/wecomcli-calendar.md +296 -0
- package/skills/wecom-unified/references/wecomcli-contact.md +48 -0
- package/skills/wecom-unified/references/wecomcli-disk.md +380 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-append.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-overwrite.md +27 -0
- package/skills/wecom-unified/references/wecomcli-doc-create.md +162 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-members-update.md +24 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-names-update.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-rules-update.md +22 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage.md +127 -0
- package/skills/wecom-unified/references/wecomcli-doc.md +135 -0
- package/skills/wecom-unified/references/wecomcli-email-forward-mail.md +131 -0
- package/skills/wecom-unified/references/wecomcli-email-get-mail.md +187 -0
- package/skills/wecom-unified/references/wecomcli-email-reply-mail.md +138 -0
- package/skills/wecom-unified/references/wecomcli-email-search-mail.md +114 -0
- package/skills/wecom-unified/references/wecomcli-email-security.md +52 -0
- package/skills/wecom-unified/references/wecomcli-email-send-mail.md +186 -0
- package/skills/wecom-unified/references/wecomcli-email-send-schedule.md +83 -0
- package/skills/wecom-unified/references/wecomcli-email.md +206 -0
- package/skills/wecom-unified/references/wecomcli-media.md +89 -0
- package/skills/wecom-unified/references/wecomcli-meeting-cancel.md +113 -0
- package/skills/wecom-unified/references/wecomcli-meeting-create.md +167 -0
- package/skills/wecom-unified/references/wecomcli-meeting-list.md +228 -0
- package/skills/wecom-unified/references/wecomcli-meeting-original-get.md +101 -0
- package/skills/wecom-unified/references/wecomcli-meeting-search.md +176 -0
- package/skills/wecom-unified/references/wecomcli-meeting-update.md +217 -0
- package/skills/wecom-unified/references/wecomcli-meeting.md +366 -0
- package/skills/wecom-unified/references/wecomcli-message.md +190 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-animation.md +62 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-box.md +102 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-chart.md +261 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-codeblock.md +70 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-diagram.md +54 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-faicon.md +71 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-hyperlink.md +55 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-image.md +107 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-math.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-qrcode.md +22 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-slide.md +74 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-svg.md +95 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-table.md +72 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-text.md +96 -0
- package/skills/wecom-unified/references/wecomcli-pptx-content-contract.md +73 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-material.md +67 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-scratch.md +178 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-template.md +123 -0
- package/skills/wecom-unified/references/wecomcli-pptx-design-principle.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-government-contract.md +40 -0
- package/skills/wecom-unified/references/wecomcli-pptx-human-alignment.md +140 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-api.md +161 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-edit.md +37 -0
- package/skills/wecom-unified/references/wecomcli-pptx-story-principle.md +184 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-README.md +165 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-anti-ai-slop.md +52 -0
- package/skills/wecom-unified/references/wecomcli-pptx.md +158 -0
- package/skills/wecom-unified/references/wecomcli-sheet-conditional-formatting.md +203 -0
- package/skills/wecom-unified/references/wecomcli-sheet-filter.md +179 -0
- package/skills/wecom-unified/references/wecomcli-sheet-float-image.md +235 -0
- package/skills/wecom-unified/references/wecomcli-sheet-formulas.md +71 -0
- package/skills/wecom-unified/references/wecomcli-sheet-history.md +118 -0
- package/skills/wecom-unified/references/wecomcli-sheet-protection.md +170 -0
- package/skills/wecom-unified/references/wecomcli-sheet-range-operations.md +306 -0
- package/skills/wecom-unified/references/wecomcli-sheet-read-data.md +151 -0
- package/skills/wecom-unified/references/wecomcli-sheet-search-replace.md +121 -0
- package/skills/wecom-unified/references/wecomcli-sheet-structure-operations.md +394 -0
- package/skills/wecom-unified/references/wecomcli-sheet-style.md +246 -0
- package/skills/wecom-unified/references/wecomcli-sheet-table-style.md +199 -0
- package/skills/wecom-unified/references/wecomcli-sheet-validation.md +217 -0
- package/skills/wecom-unified/references/wecomcli-sheet-visual-standards.md +166 -0
- package/skills/wecom-unified/references/wecomcli-sheet-workbook.md +264 -0
- package/skills/wecom-unified/references/wecomcli-sheet-write-cells.md +320 -0
- package/skills/wecom-unified/references/wecomcli-sheet-xlsx-process.md +324 -0
- package/skills/wecom-unified/references/wecomcli-sheet.md +96 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-data-driven-pages.md +50 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-edit.md +526 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-arraylist.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-datetime.md +283 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-logic.md +247 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-math.md +362 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-operators.md +246 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-pageblock.md +76 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-reference.md +192 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-templates.md +410 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-text.md +377 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-user.md +22 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-mdx-syntax.md +739 -0
- package/skills/wecom-unified/references/wecomcli-smartpage.md +179 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-chart-types.md +95 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-common.md +160 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-edit.md +609 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-field-types.md +438 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-formula.md +845 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-read.md +411 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-record-values.md +218 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ai_efficiency.md +709 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-connect_to_app.md +380 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-financial_accounting.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-hr_and_administration.md +475 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ledger_records.md +156 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-manufacturing.md +395 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-marketing.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-office_essentials.md +299 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-personal_efficiency.md +70 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-procurement_logistics.md +325 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-project_management.md +564 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_customer.md +222 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_ops.md +105 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_project.md +109 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_research.md +92 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-sales_and_operations.md +446 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-store_management.md +431 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-team_tasks.md +274 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-wechat_customer.md +384 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-work_report.md +100 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-templates.md +53 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-view-types.md +373 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook-examples.md +176 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet.md +147 -0
- package/skills/wecom-unified/references/wecomcli-todo-create.md +137 -0
- package/skills/wecom-unified/references/wecomcli-todo-delete.md +63 -0
- package/skills/wecom-unified/references/wecomcli-todo-finish.md +72 -0
- package/skills/wecom-unified/references/wecomcli-todo-get.md +69 -0
- package/skills/wecom-unified/references/wecomcli-todo-list.md +136 -0
- package/skills/wecom-unified/references/wecomcli-todo-update.md +112 -0
- package/skills/wecom-unified/references/wecomcli-todo.md +68 -0
- package/skills/wecom-unified/scripts/build_docx.py +1274 -0
- package/skills/wecom-unified/scripts/build_page.py +2449 -0
- package/skills/wecom-unified/scripts/collect.py +868 -0
- package/skills/wecom-unified/scripts/doc_image_extractor.py +498 -0
- package/skills/wecom-unified/scripts/pptx2image.py +268 -0
- package/skills/wecom-unified/scripts/recalc.py +403 -0
- package/systemd/wezard.service.template +6 -0
- package/web/chat.css +70 -273
- package/web/chat.js +2228 -2190
- package/dist/daemon/chat-log.js +0 -130
- package/dist/daemon/chat-log.js.map +0 -1
- package/dist/daemon/dispatch.js +0 -6
- package/dist/daemon/dispatch.js.map +0 -1
- package/dist/daemon/idle-nudge.js +0 -90
- package/dist/daemon/idle-nudge.js.map +0 -1
- package/dist/daemon/message-events.js +0 -1155
- package/dist/daemon/message-events.js.map +0 -1
- package/dist/daemon/pending-items.js +0 -160
- package/dist/daemon/pending-items.js.map +0 -1
- package/dist/daemon/router.js +0 -742
- package/dist/daemon/router.js.map +0 -1
- package/dist/daemon/tips.js +0 -25
- package/dist/daemon/tips.js.map +0 -1
- package/dist/daemon/wedoc.js +0 -210
- package/dist/daemon/wedoc.js.map +0 -1
- package/dist/shared/role-search.js +0 -100
- package/dist/shared/role-search.js.map +0 -1
- package/dist/shared/startup-notice.js +0 -21
- package/dist/shared/startup-notice.js.map +0 -1
- package/dist/shared/turn-state.js +0 -27
- package/dist/shared/turn-state.js.map +0 -1
package/CLAUDE.md
CHANGED
|
@@ -6,8 +6,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
6
6
|
|
|
7
7
|
`wezard` (CLI `wezard`) bridges agent CLIs (Claude Code / claude-internal / CodeBuddy) and WeCom (企业微信) smart bots:
|
|
8
8
|
- **PreToolUse approval forwarding**: every tool call is gated by a button card pushed to WeCom; clicking ✅/❌/⏱ resolves the long-poll the hook is parked on.
|
|
9
|
-
- **Remote control**: messages sent to the bot drive a local agent CLI — the daemon spawns an interactive session in tmux and mirrors it to the chat. Sessions are opened from the chat side
|
|
10
|
-
- **MCP server** (`wezard`): the wizard's whole tool surface
|
|
9
|
+
- **Remote control**: messages sent to the bot drive a local agent CLI — the daemon spawns an interactive session in tmux and mirrors it to the chat. Sessions are opened from the chat side (first inbound, `/new`, `.name`, `switch_claude_session`) or by a wizard (`spawn_wizard` / `clone_wizard` / `delegate`).
|
|
10
|
+
- **MCP server** (`wezard`): the wizard's whole tool surface, each tool one thin POST to the resident daemon over loopback HTTP — rooms (`chat_ask` / `chat_reply` / `chat_say` / `room_*`: the only way wizards talk), delegation (`delegate`, `route_candidates`), spawn / clone / stop (`spawn_wizard`, `clone_wizard`, `stop_wizard`), awareness (`wizard_roster`, `peek_peer`, `pending_items`, `wizard_whoami`), identity and memory (`wizard_identity`, `wizard_remember`), owner-managed plans (`plan_*`), schedules (`schedule_task` / `list_tasks` / `cancel_task`), `handoff`, workspace/model switching, `notify` / `send_file`, config (`config_get` / `config_set`). Human-facing outbound cards (approval / AskUserQuestion) are pushed by the daemon itself, not through MCP.
|
|
11
11
|
|
|
12
12
|
## Build / run
|
|
13
13
|
|
|
@@ -29,6 +29,25 @@ npm run build && ./cli/wezard.sh reload # rebuild, then bounce the resident d
|
|
|
29
29
|
|
|
30
30
|
When the user says **"reload"** in this repo, it means exactly: `npm run build && ./cli/wezard.sh reload`. The global `wezard` binary may not be on `$PATH` in dev shells — always invoke `./cli/wezard.sh` from the repo root. After a development unit, build once, reload the daemon, then restart the existing svr service with `launchctl kickstart -k "gui/$(id -u)/com.wezard.svr"` on macOS or `systemctl --user restart wezard-svr.service` on Linux. Operational-only requests keep their requested scope; daemon reload does not restart svr.
|
|
31
31
|
|
|
32
|
+
### 前端验证: 怎么截图
|
|
33
|
+
|
|
34
|
+
改了 `web/chat.js` / `web/chat.css` / rolepage 渲染后, 别只看代码: 截一张图亲眼看。
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
node scripts/shot.mjs --role <名字|chat:wr…> # 桌面 1440×900 → ~/.wezard/shots/*.png, 末行打印路径
|
|
38
|
+
node scripts/shot.mjs --role <…> --mobile # 窄屏 390×844 (窄屏左栏要先 --click 'button.back')
|
|
39
|
+
node scripts/shot.mjs --role <…> --click 'button.vt[data-side="graph"]' --wait 4000 # 关系图
|
|
40
|
+
node scripts/shot.mjs --role <…> --click 'text=A ↔ B' # 点进某个 room (--selector 只截元素, --full 整页)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- 要先 `npm run build && ./cli/wezard.sh reload`: 它截的是**正在跑的**守护进程。票据现从 `<stateDir>/details.jsonl` 取, 不用自己找, 也别把带 `?id=` 的 URL 贴进日志或仓库。
|
|
44
|
+
- 截完用 `Read` 看图, 要给人看就 `send_file` 发进群。
|
|
45
|
+
- 首次 (或换机器) 先 `sh scripts/shot-setup.sh`: 不用 sudo, 装 chromium-headless-shell + 缺的系统库 + 中文/emoji 字体到用户目录 (~310MB 盘)。`NODE_ENV=production` 的机器要 `npm install --include=dev` (playwright 是 devDependency)。
|
|
46
|
+
- **内存**: 本机 3.7GB, 一次截图峰值 ~300MB; 脚本带单实例锁, 并发只许 1 个, 别在多个分身里同时截。用完即关, 无常驻进程。
|
|
47
|
+
- `tests/room-graph.dom.mjs` 现在能起浏览器跑了 (目前还有一处 fixture 缩放断言过期, 见 CHANGELOG): `LD_LIBRARY_PATH=$HOME/.cache/wezard-shot-libs/root/usr/lib/x86_64-linux-gnu node tests/room-graph.dom.mjs`。
|
|
48
|
+
|
|
49
|
+
改动清单 (加 MCP 工具 / room 行类型 / reminder kind 各要动哪几处, 含 vm 沙箱测试的坑): [docs/dev-guide.md](docs/dev-guide.md)。
|
|
50
|
+
|
|
32
51
|
## Release / changelog
|
|
33
52
|
|
|
34
53
|
Every version bump **must** update `CHANGELOG.md` — no release without a changelog entry. Follow [Keep a Changelog](https://keepachangelog.com/) + [SemVer](https://semver.org/):
|
|
@@ -53,25 +72,25 @@ Three processes, all coordinating via 127.0.0.1:17890 and `~/.wezard/`:
|
|
|
53
72
|
- `ws.ts` owns the `@wecom/aibot-node-sdk` `WSClient`. Fatal auth/reconnect → `process.exit(1)` (launchd respawns).
|
|
54
73
|
- `approval.ts` builds the button card, parks an HTTP request via `pending.ts`, and resolves it on `event.template_card_event`. Three click outcomes: `allow` / `allow_window` (auto-allow N min for that session) / `deny`. `session-cache.ts` short-circuits repeats.
|
|
55
74
|
- `inbound.ts` routes `message.text` / `message.image` / `message.mixed` → `mirror-bridge.ts`. Gates on `allowFrom`; one-shot exception is the bootstrap claim (see below).
|
|
56
|
-
- `mirror-bridge.ts` tails `<projectsDir>/<encoded(cwd)>/<sid>.jsonl` and
|
|
75
|
+
- `mirror-bridge.ts` tails `<projectsDir>/<encoded(cwd)>/<sid>.jsonl` and records every turn into the turn store (the rolepage's "how it was done"). **It delivers a turn's final text to no one** (`concludeBriefTurn`: final lines have zero routing semantics): a wizard speaks into a chat only through room tools (`chat_say` / `chat_reply` / `notify`), which the room hub mirrors out. What mirror still pushes to the chat itself: approval/askq cards, `[mirror]` notices, and the placeholder "brief" bubble opened when a human line arrives (the first `re`ing reply covers it; `hardTimer` closes it before WeCom's ~6 min stream window). Inbound injection is either `claude --resume <sid> -p` (writes a turn into the same jsonl) or `tmux paste-buffer` against a live TTY (only path that makes WeCom messages visible in the user's CLI window). `recentInjects` ring buffer suppresses the WeCom→CLI echo when tailing (which is why an injected line's text is stamped as the turn's `userQuery` at inject time — the tail never sees it). **Every turn has a channel** (`TurnDetailRecord.channel`): the chat it was spoken in (`""` = a private wizard↔wizard turn); the rolepage files the turn by it, and follow-up injections that serve the turn (approval resumes, handoff carry) inherit it.
|
|
57
76
|
- `claim.ts` is a single-shot bootstrap: an exact-match magic phrase from any sender bypasses `allowFrom`, writes that principal as `defaultChat`, and appends to `allowFrom`. This is the **only** legitimate ingress for first-time setup.
|
|
58
|
-
- `peers.ts` is the read side of multi-agent awareness — "who else is working in this chat, and are they busy". A wizard's HOME chat is its target key's base principal (`baseOfKey`): the untagged default plus every slot `chat:xxx#slot`. Pure parsing only — bounded transcript-tail reads (`
|
|
59
|
-
- `wizard.ts` is the identity layer over those sessions: a target key plus a **globally unique name** — the wizard's only address, written `.name` everywhere a human or model sees it (a chat's default session takes the chat's name, a slot takes its slot id; collisions get `-N` via `pickName`; `settleName` claims lazily, `settleAll` initializes unnamed current identities at boot, default sessions first). The slot id inside the key is NOT the name: a rename never rekeys a session. Plus a one-line responsibility, a long-term `memory` list, and a `parent` link for management ownership. Every collaborative spawn/clone belongs to its caller, including cross-cwd/chat creation and cloning context from another wizard; `forkOf` records a different context source. Horizontal communication does not change parent ownership. Ending an identity is limited to itself or its direct parent; active/paused plans prevent logical retirement, and children must be handled before their parent can be forgotten. Completed work retains wizard identities by default; pane resource eviction keeps identity and binding. The registry is a write-through json (`~/.wezard/wizards.json`, `wrc.mirror.wizardsFile`) bound process-wide via `bindWizardStore` so the IM side can read it too; everything else in the module is a pure renderer. **Identity travels as the first message's preamble, not the system prompt**: `renderCharter` builds the wizard's charter (who it is, its workspace, its clones, its memory, the chat's and the workspace's shared memory (`wizard-memory.ts`: `~/.wezard/memory/{chats,workspaces}/*.md`, human-editable, appended by `wizard_remember({scope})`), the tool roster, the orchestration playbook,
|
|
77
|
+
- `peers.ts` is the read side of multi-agent awareness — "who else is working in this chat, and are they busy". A wizard's HOME chat is its target key's base principal (`baseOfKey`): the untagged default plus every slot `chat:xxx#slot`. Pure parsing only — bounded transcript-tail reads (`talkTurns` / `lastAssistantText` / `summarizeTail`, the last shared with `session-scan.ts`) and pane classification (`paneIsBusy`). **What a wizard reads about another comes from the transcript, never from a pane capture**: text turns only (`talkTurns`), and "where is it stuck" is `openToolUses` (a tool call left hanging on an idle session = parked on an approval card). The pane is consulted for exactly one thing, `busy`. Read-side tools (`wizard_roster` / `peek_peer` / `room_read`) answer in plain text rendered daemon-side, not json; `room_read` renders a room's ledger (`shared/room-view.ts`), not a transcript. Which channel a line belongs to and who said it is read back from the room wake header + trigger line (`shared/inject-view.ts`), or — for scheduled tasks and old transcripts — from the envelope riding on that user line (`parseEnvelope`, `shared/reminder.ts`): every wezard `<system-reminder>` carries its facts as opening-tag attributes (`wezard=` one of the `REMINDER_KINDS` — `envelope|message-event|hint|lead|mention|roster|charter`, plus `after|pending|chatlog` which are registered but have no production writer today; `kind` / `from` / `scope`, `chat-key` on the scheduled-task envelope, the injection event id as `msg`; the old human/peer envelopes' `chat` / `chat-key` / `asker-*` / `receipt` attrs are read-only legacy) and its prose only for the model; which attrs each kind may write is the `REMINDER_KINDS` registry (each attr is either read back by code or an id the model copies into `re`/`for`/`drop`), and `renderTail` lays one injection's tail out in a fixed order, envelope first — rewording the prose never breaks parsing; only the current attribute envelope is parsed, without inferring facts from older prose. The rolepage collapses each reminder into a tag named by its kind (`<envelope · .x>`, `<回执 · .x · need>`, `<roster>` …) that expands to raw on click; **the human envelope is gone** — an envelope now rides only on scheduled-task injections (and the memory steward's), and a room wake carries no `wezard=envelope` at all (who spoke = the ledger row's author, which chat = the room in the wake header; a human line is an author that is neither `.name` nor `wezard`). The reminder tails a human line used to drag into the ledger row (steward hint, mention hint, notice/roster) are no longer part of the row: a human row stores only the human's words, and `daemon/wake-tail.ts` `humanWakeTail` computes the hint + mention tail (and the turn's channel/speaker for the live seal) at wake time from the triggering human rows, handed through `room-hub` `tailOf` → `injectText({tail})` to `noticeSuffixFor` (so they are rendered only after the pane gate lets the paste through, and notice/mention dedup is recorded at that point — a paste that fails or is uncertain after the gate has used this round's hint up, same as roster increments); old rows that still carry a tail are read through `rowText` (`shared/room.ts`, strips trailing wezard blocks on `origin:"inbound"` rows) without rewriting them. After a reload, `openingOf` recovers a human turn's channel/speaker from the wake header and trigger line (`shared/inject-view.ts` `humanOpening`; bound room → channel = the chat, `dm:`/`adhoc:` → private `""`), and still reads old human envelopes from old transcripts. `room-hub.ts` `render` lays out a `【label】(roomId)` header plus one `renderMsgLine` row per message, and the rolepage reads the room back from that header (`shared/role-render.ts` `blocks` / `injRoom`, via `parseInjection`); the `peer` kind in `parseEnvelope` exists only to read old transcripts. A clone's transcript starts with its parent's forked history, so its rounds older than `bornAt` are dropped. Identity (name / responsibility / memory / lineage) lives in `wizard.ts`, not here. **Busy detection matches the TUI spinner footer** (`… (12m 31s · …)` on current versions, `esc to interrupt` on older ones) in the last 8 non-blank rows — transcript mtime is useless here, it goes quiet during long tool calls.
|
|
78
|
+
- `wizard.ts` is the identity layer over those sessions: a target key plus a **globally unique name** — the wizard's only address, written `.name` everywhere a human or model sees it (a chat's default session takes the chat's name, a slot takes its slot id; collisions get `-N` via `pickName`; `settleName` claims lazily, `settleAll` initializes unnamed current identities at boot, default sessions first). The slot id inside the key is NOT the name: a rename never rekeys a session. Plus a one-line responsibility, a long-term `memory` list, and a `parent` link for management ownership. Every collaborative spawn/clone belongs to its caller, including cross-cwd/chat creation and cloning context from another wizard; `forkOf` records a different context source. Horizontal communication does not change parent ownership. Ending an identity is limited to itself or its direct parent; active/paused plans prevent logical retirement, and children must be handled before their parent can be forgotten. Completed work retains wizard identities by default; pane resource eviction keeps identity and binding. The registry is a write-through json (`~/.wezard/wizards.json`, `wrc.mirror.wizardsFile`) bound process-wide via `bindWizardStore` so the IM side can read it too; everything else in the module is a pure renderer. **Identity travels as the first message's preamble, not the system prompt**: `renderCharter` builds the wizard's charter (who it is, its workspace, its clones, its memory, the chat's and the workspace's shared memory (`wizard-memory.ts`: `~/.wezard/memory/{chats,workspaces}/*.md`, human-editable, appended by `wizard_remember({scope})`), the tool roster, the orchestration playbook, how to talk through rooms). `spawn-tmux` only parks it at `charters/<sid>.md` (claude/codebuddy no longer get `--append-system-prompt` — it cost ~1.4s per cold start); the attachment's `charterPending` prepends it as `<system-reminder wezard="charter">` to the pane's first non-slash injection and clears it once that injection is confirmed. It is re-armed on every moment a session has not read it: `/new`, a spare-pool claim, a dead-pane `--resume` respawn (only when the transcript has no charter block since the last `compact_boundary`: `charterInContext`; already owed / unreadable transcript still arm), `/clear` and compaction (`onContextCut` → `armCharter`); a clone's opening line carries the child's charter, superseding the parent's inherited one. Read sides (`stripMeta`, `cleanUserText`, rolepage) strip/collapse the `charter` reminder, so it never becomes a chat ask or a bubble. Codex keeps it in `developer_instructions`. Every spawn path (`/new`, a dead-pane respawn, a clone) pulls it from `MirrorBridge.setCharterProvider`, installed in `index.ts`. Since a running wizard never sees a new charter, `config_set` renders every chartered wizard's charter before and after the change and tells the affected ones (and the caller) to `handoff` — generic over whatever config the charter reads. Backends with no such flag spawn without a charter rather than with a rejected flag.
|
|
60
79
|
- **Cloning is a context fork**: `MirrorBridge.cloneSession` spawns `--resume <parent sid> --fork-session`, so the child starts holding everything the parent had read while the parent is untouched — that is what makes "load the shared material once, then fan out" work. Two invariants: `--fork-session` is mandatory (without it a second pane appends to the parent's jsonl and two chats cross-wire), and the attach waits for the forked transcript (codebuddy 2.167 writes it at process start — a byte copy of the parent plus a `session-meta` row, no API call; older CLIs only on the first message); if it never appears the pane is killed rather than bound to the parent's sid.
|
|
61
|
-
- **
|
|
62
|
-
-
|
|
63
|
-
- `daemon/
|
|
64
|
-
- `
|
|
80
|
+
- **Rooms are the only thing wizards talk through** (`shared/room.ts` pure core — row types, fold, `judge`, wake rules, ids; `daemon/rooms.ts` store; `daemon/room-hub.ts` the only append door + wake pump; contract in `docs/room/contract.md`). A WeCom group / DM / channel post is a *bound* room (id = the base principal verbatim); two wizards' conversation is an unbound `dm:<uidA>|<uidB>` room (stable instance uids, never names); 3+ is an `adhoc:<hex>` room opened with `room_open`. A room is one append-only, fsync-per-append jsonl under `<stateDir>/rooms/` (`roomsDirOf` is the single derivation — never `join(…, "rooms")` locally); state is a fold of the rows, a torn tail line is dropped, a corrupt middle line makes that room fail closed (503). Humans (inbound) and wizards (tools) append through the same `judge` (membership, who may write a `status`, dedup, wake targets, budget); a rejected line never becomes a row. **Completion, origin and the right to speak are explicit fields on ledger rows, never inferred from a transcript or a final line**: `chat_ask` opens a *duty* on its `to`; only that holder's `chat_reply` with status `done` / `passed` / `canceled` closes it (`need` / `progress` / `error` don't); `chat_say` / `notify` open nothing. `wakeTargets`: the named, the asker of a `re`, the host for an unaddressed human line in a bound room, and `room_watch` subscribers on human lines / closing replies; host = the earliest-joined wizard member, evaluated on read. A bound room mirrors every `msg` row to WeCom except `origin` inbound/migrate and `trigger` rows (`mirrors()`); dm/adhoc rows live only on the rolepage.
|
|
81
|
+
- **The wake pump keeps no queue** (`room-hub.ts`): who is owed what, and what to show them, is recomputed from the ledger every pass — a row with `wake∋uid` past the member's `seen` cursor is pending. The `seen` row is written only after a confirmed paste; an uncertain paste leaves the cursor and re-delivers the same batch marked "maybe already read", so a reload loses nothing. A target with no session at all (`gone`: its binding was dropped by `stop_wizard` end / `/kill`) is not woken by retrying: each duty it holds in the batch gets one `undelivered` system row to its asker (cursor untouched, so a same-name respawn still reads them); other failures log one warn per state change. A busy live pane waits for its turn to end; `interrupt:true` (direct parent / host / human only, budgeted per room) presses Esc first; a cold wizard is not "busy" — pasting respawns it. A wizard that ends a turn still owing a duty gets one reminder (in-turn via the Stop hook `hooks/stop.sh` for backends that honor `decision:block`, else at turn end), then a system row to the asker. `room-watchdog.ts` writes `canceled` for the duties of a wizard whose pane is truly gone (two confirming scans, never on a failed tmux call). `after` on a `chat_ask` defers the wake until the listed duties are `done`. **Overdue** (`shared/room-overdue.ts` pure, `daemon/room-overdue.ts` scan on the watchdog cadence): an open ask/task/human duty held by a wizard and idle (no non-daemon row touching it) for `rooms.overdue.remindMin` (60) gets a `trigger` row `sys:"overdue-remind"` that wakes the holder; at `groupMin` (120) a non-waking `sys:"overdue-group"` system row lands in the room, and — if the room is unbound — in the holder's (else asker's) home group so a human sees it. A child the holder dispatched also counts as activity: a task/ask row's `for` is its lineage (the msg id of the duty it was dispatched for — defaulted by the daemon, `hub.defaultFor`, to the single duty that woke the caller this turn when `for` is omitted; zero or several → left empty), so the child's own row, any non-daemon row answering it (its `done` closes included) and its descendants' (cross-room, depth ≤ 5) restart the parent's clock. Both hot, 0 = off, ledger-deduped, never auto-`canceled`.
|
|
82
|
+
- **`delegate` / `route_candidates`** (`daemon/route.ts`, the deterministic half of dispatch): candidates are filtered and ordered by evidence (files it read > responsibility > recent asks; same workspace only breaks ties), each with its cost line (cache cold / ctx size → what waking it costs vs. a white-board spawn); `decide` takes the first candidate no veto rejects (weak evidence, busy, not worth it, cold cache with big ctx — `force` crosses only the last) or spawns a white-board wizard at `tierFor`. The product of `delegate` is one `chat_ask`; the caller may override (`to`, `spawn`, `force`, `tier`, `lead`). `lead` is per job: `WizardRecord.leadOf` records the task rows that made it a lead, and the daemon clears `lead` once all of them are closed and it owns no unfinished plan (`leadSettled`, run after every closing row via the hub's `onClosed`, after plan updates, and at boot — where legacy leads without `leadOf` are cleared if no peer-opened duty is still open). In-flight work is the room ledger's open duties (`openDuties` / `dutyFacts` in `shared/room-view.ts`); the old `TurnState` / `WorldFacts.inflight` vocabulary is gone.
|
|
83
|
+
- **Steward hand-brake** (`approval.ts` / `steward-guard.ts`): triggered by role (`isStewardTarget`: the chat's bound steward, else its default session), ahead of every approval path — it may not edit files or open subagents, and caps its own look-commands per turn at `chatPolicy.<chat>.stewardBudget` (reading code — Read/Grep/Glob and read-only shell commands — passes free; the deny reason points at `delegate`). A new group's onboarding guide has no tool surface at all (`onboarding.ts` `guideRefusal`) except `chat_reply` / `chat_say` / `onboard_bind`.
|
|
65
84
|
- **Teams plans** (`shared/plan.ts`, `daemon/plans.ts`, `daemon/plan-http.ts`, `daemon/plan-reminders.ts`): each wizard may own multiple mutable DAG plans. `plan_create/get/list/update` expose explicit owner-managed state; only the owner writes, and `revision` is a compare-and-swap guard. Replacing `tasks` replaces the whole DAG. The store validates dependencies, task/plan states and terminal plans, uses owner-scoped `requestId` creation idempotency, and fsyncs an append-only `wrc.mirror.plansFile` journal (`~/.wezard/plans.jsonl` by default) before publishing changes in memory. Corrupt history or failed IO makes plan operations and retirement checks fail closed with 503 while receiver messaging remains available. The daemon never assigns executors, dispatches ready nodes, accepts plan task completion or advances plan state automatically; the owner thinks, delegates, reviews and updates explicitly. Clear, low-risk coding goes to light; independent reviewers start blank and use a tier appropriate to the review risk.
|
|
66
|
-
- **Plan association and reminders**:
|
|
85
|
+
- **Plan association and reminders**: `chat_ask` / `delegate` take an optional `planId`, stored on the duty row as a record only — the daemon never advances the DAG. A plan's reminder is suppressed while its owner still holds **or has dispatched (as asker)** an open duty with that `planId` (`planHasOutstandingDebt` → `planHasOpenDuty` in `shared/room-view.ts` reads the ledger); active plans are reminded only while the owner is idle and not handing off, paused plans stop reminding. A reminder is a `trigger` row (not mirrored, wakes only the owner), deduped by the persisted plan/revision/token marker, which does not bump `revision`; enqueue revalidates plan state / revision / token / debt / idle / handoff right before delivery.
|
|
67
86
|
- `notices.ts` is the other half of awareness. A charter's roster is a spawn-time snapshot and only gets staler; a variation (a birth, a `stop_wizard`, a changed job description, a chat getting named) posts one line into each affected wizard's in-memory box, and the next text injected into that pane — from a human, a peer or a scheduled task — carries it along as a `<system-reminder>`. No extra turn, no bubble, no transcript. Delivery clears the box: a notice is a hint, the truth is always `wizard_roster`.
|
|
68
87
|
- `chat-name.ts` turns a chat's unreadable `chat:wr…` id into a readable name (which its default wizard inherits), and auto-fills one from the workspace basename when nobody named it. The fill happens wherever a name is about to be handed to a model — including `renderCharter`, since a system prompt outlives the process that read it. Fill-only; a human-chosen name is never overwritten.
|
|
69
88
|
- `tasks.ts` fires a scheduled prompt into a target wizard's session — exactly equivalent to someone saying it in the chat at that moment. Lives in the daemon, not in a session, so a CLI restart / `/clear` / session end can't carry it away. It runs one fixed skeleton per shot — `trigger → gate → render → dispatch` — and nothing else: the *specifics* of each stage live in the task's own file, because a schedule is "run this logic at this time" and logic does not fit in json.
|
|
70
89
|
- A task is `~/.wezard/tasks/<id>.task.mjs`, an ES module exporting `when` / `gate` / `prompt` / `target`+`fresh` / `owner` (the wizard that scheduled it — its rolepage shows the task under 日程) — **the config is source the wizard edits directly** (hot-reloaded by mtime; a file that fails to load keeps its previous version running and surfaces the reason in `list_tasks`). Source stays source: `lastFired` and the gate's cross-round memo live in `~/.wezard/task-state.json`, so the daemon never writes back over a file a wizard just edited.
|
|
71
90
|
- `shared/trigger.ts` is the trigger AST (Specification + Interpreter). **Clock vs Guard is the whole point**: `every`/`daily`/`at` produce instants and answer "when next", `between`/`onDays`/`not` only veto. `and(clock, …guards)` is their intersection — that's what makes "白天每小时" expressible, and why `nextFire` enumerates clock candidates and picks the first one every guard passes. An AST, not a closure, because it must be renderable (`每 1 小时 · 08:00-21:00`), storable and drawable. `shared/schedule-spec.ts` under it is pure lexer (weekday / time-of-day / interval / window) — it grows with how people speak, the AST grows with how things are computed.
|
|
72
91
|
- `gate` (`task-gate.ts`) runs **in a child process with a timeout**: it is user/wizard-written code that shells out, and a wedged gate must not stall every other schedule — timeout, throw and crash are all the same verdict, *hold fire this round*. Returning `false` costs nothing and says nothing; that is how "only if there's work" stops spending a pane per empty round. A gate **error** posts one bubble (only on the good→bad transition) — a broken gate's silence is indistinguishable from "nothing to do today".
|
|
73
|
-
- **rolepage** (`shared/
|
|
74
|
-
- **Retired
|
|
92
|
+
- **rolepage** (`shared/chat-http.ts` routes, shared verbatim by the daemon and the standalone svr; `shared/room-view.ts` ledger read model, `shared/role-view.ts` / `role-render.ts` turn folding; frontend `web/chat.js`): `GET /role?id=<ticket>&role=<name|target|human:x>` is the SPA shell; data comes from `/api/world` (rooms + wizard/human nodes + genealogy + plans/schedules), `/api/room` (snapshot + history paging), `/api/wizard` (card + "its own + addressed to it" / all messages), `/api/turn` + `/api/tool` (a message's process box; tool bodies fetched on expand), `/api/charter`, `/api/search`. Two sources, neither replaces the other: the room ledger is *what was said* (author / completion / speak-right on the row), the turn store is *how it was done* (tool calls, CLI text, usage). A wizard page is turn-led — a turn folds into an in-message (the asker) and an out-message (the reply) — with ledger rows hung on the turn that produced them. `?id=` is an unguessable record id acting as the capability: any valid ticket may view every role. The standalone svr receives `WorldFacts` (`plans`, `rooms`, `names`, …) by POST; without a room reader it degrades to graph + members. The plan/schedule view is read-only; active/paused plan owners and their registered management ancestors stay visible. The sidebar and relationship cards share one conversation/window/unread implementation.
|
|
93
|
+
- **Retired** (no compatibility fallback): jobs, workflow runners and the graph executor with their MCP/HTTP entry points and `jobsFile`/`receiptsFile` configuration; the `daemon/router.ts` route ledger, receipts and `tell_peer` / `wait_peer` / `read_chat` / `send_peer` / `dispatch`; the `topOnly` / `speech` chat policy and public→private demotion (noise control is structural now: open a follow-up room, or pull people into the main one); `chatOriginOnly` / `slashAckFirstLine`. Old data is only read by the one-shot migration (`shared/room-migrate.ts`, `shared/legacy-routes.ts`, `cli/migrate-rooms.ts`). Generic idle waiting lives in `daemon/wait-idle.ts`.
|
|
75
94
|
|
|
76
95
|
**Configuration** (`shared/config.ts`):
|
|
77
96
|
- Loaded by every binary via `loadConfig()`. Resolution order: explicit arg → `$WEZARD_CONFIG` → `~/.wezard/config.jsonc` → `~/.wezard/config.json`.
|
|
@@ -87,10 +106,10 @@ Three processes, all coordinating via 127.0.0.1:17890 and `~/.wezard/`:
|
|
|
87
106
|
|
|
88
107
|
**Hook + sync**:
|
|
89
108
|
- **审批 hook 按会话注入, 不注册到全机**: `shared/session-hooks.ts` 写出 `<stateDir>/session-hooks.json` 和一个只带 hooks 的最小插件目录; spawn 时按其后端加 `--settings <file>` (claude / codebuddy) 或 `--plugin-dir <dir>` (claude-internal 1.x 没有 `--settings`)。同一个 pane 的启动行还带 `WEZARD_MANAGED=1` 与 daemon 地址 —— 它们原先由 sync 写进全机 settings 的 env, 现在只存在于 wezard 自己的进程里。codex 用 `shared/codex-hooks.ts` 的 `-c` 覆盖, 同理。
|
|
90
|
-
- **MCP 也按会话注入**: `shared/session-mcp.ts` 写出 `<stateDir>/session-mcp.json` (
|
|
109
|
+
- **MCP 也按会话注入**: `shared/session-mcp.ts` 写出 `<stateDir>/session-mcp.json` (缺省传输 `daemon.mcpTransport:"http"` 时另写一份 `session-mcp-http.json`, 认 `type:"http"` 的 claude / claude-internal / codebuddy 用它, 名单外与 codex 回落 stdio), spawn 的启动行加 `--mcp-config <file>` (claude / claude-internal / codebuddy 都认, **不加 `--strict-mcp-config`** 否则会连用户自己的 MCP 一起挡掉)。`.claude-plugin/plugin.json` 不再声明 `mcpServers`, 仓库里也没有 `hooks/hooks.json` — 插件只提供 `commands/*`。
|
|
91
110
|
- `cli/sync.ts` 现在**只做清理**: 把老版本写进 `config.sync.targets` 各处的 wezard hook 条目 / `WEZARD_*` env / `mcpServers.wezard` (`~/.codebuddy/mcp.json` 与 `~/.claude-internal/settings.json` 两处) 删掉, 空壳对象一并删 — 重跑幂等, `--remove` 之后机器上不留 wezard 的任何注册。`~/.wezard/sync.lock.json` 只记录还剩哪些目标。 As a safety net the entry points (`hooks/pre-tool-use.sh`, `cli/codex-hook.ts`) still open with an ownership gate — only a CLI process wezard spawned carries `WEZARD_MANAGED=1` (launch line / headless inject env); anything else exits 0 with no output and stays on the CLI's own permission flow, never `allow`, never `ask`. Panes that predate the injection are covered by the `@wezard_managed` pane option the daemon stamps on every binding it attaches (one local `tmux show-options` in the hook, no daemon call). `~/.wezard/state/approval-mode` is the runtime override on top of that registration (`wezard use cli|wecom`): the file holds `cli` (absent = `wecom`), the hook reads it with a bare `cat` **before** it touches jq or the daemon and then exits 0 with no output — the CLI's own permission flow answers — while `daemon/approval.ts`, the picker sentinel and `cli/codex-hook.ts` treat the same file as "no cards, no auto-press". **A hook that cannot reach the daemon answers nothing, never `allow`**: silent auto-allow would hand a pane every permission while the human still believes approval is on. It waits only when the service is still registered (`launchctl print` / systemd `LoadState`), so `wezard stop` degrades to local CLI immediately instead of burning the 60s resume budget.
|
|
92
111
|
|
|
93
|
-
**MCP server** (`mcp/server.ts`
|
|
112
|
+
**MCP server** (`mcp/tools.ts` is the tool surface; `mcp/server.ts` is the stdio entry — its dist path is load-bearing, every pane config runs `node dist/mcp/server.js`; `daemon/mcp-http.ts` is the daemon's own stateless StreamableHTTP endpoint, the default transport, `daemon.mcpTransport`): stateless w.r.t. WeCom, every tool just `POST`s to the daemon. Add a tool in `mcp/tools.ts` AND a route handler in `daemon/`. Rarely used tools (`list_claude_sessions` / `switch_claude_session` / `list_chats`) register only with `WEZARD_MCP_EXTRA=1` — every registered tool costs model context. Collaboration tools (`wizard_whoami` / `wizard_identity` / `wizard_roster` / `spawn_wizard` / `clone_wizard` / `stop_wizard` / `wizard_remember` / `handoff` / `set_model` / `delegate` / `peek_peer`, the `chat_*` / `room_*` family, `plan_create/get/list/update`) resolve the caller through `selfRef()` = `{sessionId, tmuxPane}` (stdio: env; http: per-request `mcpIdentity`) — `daemonPost` attaches it to every POST, `daemonGet` does not so the daemon can resolve *which* session is asking — env sessionId goes stale after a `/clear`, pane id doesn't. Discovery is layered: the charter (`renderCharter`) carries one "when to use" line per tool and is the only part guaranteed in context — Claude Code defers MCP tool schemas behind ToolSearch — while each tool description carries the mechanism and parameters. Keep the two from restating each other. Address parameters are `name` / `names` (`fix` / `.fix`); retired `tag` / `tags` parameters and the `send_peer`, `tell_peer`, `wait_peer`, `read_chat`, `dispatch`, and `wizard_handoff_self` tools are removed. Internal target keys remain current identities, not compatibility addresses.
|
|
94
113
|
|
|
95
114
|
## Important patterns / pitfalls
|
|
96
115
|
|
|
@@ -109,7 +128,7 @@ Three processes, all coordinating via 127.0.0.1:17890 and `~/.wezard/`:
|
|
|
109
128
|
- Functional first: `map`/`filter`/`reduce`, deep-merge by recursion, immutable transforms; side effects pushed to module boundaries (file IO in `shared/`, child_process in bridges, network in `ws.ts` / `http.ts`).
|
|
110
129
|
- One function = one sentence. Helpers like `extractText`, `renderInput`, `decodeKey` are pure and testable in isolation; the IO-bearing functions wire them together.
|
|
111
130
|
- Comments in source files lean toward "why" (subtle invariants like the dual `event_key` path in `approval.ts`, the 5s update window, the dedup ring buffer). Preserve them on edits.
|
|
112
|
-
- Errors should never break the workflow: `approval.fallbackOnError` defaults to `ask`, a hook that can't reach the daemon
|
|
131
|
+
- Errors should never break the workflow: `approval.fallbackOnError` defaults to `ask`, a hook that can't reach the daemon answers nothing — the CLI's own permission flow decides, never `allow` (see Hook + sync); other hook failures emit `ask`, every WeCom send is wrapped in try/catch that logs and continues.
|
|
113
132
|
|
|
114
133
|
|
|
115
134
|
**Codex backend**: `shared/codex.ts` adapts response_item records and discovers date-partitioned rollouts using session_meta (cwd/id). `spawn-tmux.ts` prepares native threads through the installed Codex CLI's transient app-server (thread/start, resume or fork, then thread/name/set to persist without a turn), opens a tmux pane with codex resume, and binds the known id/path/pane immediately. SessionStart maintains identity after native session switches; never invent a Claude-style transcript path or send a bootstrap message. Long startup commands run through a private temporary script to avoid PTY input truncation. MCP and developer_instructions are invocation-local TOML overrides. `cli/codex-hook.ts` bridges PreToolUse and PermissionRequest to the shared IM approval engine. Native sandbox permissions always require their own card while approval is enabled; do not reuse tool windows/skip policies. Codex does not support PreToolUse ask: unavailable approval bridges deny ordinary tools, while PermissionRequest falls back to the native prompt. `wezard sync` owns only its exact handlers in Codex hooks.json and trust hashes in config.toml; preserve third-party hooks and never bypass all hook trust. Claude project config sync does not apply to Codex.
|
package/README.md
CHANGED
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
|
|
23
23
|

|
|
24
24
|
|
|
25
|
-
1. 🪞 **远程控制本机 Agent CLI** — 企业微信里发的消息原样落进 CLI 输入框;
|
|
25
|
+
1. 🪞 **远程控制本机 Agent CLI** — 企业微信里发的消息原样落进 CLI 输入框;wizard 通过 room 工具把话说进群,每一轮的工具调用与思考过程记进 rolepage。回到电脑前 `tmux attach -t wezard` 接着干,对话一字不少。支持 `claude` / `claude-internal` / `codebuddy` / `codex`。
|
|
26
26
|
2. 🛎 **远程审批** — Agent 要跑 `Bash` / `Edit` 时审批卡直推 IM:`✅` 放行一次、`⏱` 一段时间内自动放行、`✅总是` 记成规则、`❌` 拒绝。危险操作(强推 / `DROP` / 数据卷删除 / 敏感路径)每次都要单独确认;做完计划推计划卡(`✅同意` / `✏️继续改`),Agent 提的选择题变成投票卡。
|
|
27
27
|
3. 🧙 **多 wizard** — 每个会话是一个有名字的 wizard,写作 `.name`,全局唯一,在任何群里都叫得到;有职责、有记忆,看得见彼此在干什么。克隆一个分身让它继承当前上下文,或者从白板新起一个;按活的难度挑档位(`mini` → `ultra`,从 haiku 到 opus·max)。
|
|
28
28
|
4. 🎩 **管家分派** — 没点名的话落到聊天的默认 wizard:一两句能答完的它自己答,其余一步 `delegate` 给对口的那个或新起一个;要 coder + reviewer 来回几轮的复杂活交给一个 lead 带队。管家有手闸,想自己埋头改代码会被拦下改去分派。
|
|
29
|
-
5. 📮 **派完就放手** — wizard
|
|
30
|
-
6.
|
|
29
|
+
5. 📮 **派完就放手** — wizard 之间用 `chat_ask` 开一条 duty、对方用 `chat_reply` 交代,不必守着等:对方交代会叫醒发话方;对方反问(`need`)就接着答,一轮结束还欠着没交代会被提醒一次,再不交代守护进程给提问者写一条系统行。
|
|
30
|
+
6. 🚪 **room 账本** — 群、单聊、频道帖子和 wizard 之间的 dm 都是一个 room:完成、出处、发言权都是账本行上的显式字段,终句没有路由语义;过程关在 dm / 跟进 room 里,群里只留结论。
|
|
31
31
|
7. 🧠 **三层记忆** — 自己的、本群共享的、本工作区共享的。「这个仓库 reload 要先 build」这类约定写一次,之后每个新 wizard 开局就知道;共享的两层由守护进程定时起一个整理者去重合并。
|
|
32
32
|
8. 🪪 **rolepage** — 每个 wizard 视角下的 IM:`⌘K` 搜遍 role / 会话 / 消息,关系图看清谁和谁对过话,计划视图查看 DAG、依赖与进度,用量条一眼看出模型、档位、上下文、token 与估算费用。
|
|
33
33
|
9. ⏰ **定时任务** — 「每个工作日晚上 9:30 跑一遍回归」,到点自动起一个 wizard 去干,结果发回群里;可以设成「有事才说」。任务本身是一个可以直接编辑的 `.mjs` 文件,存盘即生效。
|
|
34
34
|
10. 🔍 **详情页与主动汇报** — 每次工具调用、审批请求都有详情页,IM 里点链接看完整 input / result / git diff;Agent 也能主动把一段话贴进任意一个群。
|
|
35
|
-
11. 🎛 **说人话改配置** —
|
|
35
|
+
11. 🎛 **说人话改配置** — 「把这个群的管家换成 .docs」「hard 档换成 opus·max」,它查清这一项的说明与默认值再改;放权类的改动(审批、白名单)推一张确认卡等你点。
|
|
36
36
|
12. 📄 **企业微信文档** — 新建在线文档、写 Markdown、读文档链接、操作智能表格。
|
|
37
37
|
13. 🔄 **重启即续** — 电脑重启 / tmux 关了 / daemon 崩了都不掉档:下一条 IM 消息自动把会话拉起来,历史完整继承。
|
|
38
38
|
14. 📎 **图片与文件** — 发给机器人的图片、文件、视频落到本机交给 Agent;Agent 产出的截图、文件用 `send_file` 发回聊天(企业微信与微信两边都行)。
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
- [多 wizard 协同](#多-wizard-协同)
|
|
47
47
|
- [任务编排](#任务编排)
|
|
48
48
|
- [rolepage](#rolepage)
|
|
49
|
-
- [
|
|
49
|
+
- [新群引导与名字](#新群引导与名字)
|
|
50
50
|
- [定时任务与跨群通知](#定时任务与跨群通知)
|
|
51
51
|
- [说人话改配置](#说人话改配置)
|
|
52
52
|
- [图片与文件](#图片与文件)
|
|
@@ -89,7 +89,7 @@ wezard init
|
|
|
89
89
|
**3. 开始使用**
|
|
90
90
|
|
|
91
91
|
1. **发首条消息**:在企微里随便说句话(比如 `hi`),回复会流式推回 IM。
|
|
92
|
-
2. **切到你的项目**:对 AI 说「切到 /path/to/proj
|
|
92
|
+
2. **切到你的项目**:对 AI 说「切到 /path/to/proj」(它会 `set_workspace` 记下新目录、再 `handoff` 在该目录重开),`/pwd` 随时确认。
|
|
93
93
|
3. **审批**:Agent 要跑 `Bash` / `Edit` 时 IM 弹按钮卡,点 `❌` / `⏱10h自动过` / `✅总是` / `✅`;点卡片里的链接看完整 input / result / git diff。
|
|
94
94
|
4. **查命令**:发 `/h` 拉出命令表——`/new` 开新会话、`/clear` 清上下文、`/sessions` 切换、`.name` 叫任意 wizard、`/usage` `/cost` 查额度。
|
|
95
95
|
|
|
@@ -102,7 +102,7 @@ wezard init
|
|
|
102
102
|

|
|
103
103
|
|
|
104
104
|
- **IM → CLI**:企业微信里发的消息由守护进程 `tmux paste-buffer` 进 CLI 的输入框——这是唯一能让远程消息出现在你本机窗口里的通路,你坐回电脑前看到的,就是它替你敲的那一行。图片随消息一起贴进去;尾巴上那段 `<system-reminder>` 是守护进程顺手捎给它的群况(谁在、忙不忙),不占一轮对话。
|
|
105
|
-
- **CLI → IM**:
|
|
105
|
+
- **CLI → IM**:wizard 在群里说话只通过工具(`chat_say` / `chat_reply` / `notify`)——它们写进 room 账本,由守护进程镜像进群;一轮的终句**不会**自己进群,只记进 [rolepage](#rolepage)。你一发消息群里先挂一个「处理中」气泡,第一条回复把它覆盖;审批卡、投票卡和 `[mirror]` 通知照旧由守护进程直接推。
|
|
106
106
|
- **随时接管**:`tmux attach -t wezard` 回到那个 pane 接着干,对话一字不少。
|
|
107
107
|
|
|
108
108
|
---
|
|
@@ -131,13 +131,13 @@ wezard init
|
|
|
131
131
|
/clear .docs 只清 docs 的上下文
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
每条 wizard 的回复都带 `🧙♂️ name:` 署名头,在群里引用它的气泡就等于跟它说话。句中的 `a.ts`、`.gitignore` 这类不会被当成名字。
|
|
135
135
|
|
|
136
136
|
**管家**
|
|
137
137
|
|
|
138
138
|
每个聊天的默认 wizard 是这个群的**管家**,档位由 `models.router` 指定(缺省 `standard`),模型与 effort 从当前后端的 `models.backends.<backend>.tiers` 取值。没点名的话都落到它这儿——一两句能答完的(问进度、谁在干什么、闲聊)自己答;要读很多代码、改文件、跑很久的活,哪怕它自己做得了也**派出去**:它一忙,这个群里没点名的话就都排在它后面。
|
|
139
139
|
|
|
140
|
-
派活是一步 `delegate
|
|
140
|
+
派活是一步 `delegate`(产出是一条 `chat_ask`,见下面的「群是 room」):守护进程先列候选——谁的职责、最近的话、读过的文件和这件活有交集,在不在同一个工作区,忙不忙,上下文多重、缓存冷没冷——再给一个默认决定:证据够强、不忙、接着用那段上下文划算的头一个候选就交给它,否则从白板新起一个,档位按活定(一句话小活 `light`、常规 `standard`、带队 `hard`)。管家照办,或显式推翻(点名、硬要新的、换档)。
|
|
141
141
|
|
|
142
142
|
**复杂的活交给 lead**:要拆成多阶段、需要 coder 与 reviewer 配合的任务,管家交给一个 lead。lead 维护自己的 plan,按当前阶段创建所需 wizard,验收回复后显式更新计划并继续推进。范围清楚、低风险的编码交给 `light`;独立 reviewer 从白板起步,按审查难度选档。计划暂停、恢复、完成或取消都由 owner 明确决定。
|
|
143
143
|
|
|
@@ -154,17 +154,20 @@ flowchart LR
|
|
|
154
154
|
|
|
155
155
|
**手闸**:管家常常说着分派、实际埋头自己干。守护进程在审批链最前面拦它——改文件、开子代理一律拒;读、搜、跑命令每轮最多 4 次(`chatPolicy.<群>.stewardBudget`),超了就拒并叫它 `delegate`。放行窗口、`✅总是`、跳过所有审批都压不过这道闸。
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
**群是 room**:企业微信的群、单聊、频道帖子都是一个 **room**——一份只追加的账本,人和 wizard 说的每一句都按同一个口子写进去;两个 wizard 之间的对话是不进企微的 dm room,三个以上临时凑的是 adhoc room(只能由 wizard `room_open` 开)。
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
- **派活 = 开一条 duty**:`chat_ask` 给某个 wizard 开一条 duty,对方只能用 `chat_reply` 交代;`done` / `passed` / `canceled` 才关账,`need`(反问)/ `progress`(中间进展)不关。**完成只认这个 status**——一轮的终句没有任何路由语义,只进 rolepage,不进任何 room、不关任何 duty。`chat_say` 只说一句、`notify` 把一段话发进别的 room 给人看,都不开 duty。
|
|
160
|
+
- **谁会被叫醒**:被点名的、被你 `re` 的提问者、绑定 room 里没点名的人话落给 host(加入序最靠前的 wizard,通常就是管家);订阅(`room_watch`,默认关)的才在人话和关账时也被叫醒。其余成员只推进读到哪儿的游标,下次被叫醒时一并补上。
|
|
161
|
+
- **群里看到什么**:绑定 room 里每一条 `chat_say` / `chat_reply` / `notify` 都真的进企微;dm / adhoc 里的往来只在 [rolepage](#rolepage)。想让过程别刷群,就让 wizard 开个跟进 room(或直接 `chat_ask` 一个非成员,自动落到两人的 dm room)把中间往返关在里面,主 room 只留结论。
|
|
162
|
+
- **不会悬着**:被唤醒的 wizard 一轮结束时还欠着 duty,会在轮内被提醒一次(支持 Stop hook 的后端在它要收尾那刻拦住),再不交代守护进程给提问者写一条系统行;pane 真死了(两次扫描确认),它名下的 duty 由守护进程写 `canceled`。
|
|
160
163
|
|
|
161
164
|
**名字**
|
|
162
165
|
|
|
163
166
|
| wizard | 名字 |
|
|
164
167
|
| --- | --- |
|
|
165
|
-
|
|
|
166
|
-
| `.docs /new` 叫出来的 / 分身 |
|
|
167
|
-
| 撞名 |
|
|
168
|
+
| 新群的管家 | 新群引导落定(见[新群引导与名字](#新群引导与名字)),自动取一个中性英文名 |
|
|
169
|
+
| `.docs /new` 叫出来的 / 分身 | 你给的那个名字;省略则由守护进程按序号分配(`Alice`、`Bob`…) |
|
|
170
|
+
| 撞名 | 对方还在 → 拒绝并告诉你它忙不忙、静默了多久;对方已静默超过一天 → 新的直接接手这个名字 |
|
|
168
171
|
|
|
169
172
|
名字支持中英文、数字、`_`、`-`,最长 32 个字符,大小写不敏感。
|
|
170
173
|
|
|
@@ -177,24 +180,23 @@ flowchart LR
|
|
|
177
180
|
| 记住:发版前必须更新 CHANGELOG | 写进它的长期记忆,`/clear` 之后仍在 |
|
|
178
181
|
| 记到这个群 / 这个仓库的记忆里 | 提交到群或工作区的共享记忆,之后来的 wizard 开局就知道 |
|
|
179
182
|
| 还有谁在跑 / 谁在弄那个项目 | 列出全部 wizard:名字、职责、忙闲、谁是谁的分身 |
|
|
180
|
-
| 让 .fix 看一眼这个报错 |
|
|
183
|
+
| 让 .fix 看一眼这个报错 | 它给 `.fix` 开一条 duty 就放手去干别的,`.fix` 用 `chat_reply` 交代后会叫醒它,它再答你 |
|
|
181
184
|
| 分个身去把这三个目录都扫一遍 | 分出三个带着当前上下文的分身并行干,完成后默认保留 |
|
|
182
|
-
| 还有哪些事没了结 |
|
|
183
|
-
| 这个群关掉顶层模式(默认是开的) | 关顶层模式,wizard 之间的往来回到群里可见 |
|
|
185
|
+
| 还有哪些事没了结 | 管家用 `pending_items` 列出派出去仍未交代的 duty |
|
|
184
186
|
| 切到 /path/to/proj | 换工作区,重开会话 |
|
|
185
187
|
|
|
186
188
|
- **记忆分三层**:自己的、本群共享的、本工作区共享的。「这个群习惯先出方案再动手」「这个仓库 reload 要先 build」不必每来一个新 wizard 再教一遍。共享的那两层是**提议**——守护进程每 30 分钟看一眼,有提议才起一个整理者去重、改写、合并(已经写在仓库 `CLAUDE.md` 里的不再收),所以不会立刻生效,也不会被几十个 wizard 越写越长;合并后在场读这份记忆的 wizard 下一条消息会收到一行「记忆已更新」。
|
|
187
189
|
- **分身继承上下文**:分身开局就带着原 wizard 读过的全部材料,原 wizard 不受影响;也可以生一个白板的子 wizard,顺便换个工作区。分身还能再分身。
|
|
188
190
|
- **模型按档挑**:生分身时给一个档位,由轻到重 `mini` / `light` / `standard` / `hard` / `ultra`,在 `models.backends.<backend>.tiers` 配置;也可以直接点模型与 effort。新 pane 的 CLI 统一由 `wrc.defaultCli` 决定,档位记进绑定,死 pane 重生、交接重开按当前后端解析。
|
|
189
|
-
- **派完就放手**:wizard
|
|
190
|
-
- **群里只留结论**:wizard
|
|
191
|
-
- **上下文过了 200k
|
|
191
|
+
- **派完就放手**:wizard 之间开完 duty 就走,不守着等;对方的 `chat_reply` 会叫醒它,`need` 是反问(补信息给它或另开一条),`done` / `passed` / `canceled` 才算这笔关了。对方正忙时默认等它这一轮结束再投;急事 `interrupt` 先 Esc 打断(只有直属 parent、room 的 host 或人能用,且有回合预算)。投递靠游标记账:没投出去的话留在游标之后,重启 / 交接 / pane 重生之后接着投,不会丢。
|
|
192
|
+
- **群里只留结论**:wizard 之间派活、来回走 dm / 跟进 room,不刷群;生分身、更新计划、交接这类过程也不进群。群里只出现 wizard 主动在这个 room 里说的话、通知、定时任务的 ⏰。过程想看去 [rolepage](#rolepage)。
|
|
193
|
+
- **上下文过了 200k 自己交接**:手上这摊告一段落,它就把工作压成一份简报、原地换一个全新会话接着干,名字和职责都不变——交接不是压缩,大上下文每一轮都在付钱。交接那几秒里进来的话(人说的、同伴派的、定时任务)都记在 room 账本里,新会话起来后按游标接着投,一句不丢。
|
|
192
194
|
|
|
193
195
|
---
|
|
194
196
|
|
|
195
197
|
## 任务编排
|
|
196
198
|
|
|
197
|
-
当前工具与地址只使用现行名称:`delegate`、`
|
|
199
|
+
当前工具与地址只使用现行名称:`delegate`、`chat_ask` / `chat_reply`、`handoff`,地址参数为 `name` / `names`。`tell_peer`、`wait_peer`、`read_chat`、route / receipt 账本、旧工具别名与 `tag` / `tags` 参数已移除;room 账本的契约见 [docs/room/contract.md](docs/room/contract.md)。
|
|
198
200
|
|
|
199
201
|
|
|
200
202
|
**Wezard Teams** 用 plan 保存复杂任务的 DAG、进度与结论。每个 wizard 可以同时维护多个 plan,每个 plan 只有一个 owner;owner 可以逐步添加任务、调整依赖、安排并行工作,并在验收后显式推进状态。
|
|
@@ -208,21 +210,21 @@ sequenceDiagram
|
|
|
208
210
|
U->>W: 一件复杂任务
|
|
209
211
|
W->>D: 创建或更新 plan
|
|
210
212
|
W->>K: 派发当前阶段的工作
|
|
211
|
-
K-->>W:
|
|
213
|
+
K-->>W: chat_reply 交代
|
|
212
214
|
Note over W: 思考并验收,显式更新 DAG 与状态
|
|
213
215
|
W->>D: 推进、暂停、恢复、完成或取消 plan
|
|
214
216
|
W->>U: 用自己的话交代结果
|
|
215
217
|
```
|
|
216
218
|
|
|
217
|
-
- **计划由 owner 推进**:daemon 持久保存 DAG
|
|
219
|
+
- **计划由 owner 推进**:daemon 持久保存 DAG、校验依赖并提醒进度;任务不会因为依赖完成就自动派发,对方的 `chat_reply` 也不会自动更新 plan。并行节点由 owner 自己安排与验收。
|
|
218
220
|
- **工具入口**:`plan_create` 创建自己的计划;`plan_get` 读取完整 DAG;`plan_list` 列出自己的计划,也可按 wizard 名字只读查询;`plan_update` 用 revision 更新计划,提交的 tasks 替换整份 DAG。
|
|
219
221
|
- **状态**:任务有 `pending`、`in_progress`、`completed`、`canceled`;计划有 `active`、`paused`、`completed`、`canceled`。依赖完成后才能将后继任务推进为进行中或完成。完成计划前,所有任务必须完成或取消;取消与完成分别记录。
|
|
220
|
-
-
|
|
221
|
-
- **提醒**:active plan
|
|
222
|
+
- **消息关联**:为某个计划派活时给 `chat_ask` / `delegate` 带 `planId`,它只记在那条 duty 上,daemon 不据此推进 DAG。
|
|
223
|
+
- **提醒**:active plan 在 owner 名下仍有带这个 `planId` 的未关 duty、owner 正忙或正在交接时暂不提醒;提醒是一条只叫醒 owner、不进群的 trigger 行,修改计划后按新的版本重新判断。暂停只停计划提醒,消息继续流转。
|
|
222
224
|
- **管理树**:创建的 wizard 始终归调用者管理;跨工作区、跨聊天创建,或从其他 wizard 克隆上下文,都不改变这个 parent。wizard 可直接横向协作,再回到自己的主流程交付。
|
|
223
225
|
- **保留与退役**:工作完成后默认保留 wizard;pane 资源回收保留身份与绑定。逻辑退役前必须先完成或取消其 active/paused plans,直属子 wizard 也须处理完毕后才能忘记 parent。
|
|
224
226
|
|
|
225
|
-
|
|
227
|
+
duty 的状态全在 room 账本里:一条 `chat_ask` 开出的 duty 只有对方的 `chat_reply`(`done` / `passed` / `canceled`)能关,`need` / `progress` 不关;`after` 可以让一条 duty 等前置的 duty 都 `done` 之后才叫醒对方。没有 deadline 到期自动合成失败结论这回事。
|
|
226
228
|
|
|
227
229
|
旧工单、workflow runner 与 graph 执行器已移除;`open_job`、`close_job`、`list_jobs` 和旧 workflow/graph 工具不再提供。循环与迭代任务也由 owner 更新 plan 并逐轮安排。
|
|
228
230
|
|
|
@@ -245,25 +247,11 @@ sequenceDiagram
|
|
|
245
247
|
|
|
246
248
|
---
|
|
247
249
|
|
|
248
|
-
##
|
|
250
|
+
## 新群引导与名字
|
|
249
251
|
|
|
250
|
-
|
|
252
|
+
bot 被拉进一个新群,会先由一个**引导会话**在群里问一件事:管家的工作区。给一个合法目录(以 `/` 或 `~` 开头)就完成绑定——daemon 在这个群里新建管家(目录上已有本 bot 的管家身份就直接绑它),自动取一个中性英文名,写入 `chatPolicy.<群>.steward`,引导会话当场收掉。引导会话没有工具面,只负责把 daemon 的指令说成人话;单聊不引导,默认接待者是全局管家。
|
|
251
253
|
|
|
252
|
-
|
|
253
|
-
/name daily 给本聊天起名为 daily
|
|
254
|
-
/name 查看当前名字
|
|
255
|
-
/name - 取消命名
|
|
256
|
-
/chats 列出所有聊天,以及各自跑着哪些 wizard
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
名字 1–32 个字符,字母 / 数字 / `_` / `-`,全机唯一、大小写不敏感。没起名的聊天会按工作区目录名自动补一个(`~/develop/weclaude` → `weclaude`),你起过的名字不会被覆盖。
|
|
260
|
-
|
|
261
|
-
起了名,在任何群里都可以直接说:
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
在 daily 里开个 .ingest 跑 ~/repo 在 daily 群里新开一个 wizard
|
|
265
|
-
别的群还有谁在跑 列出所有聊天和 wizard
|
|
266
|
-
```
|
|
254
|
+
wizard 的名字由它自己起(对它说「以后你就叫 sanitizer」);改别人用 `wizard_identity({to})`,直属 lead 或管家可改。群本身不再起名:`/name`、`/chats` 命令已下线,存量已命名的群只留作显示标签,一律用 chat id 标识。要换这个群的管家,对管家说「把这个群的管家换成 .xxx」,它会改 `chatPolicy.<群>.steward`(热生效)。
|
|
267
255
|
|
|
268
256
|
---
|
|
269
257
|
|
|
@@ -294,13 +282,13 @@ sequenceDiagram
|
|
|
294
282
|
| 对它说 | 效果 |
|
|
295
283
|
| --- | --- |
|
|
296
284
|
| 现在模型档位是怎么配的 | 逐层列出这一节的每一项:类型、当前值、默认值、说明,标出哪些要人确认、哪些要 reload;`models` 下附各档本周 / 今日用量 |
|
|
297
|
-
|
|
|
285
|
+
| 把这个群的管家换成 .docs | 改 `chatPolicy.<群>.steward`,即时生效 |
|
|
298
286
|
| hard 档换成 opus·max | 先预演给你看改前改后的 diff,再落盘,注释原样保留 |
|
|
299
287
|
| 只审危险操作 | 改 `approval.mode`——这类**放权**改动由守护进程推一张确认卡,你点了才写 |
|
|
300
288
|
|
|
301
289
|
- 改动经 zod 整份校验才落盘;热生效的项写完即生效,其余提示 `wezard reload`。
|
|
302
290
|
- **放权项**(`approval.*`、`wrc.allowFrom`、CLI 二进制与启动参数、监听地址等)一律推卡确认,跳过所有审批也压不过;`bot.*` 与 secrets 里的字段读写都不行。
|
|
303
|
-
- 改动若影响到 wizard
|
|
291
|
+
- 改动若影响到 wizard 的宪章(比如管家绑定、手闸次数),受影响的 wizard 会在下一条消息里收到「交接一下才按新规矩办」的提醒。
|
|
304
292
|
|
|
305
293
|
---
|
|
306
294
|
|
|
@@ -332,7 +320,7 @@ sequenceDiagram
|
|
|
332
320
|
|
|
333
321
|
对 Agent 说「把周报整理成一篇企业微信文档」,它会新建在线文档、写入内容,把链接贴回会话。同样可以读文档链接、操作智能表格。文档归属到你本人。
|
|
334
322
|
|
|
335
|
-
首次使用需在企业微信「工作台 - 智能机器人 -
|
|
323
|
+
首次使用需在企业微信「工作台 - 智能机器人 - 可使用权限」里勾选「文档」「智能表格」。由官方 skill 提供,wezard 按会话注入,见 [技术说明](技术说明.md#企业微信文档)。
|
|
336
324
|
|
|
337
325
|
---
|
|
338
326
|
|
|
@@ -344,7 +332,7 @@ sequenceDiagram
|
|
|
344
332
|
|
|
345
333
|
## 常用命令
|
|
346
334
|
|
|
347
|
-
IM 里发 `/help`
|
|
335
|
+
IM 里发 `/help` 可随时拉出完整命令表。
|
|
348
336
|
|
|
349
337
|
```
|
|
350
338
|
/new · /clear · /stop · /n · /kill 会话控制(/kill 连 pane 一起收掉)
|
|
@@ -352,7 +340,6 @@ IM 里发 `/help` 可随时拉出完整命令表;每次 `/new`、`/clear` 之
|
|
|
352
340
|
[.name] /new [model] [第一句] 按配置后端重开 / 挑模型 / 叫出新 wizard
|
|
353
341
|
/reveal 把终端的 tmux 窗口切到本会话
|
|
354
342
|
/peers · /wizards 本聊天的 wizard:名字、职责、忙闲、家谱
|
|
355
|
-
/name [名字|-] · /chats 给本聊天起名 / 跨聊天目录
|
|
356
343
|
/wx · /wx bind|code|unbind 微信 ClawBot:状态 / 扫码绑定 / 解绑(审批人)
|
|
357
344
|
/id · /pwd · /usage · /cost · /audit 信息查询(免授权)
|
|
358
345
|
/cfgsync [apply] 预演 / 执行跨 CLI 项目配置同步
|
|
@@ -401,7 +388,7 @@ wezard uninstall # 完整卸载(先于 npm uninstall)
|
|
|
401
388
|
|
|
402
389
|
## 深入了解
|
|
403
390
|
|
|
404
|
-
- [技术说明](技术说明.md) — 架构、消息双向同步、`.name` 路由与频道、wizard 网络(身份 / 记忆 / 分身 / 感知 / 分派 / 编排 /
|
|
391
|
+
- [技术说明](技术说明.md) — 架构、消息双向同步、`.name` 路由与频道、wizard 网络(身份 / 记忆 / 分身 / 感知 / 分派 / 编排 / room 账本 / 交接)、rolepage、缓存冷热判定、企业微信文档(官方 skill)
|
|
405
392
|
- [审批配置](审批配置.md) — 审批粒度、danger 名单、跳过开关的优先关系、完整判定链
|
|
406
393
|
- [CLAUDE.md](CLAUDE.md) — 模块级职责与代码约定
|
|
407
394
|
- [CHANGELOG.md](CHANGELOG.md) — 各版本变更
|
package/cli/wezard.sh
CHANGED
|
@@ -42,6 +42,8 @@ wezard <subcommand>
|
|
|
42
42
|
sync write hooks/MCP/env into sync.targets settings.json
|
|
43
43
|
unsync remove our entries from sync.targets settings.json
|
|
44
44
|
wx [bind|list|unbind] WeChat ClawBot: scan-to-bind a WeChat user as a chat (terminal QR)
|
|
45
|
+
skills [list|install|remove|pin|unpin|update] [name] [--force]
|
|
46
|
+
bundled skills (e.g. 企微文档套件): show / reinstall / opt out / take over
|
|
45
47
|
audit [tag] token/cost breakdown for current Claude session (main + subagents)
|
|
46
48
|
update npm i -g wezard@latest + repoint/restart daemon + sync (one command, see /wezard:update)
|
|
47
49
|
uninstall full teardown: stop daemon + unsync + plugin uninstall + remove daemon (run before `npm uninstall -g`)
|
|
@@ -169,6 +171,7 @@ svc_unregister() {
|
|
|
169
171
|
case "$cmd" in
|
|
170
172
|
init) exec_node dist/cli/init.js "$@" ;;
|
|
171
173
|
wx) exec_node dist/cli/wx.js "$@" ;;
|
|
174
|
+
skills) exec_node dist/cli/skills.js "$@" ;;
|
|
172
175
|
status)
|
|
173
176
|
if out=$(http_get /status 2>/dev/null); then
|
|
174
177
|
echo "$out" | jq . 2>/dev/null || echo "$out"
|
package/config.example.jsonc
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
// Appended to the spawned CLI command line. Default drops tools wizards never use that cost
|
|
39
39
|
// ~18k tokens per session (Artifact 11.3k, Workflow/SendFeedback/ScheduleWakeup 5.6k, claude.ai Docs/Drive 1.0k);
|
|
40
40
|
// an explicit value replaces it wholesale (no merge).
|
|
41
|
-
"extraArgs": ["--disallowedTools=Artifact,Workflow,SendFeedback,ScheduleWakeup
|
|
41
|
+
"extraArgs": ["--disallowedTools=Artifact,Workflow,SendFeedback,ScheduleWakeup"],
|
|
42
42
|
"mirror": {
|
|
43
43
|
// Pin a session id; empty → auto-pick latest .jsonl mtime under
|
|
44
44
|
// ~/.claude/projects/<encoded(cwd)>/.
|
|
@@ -49,13 +49,7 @@
|
|
|
49
49
|
// Brief 模式: 每个 turn 群里只发两条 —— 「🧵 [本轮详情](url)」+ finish 文本。
|
|
50
50
|
// 中间 tool_use / tool_result / thinking 只写进详情页 (可折叠, Claude 网页风格)。
|
|
51
51
|
// 授权卡照常发群。
|
|
52
|
-
"brief": false
|
|
53
|
-
// 出处门: CLI 手敲的那一轮只进终端 + chat 详情页, 不下发气泡。WeCom 发起的
|
|
54
|
-
// 轮次、审批卡、[mirror] 提示不受影响。只在 brief=true 下生效。
|
|
55
|
-
"chatOriginOnly": true,
|
|
56
|
-
// 斜杠命令回执精简: /clear、/new 只回第一行 ack ("cleared"/"created"),
|
|
57
|
-
// 不再附 📂 项目信息与 💡 tip。默认 false = 完整回执。
|
|
58
|
-
"slashAckFirstLine": false
|
|
52
|
+
"brief": false
|
|
59
53
|
}
|
|
60
54
|
},
|
|
61
55
|
|
package/dist/cli/init.js
CHANGED
|
@@ -17,6 +17,8 @@ import { parse as parseJsonc } from "jsonc-parser";
|
|
|
17
17
|
import { appendUnique, patchJsonc } from "../shared/config-writer.js";
|
|
18
18
|
import { mapClaudePermissions, readClaudePermissions } from "../shared/claude-permissions.js";
|
|
19
19
|
import { expandHome } from "../shared/paths.js";
|
|
20
|
+
import { loadConfig } from "../shared/config.js";
|
|
21
|
+
import { ensureBundledSkills } from "../shared/skill-sync.js";
|
|
20
22
|
import { resolvePublicHost } from "../shared/lan-ip.js";
|
|
21
23
|
import { loadOrCreateSvrToken } from "../shared/svr-token.js";
|
|
22
24
|
import { DAEMON_TOKEN_HEADER, readDaemonToken } from "../shared/daemon-token.js";
|
|
@@ -350,6 +352,39 @@ const main = async () => {
|
|
|
350
352
|
// `wezard-init --import-claude-permissions <path>` 增量补进来 (内部去重)。
|
|
351
353
|
if (enableHook)
|
|
352
354
|
await importClaudePerms(settingsPathFor(primary), true);
|
|
355
|
+
// ── Step 1d: 内置 skill 落地 ──────────────────────────────────────────
|
|
356
|
+
// 包内 skills/ (企微文档套件) 拷进 <stateDir>/skills, spawn 时按会话挂进 pane
|
|
357
|
+
// (shared/session-skills.ts)。默认装、不询问 (2026-11-22 人拍板); 不想要的用
|
|
358
|
+
// "wezard skills remove", 之后不再装回。它首次使用会自己装 wecom-cli 并走审批卡,
|
|
359
|
+
// 这里只保证"知识"到位 —— 所以离线 / 没装 CLI 的用户也不该在这一步失败。
|
|
360
|
+
const installBundledSkills = () => {
|
|
361
|
+
const stateDir = (() => {
|
|
362
|
+
try {
|
|
363
|
+
return expandHome(loadConfig().config.daemon.stateDir);
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
return expandHome("~/.wezard/state");
|
|
367
|
+
}
|
|
368
|
+
})();
|
|
369
|
+
const reports = ensureBundledSkills(stateDir);
|
|
370
|
+
for (const r of reports) {
|
|
371
|
+
if (r.error)
|
|
372
|
+
log(c.yellow(" ⚠ skill " + r.name + ": " + r.error + " (跳过)"));
|
|
373
|
+
else if (r.mode === "foreign")
|
|
374
|
+
log(c.yellow(" ⚠ skill " + r.name + ": 已有你自己的版本, 保持不变 (wezard skills install --force 可覆盖)"));
|
|
375
|
+
else if (r.mode === "held")
|
|
376
|
+
log(c.dim(" skill " + r.name + ": 已按你的设置跳过"));
|
|
377
|
+
else if (r.mode === "gone")
|
|
378
|
+
log(c.dim(" skill " + r.name + ": 目录已删除, 不再自动安装"));
|
|
379
|
+
else if (r.mode !== "current") {
|
|
380
|
+
log(c.green(" ✓ skill " + r.name + ": " + (r.mode === "adopt" ? "已就位" : r.mode + " " + r.wrote + " 文件")));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
const live = reports.filter((r) => !r.error && r.mode !== "held" && r.mode !== "gone");
|
|
384
|
+
if (live.length)
|
|
385
|
+
log(c.dim(" 首次用企微文档类能力时, skill 会自己装 wecom-cli 并走审批卡"));
|
|
386
|
+
};
|
|
387
|
+
installBundledSkills();
|
|
353
388
|
ensureBuild();
|
|
354
389
|
if (enableHook)
|
|
355
390
|
runSync();
|