pi-feishu-cli 0.1.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 +111 -0
- package/dist/src/bot.d.ts +29 -0
- package/dist/src/bot.js +75 -0
- package/dist/src/cards.d.ts +6 -0
- package/dist/src/cards.js +87 -0
- package/dist/src/config.d.ts +3 -0
- package/dist/src/config.js +28 -0
- package/dist/src/daemon.d.ts +2 -0
- package/dist/src/daemon.js +151 -0
- package/dist/src/extension.d.ts +2 -0
- package/dist/src/extension.js +124 -0
- package/dist/src/poller.d.ts +33 -0
- package/dist/src/poller.js +94 -0
- package/dist/src/renderer.d.ts +8 -0
- package/dist/src/renderer.js +31 -0
- package/dist/src/session-registry.d.ts +15 -0
- package/dist/src/session-registry.js +82 -0
- package/dist/src/types.d.ts +25 -0
- package/dist/src/types.js +1 -0
- package/dist/tests/bot.test.d.ts +1 -0
- package/dist/tests/bot.test.js +89 -0
- package/dist/tests/cards.test.d.ts +1 -0
- package/dist/tests/cards.test.js +39 -0
- package/dist/tests/config.test.d.ts +1 -0
- package/dist/tests/config.test.js +59 -0
- package/dist/tests/renderer.test.d.ts +1 -0
- package/dist/tests/renderer.test.js +61 -0
- package/dist/tests/session-registry.test.d.ts +1 -0
- package/dist/tests/session-registry.test.js +92 -0
- package/dist/tests/types.test.d.ts +1 -0
- package/dist/tests/types.test.js +30 -0
- package/package.json +35 -0
- package/skills/lark-approval/SKILL.md +56 -0
- package/skills/lark-apps/SKILL.md +92 -0
- package/skills/lark-apps/references/lark-apps-access-scope-get.md +104 -0
- package/skills/lark-apps/references/lark-apps-access-scope-set.md +126 -0
- package/skills/lark-apps/references/lark-apps-create.md +112 -0
- package/skills/lark-apps/references/lark-apps-html-publish.md +151 -0
- package/skills/lark-apps/references/lark-apps-list.md +95 -0
- package/skills/lark-apps/references/lark-apps-update.md +86 -0
- package/skills/lark-attendance/SKILL.md +57 -0
- package/skills/lark-base/SKILL.md +359 -0
- package/skills/lark-base/references/dashboard-block-data-config.md +350 -0
- package/skills/lark-base/references/examples.md +140 -0
- package/skills/lark-base/references/formula-field-guide.md +737 -0
- package/skills/lark-base/references/lark-base-advperm-disable.md +83 -0
- package/skills/lark-base/references/lark-base-advperm-enable.md +80 -0
- package/skills/lark-base/references/lark-base-base-copy.md +74 -0
- package/skills/lark-base/references/lark-base-base-create.md +68 -0
- package/skills/lark-base/references/lark-base-base-get.md +39 -0
- package/skills/lark-base/references/lark-base-cell-value.md +151 -0
- package/skills/lark-base/references/lark-base-dashboard-arrange.md +83 -0
- package/skills/lark-base/references/lark-base-dashboard-block-create.md +108 -0
- package/skills/lark-base/references/lark-base-dashboard-block-delete.md +46 -0
- package/skills/lark-base/references/lark-base-dashboard-block-get.md +57 -0
- package/skills/lark-base/references/lark-base-dashboard-block-list.md +53 -0
- package/skills/lark-base/references/lark-base-dashboard-block-update.md +84 -0
- package/skills/lark-base/references/lark-base-dashboard-create.md +73 -0
- package/skills/lark-base/references/lark-base-dashboard-delete.md +44 -0
- package/skills/lark-base/references/lark-base-dashboard-get.md +59 -0
- package/skills/lark-base/references/lark-base-dashboard-list.md +52 -0
- package/skills/lark-base/references/lark-base-dashboard-update.md +69 -0
- package/skills/lark-base/references/lark-base-dashboard.md +240 -0
- package/skills/lark-base/references/lark-base-data-analysis-sop.md +88 -0
- package/skills/lark-base/references/lark-base-data-query.md +375 -0
- package/skills/lark-base/references/lark-base-field-create.md +104 -0
- package/skills/lark-base/references/lark-base-field-delete.md +51 -0
- package/skills/lark-base/references/lark-base-field-get.md +42 -0
- package/skills/lark-base/references/lark-base-field-list.md +44 -0
- package/skills/lark-base/references/lark-base-field-search-options.md +48 -0
- package/skills/lark-base/references/lark-base-field-update.md +97 -0
- package/skills/lark-base/references/lark-base-field.md +22 -0
- package/skills/lark-base/references/lark-base-form-create.md +87 -0
- package/skills/lark-base/references/lark-base-form-delete.md +64 -0
- package/skills/lark-base/references/lark-base-form-detail.md +198 -0
- package/skills/lark-base/references/lark-base-form-get.md +68 -0
- package/skills/lark-base/references/lark-base-form-list.md +73 -0
- package/skills/lark-base/references/lark-base-form-questions-create.md +118 -0
- package/skills/lark-base/references/lark-base-form-questions-delete.md +68 -0
- package/skills/lark-base/references/lark-base-form-questions-list.md +84 -0
- package/skills/lark-base/references/lark-base-form-questions-update.md +92 -0
- package/skills/lark-base/references/lark-base-form-questions.md +23 -0
- package/skills/lark-base/references/lark-base-form-submit.md +171 -0
- package/skills/lark-base/references/lark-base-form-update.md +82 -0
- package/skills/lark-base/references/lark-base-form.md +25 -0
- package/skills/lark-base/references/lark-base-history.md +16 -0
- package/skills/lark-base/references/lark-base-record-batch-create.md +58 -0
- package/skills/lark-base/references/lark-base-record-batch-update.md +53 -0
- package/skills/lark-base/references/lark-base-record-delete.md +62 -0
- package/skills/lark-base/references/lark-base-record-history-list.md +86 -0
- package/skills/lark-base/references/lark-base-record-share-link-create.md +72 -0
- package/skills/lark-base/references/lark-base-record-upsert.md +64 -0
- package/skills/lark-base/references/lark-base-record.md +31 -0
- package/skills/lark-base/references/lark-base-role-create.md +89 -0
- package/skills/lark-base/references/lark-base-role-delete.md +83 -0
- package/skills/lark-base/references/lark-base-role-get.md +87 -0
- package/skills/lark-base/references/lark-base-role-list.md +81 -0
- package/skills/lark-base/references/lark-base-role-update.md +94 -0
- package/skills/lark-base/references/lark-base-shortcut-field-properties.md +481 -0
- package/skills/lark-base/references/lark-base-table-create.md +62 -0
- package/skills/lark-base/references/lark-base-table-delete.md +51 -0
- package/skills/lark-base/references/lark-base-table-get.md +46 -0
- package/skills/lark-base/references/lark-base-table-list.md +43 -0
- package/skills/lark-base/references/lark-base-table-update.md +49 -0
- package/skills/lark-base/references/lark-base-table.md +20 -0
- package/skills/lark-base/references/lark-base-view-create.md +50 -0
- package/skills/lark-base/references/lark-base-view-delete.md +48 -0
- package/skills/lark-base/references/lark-base-view-get-card.md +38 -0
- package/skills/lark-base/references/lark-base-view-get-filter.md +38 -0
- package/skills/lark-base/references/lark-base-view-get-group.md +38 -0
- package/skills/lark-base/references/lark-base-view-get-sort.md +38 -0
- package/skills/lark-base/references/lark-base-view-get-timebar.md +38 -0
- package/skills/lark-base/references/lark-base-view-get-visible-fields.md +28 -0
- package/skills/lark-base/references/lark-base-view-get.md +38 -0
- package/skills/lark-base/references/lark-base-view-list.md +44 -0
- package/skills/lark-base/references/lark-base-view-rename.md +44 -0
- package/skills/lark-base/references/lark-base-view-set-card.md +55 -0
- package/skills/lark-base/references/lark-base-view-set-filter.md +181 -0
- package/skills/lark-base/references/lark-base-view-set-group.md +65 -0
- package/skills/lark-base/references/lark-base-view-set-sort.md +63 -0
- package/skills/lark-base/references/lark-base-view-set-timebar.md +51 -0
- package/skills/lark-base/references/lark-base-view-set-visible-fields.md +46 -0
- package/skills/lark-base/references/lark-base-view.md +44 -0
- package/skills/lark-base/references/lark-base-workflow-create.md +180 -0
- package/skills/lark-base/references/lark-base-workflow-disable.md +94 -0
- package/skills/lark-base/references/lark-base-workflow-enable.md +94 -0
- package/skills/lark-base/references/lark-base-workflow-get.md +147 -0
- package/skills/lark-base/references/lark-base-workflow-guide.md +718 -0
- package/skills/lark-base/references/lark-base-workflow-list.md +124 -0
- package/skills/lark-base/references/lark-base-workflow-schema.md +935 -0
- package/skills/lark-base/references/lark-base-workflow-update.md +167 -0
- package/skills/lark-base/references/lark-base-workflow.md +23 -0
- package/skills/lark-base/references/lark-base-workspace.md +18 -0
- package/skills/lark-base/references/lookup-field-guide.md +512 -0
- package/skills/lark-base/references/role-config.md +539 -0
- package/skills/lark-calendar/SKILL.md +154 -0
- package/skills/lark-calendar/references/lark-calendar-agenda.md +78 -0
- package/skills/lark-calendar/references/lark-calendar-create.md +109 -0
- package/skills/lark-calendar/references/lark-calendar-freebusy.md +124 -0
- package/skills/lark-calendar/references/lark-calendar-room-find.md +113 -0
- package/skills/lark-calendar/references/lark-calendar-rsvp.md +42 -0
- package/skills/lark-calendar/references/lark-calendar-schedule-meeting.md +265 -0
- package/skills/lark-calendar/references/lark-calendar-suggestion.md +125 -0
- package/skills/lark-calendar/references/lark-calendar-update.md +105 -0
- package/skills/lark-contact/SKILL.md +45 -0
- package/skills/lark-contact/references/lark-contact-get-user.md +19 -0
- package/skills/lark-contact/references/lark-contact-search-user.md +124 -0
- package/skills/lark-doc/SKILL.md +65 -0
- package/skills/lark-doc/references/lark-doc-create.md +89 -0
- package/skills/lark-doc/references/lark-doc-fetch.md +141 -0
- package/skills/lark-doc/references/lark-doc-md.md +71 -0
- package/skills/lark-doc/references/lark-doc-media-download.md +50 -0
- package/skills/lark-doc/references/lark-doc-media-insert.md +114 -0
- package/skills/lark-doc/references/lark-doc-media-preview.md +41 -0
- package/skills/lark-doc/references/lark-doc-update.md +252 -0
- package/skills/lark-doc/references/lark-doc-whiteboard.md +100 -0
- package/skills/lark-doc/references/lark-doc-xml.md +169 -0
- package/skills/lark-doc/references/style/lark-doc-create-workflow.md +56 -0
- package/skills/lark-doc/references/style/lark-doc-style.md +106 -0
- package/skills/lark-doc/references/style/lark-doc-update-workflow.md +54 -0
- package/skills/lark-drive/SKILL.md +369 -0
- package/skills/lark-drive/references/lark-drive-add-comment.md +182 -0
- package/skills/lark-drive/references/lark-drive-apply-permission.md +77 -0
- package/skills/lark-drive/references/lark-drive-create-folder.md +73 -0
- package/skills/lark-drive/references/lark-drive-create-shortcut.md +103 -0
- package/skills/lark-drive/references/lark-drive-delete.md +79 -0
- package/skills/lark-drive/references/lark-drive-download.md +31 -0
- package/skills/lark-drive/references/lark-drive-export-download.md +50 -0
- package/skills/lark-drive/references/lark-drive-export.md +119 -0
- package/skills/lark-drive/references/lark-drive-import.md +159 -0
- package/skills/lark-drive/references/lark-drive-inspect.md +50 -0
- package/skills/lark-drive/references/lark-drive-move.md +120 -0
- package/skills/lark-drive/references/lark-drive-pull.md +137 -0
- package/skills/lark-drive/references/lark-drive-push.md +162 -0
- package/skills/lark-drive/references/lark-drive-reactions.md +113 -0
- package/skills/lark-drive/references/lark-drive-search.md +266 -0
- package/skills/lark-drive/references/lark-drive-status.md +198 -0
- package/skills/lark-drive/references/lark-drive-task-result.md +302 -0
- package/skills/lark-drive/references/lark-drive-upload.md +67 -0
- package/skills/lark-drive/references/lark-drive-version-delete.md +38 -0
- package/skills/lark-drive/references/lark-drive-version-get.md +71 -0
- package/skills/lark-drive/references/lark-drive-version-history.md +73 -0
- package/skills/lark-drive/references/lark-drive-version-revert.md +198 -0
- package/skills/lark-event/SKILL.md +145 -0
- package/skills/lark-event/references/lark-event-im.md +86 -0
- package/skills/lark-im/SKILL.md +162 -0
- package/skills/lark-im/references/lark-im-chat-create.md +162 -0
- package/skills/lark-im/references/lark-im-chat-identity.md +55 -0
- package/skills/lark-im/references/lark-im-chat-list.md +198 -0
- package/skills/lark-im/references/lark-im-chat-messages-list.md +148 -0
- package/skills/lark-im/references/lark-im-chat-search.md +136 -0
- package/skills/lark-im/references/lark-im-chat-update.md +84 -0
- package/skills/lark-im/references/lark-im-flag-cancel.md +198 -0
- package/skills/lark-im/references/lark-im-flag-create.md +67 -0
- package/skills/lark-im/references/lark-im-flag-list.md +100 -0
- package/skills/lark-im/references/lark-im-messages-mget.md +95 -0
- package/skills/lark-im/references/lark-im-messages-reply.md +228 -0
- package/skills/lark-im/references/lark-im-messages-resources-download.md +94 -0
- package/skills/lark-im/references/lark-im-messages-search.md +232 -0
- package/skills/lark-im/references/lark-im-messages-send.md +229 -0
- package/skills/lark-im/references/lark-im-reactions.md +297 -0
- package/skills/lark-im/references/lark-im-threads-messages-list.md +111 -0
- package/skills/lark-mail/SKILL.md +648 -0
- package/skills/lark-mail/references/lark-mail-decline-receipt.md +115 -0
- package/skills/lark-mail/references/lark-mail-draft-create.md +123 -0
- package/skills/lark-mail/references/lark-mail-draft-edit.md +400 -0
- package/skills/lark-mail/references/lark-mail-forward.md +173 -0
- package/skills/lark-mail/references/lark-mail-message.md +230 -0
- package/skills/lark-mail/references/lark-mail-messages.md +108 -0
- package/skills/lark-mail/references/lark-mail-reply-all.md +206 -0
- package/skills/lark-mail/references/lark-mail-reply.md +242 -0
- package/skills/lark-mail/references/lark-mail-send-receipt.md +198 -0
- package/skills/lark-mail/references/lark-mail-send.md +216 -0
- package/skills/lark-mail/references/lark-mail-share-to-chat.md +198 -0
- package/skills/lark-mail/references/lark-mail-signature.md +98 -0
- package/skills/lark-mail/references/lark-mail-template-create.md +129 -0
- package/skills/lark-mail/references/lark-mail-template-update.md +198 -0
- package/skills/lark-mail/references/lark-mail-thread.md +111 -0
- package/skills/lark-mail/references/lark-mail-triage.md +122 -0
- package/skills/lark-mail/references/lark-mail-watch.md +94 -0
- package/skills/lark-minutes/SKILL.md +139 -0
- package/skills/lark-minutes/references/lark-minutes-download.md +137 -0
- package/skills/lark-minutes/references/lark-minutes-search.md +206 -0
- package/skills/lark-minutes/references/lark-minutes-upload.md +104 -0
- package/skills/lark-okr/SKILL.md +133 -0
- package/skills/lark-okr/references/lark-okr-contentblock.md +359 -0
- package/skills/lark-okr/references/lark-okr-cycle-detail.md +84 -0
- package/skills/lark-okr/references/lark-okr-cycle-list.md +90 -0
- package/skills/lark-okr/references/lark-okr-entities.md +329 -0
- package/skills/lark-okr/references/lark-okr-image-upload.md +116 -0
- package/skills/lark-okr/references/lark-okr-progress-create.md +81 -0
- package/skills/lark-okr/references/lark-okr-progress-delete.md +47 -0
- package/skills/lark-okr/references/lark-okr-progress-get.md +62 -0
- package/skills/lark-okr/references/lark-okr-progress-list.md +80 -0
- package/skills/lark-okr/references/lark-okr-progress-update.md +81 -0
- package/skills/lark-openapi-explorer/SKILL.md +153 -0
- package/skills/lark-shared/SKILL.md +144 -0
- package/skills/lark-sheets/SKILL.md +343 -0
- package/skills/lark-sheets/references/lark-sheets-cell-data.md +197 -0
- package/skills/lark-sheets/references/lark-sheets-cell-images.md +59 -0
- package/skills/lark-sheets/references/lark-sheets-cell-style-and-merge.md +141 -0
- package/skills/lark-sheets/references/lark-sheets-dropdown.md +133 -0
- package/skills/lark-sheets/references/lark-sheets-filter-views.md +193 -0
- package/skills/lark-sheets/references/lark-sheets-float-images.md +125 -0
- package/skills/lark-sheets/references/lark-sheets-formula.md +88 -0
- package/skills/lark-sheets/references/lark-sheets-row-column-management.md +151 -0
- package/skills/lark-sheets/references/lark-sheets-sheet-management.md +164 -0
- package/skills/lark-sheets/references/lark-sheets-spreadsheet-management.md +140 -0
- package/skills/lark-skill-maker/SKILL.md +85 -0
- package/skills/lark-slides/SKILL.md +296 -0
- package/skills/lark-slides/assets/templates/administration--all_hands_meeting.xml +1999 -0
- package/skills/lark-slides/assets/templates/administration--annual_gala.xml +1160 -0
- package/skills/lark-slides/assets/templates/administration--company_intro.xml +1376 -0
- package/skills/lark-slides/assets/templates/administration--corporate_culture.xml +1765 -0
- package/skills/lark-slides/assets/templates/hr--employee_training.xml +912 -0
- package/skills/lark-slides/assets/templates/hr--employee_training_workshop.xml +1504 -0
- package/skills/lark-slides/assets/templates/hr--onboarding.xml +933 -0
- package/skills/lark-slides/assets/templates/marketing--brand_communication.xml +1367 -0
- package/skills/lark-slides/assets/templates/marketing--brand_logo_design.xml +1347 -0
- package/skills/lark-slides/assets/templates/marketing--brand_operations_plan.xml +1309 -0
- package/skills/lark-slides/assets/templates/marketing--business_plan.xml +1646 -0
- package/skills/lark-slides/assets/templates/marketing--marketing_plan.xml +198 -0
- package/skills/lark-slides/assets/templates/marketing--marketing_strategy.xml +1484 -0
- package/skills/lark-slides/assets/templates/marketing--product_whitepaper.xml +198 -0
- package/skills/lark-slides/assets/templates/marketing--roadshow_business_plan.xml +1506 -0
- package/skills/lark-slides/assets/templates/misc--book_sharing.xml +198 -0
- package/skills/lark-slides/assets/templates/misc--club_event_plan.xml +4885 -0
- package/skills/lark-slides/assets/templates/misc--student_career_plan.xml +1854 -0
- package/skills/lark-slides/assets/templates/office--dark_general.xml +3763 -0
- package/skills/lark-slides/assets/templates/office--dept_annual_report.xml +1192 -0
- package/skills/lark-slides/assets/templates/office--light_general.xml +3378 -0
- package/skills/lark-slides/assets/templates/office--project_kickoff.xml +3152 -0
- package/skills/lark-slides/assets/templates/office--quarterly_review.xml +1253 -0
- package/skills/lark-slides/assets/templates/office--work_report.xml +1099 -0
- package/skills/lark-slides/assets/templates/office--work_summary.xml +4420 -0
- package/skills/lark-slides/assets/templates/office--work_summary_report.xml +1523 -0
- package/skills/lark-slides/assets/templates/operations--brand_logo_design.xml +1347 -0
- package/skills/lark-slides/assets/templates/operations--brand_operations_plan.xml +1309 -0
- package/skills/lark-slides/assets/templates/operations--marketing_plan.xml +1469 -0
- package/skills/lark-slides/assets/templates/operations--product_promotion.xml +687 -0
- package/skills/lark-slides/assets/templates/personal--experience_sharing.xml +2242 -0
- package/skills/lark-slides/assets/templates/personal--personal_resume.xml +2047 -0
- package/skills/lark-slides/assets/templates/personal--promotion_defense.xml +1099 -0
- package/skills/lark-slides/assets/templates/personal--promotion_report.xml +1039 -0
- package/skills/lark-slides/assets/templates/personal--self_intro.xml +696 -0
- package/skills/lark-slides/assets/templates/personal--teaching_sharing.xml +3013 -0
- package/skills/lark-slides/assets/templates/product--business_case_analysis.xml +1341 -0
- package/skills/lark-slides/assets/templates/product--market_analysis.xml +898 -0
- package/skills/lark-slides/assets/templates/product--product_analysis.xml +1537 -0
- package/skills/lark-slides/assets/templates/product--product_intro.xml +2838 -0
- package/skills/lark-slides/assets/templates/product--product_promotion.xml +687 -0
- package/skills/lark-slides/assets/templates/product--product_promotion_2.xml +198 -0
- package/skills/lark-slides/references/asset-planning.md +124 -0
- package/skills/lark-slides/references/examples.md +261 -0
- package/skills/lark-slides/references/lark-slides-create.md +137 -0
- package/skills/lark-slides/references/lark-slides-edit-workflows.md +142 -0
- package/skills/lark-slides/references/lark-slides-media-upload.md +128 -0
- package/skills/lark-slides/references/lark-slides-replace-slide.md +239 -0
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md +220 -0
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-delete.md +123 -0
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-get.md +110 -0
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-replace.md +186 -0
- package/skills/lark-slides/references/lark-slides-xml-presentations-get.md +98 -0
- package/skills/lark-slides/references/planning-layer.md +219 -0
- package/skills/lark-slides/references/slide-templates.md +201 -0
- package/skills/lark-slides/references/slides_demo.xml +226 -0
- package/skills/lark-slides/references/slides_xml_schema_definition.xml +3004 -0
- package/skills/lark-slides/references/template-catalog.md +463 -0
- package/skills/lark-slides/references/template-index.json +198 -0
- package/skills/lark-slides/references/troubleshooting.md +198 -0
- package/skills/lark-slides/references/validation-checklist.md +102 -0
- package/skills/lark-slides/references/visual-planning.md +250 -0
- package/skills/lark-slides/references/xml-format-guide.md +369 -0
- package/skills/lark-slides/references/xml-schema-quick-ref.md +215 -0
- package/skills/lark-slides/scripts/template_tool.py +970 -0
- package/skills/lark-slides/scripts/template_tool_test.py +177 -0
- package/skills/lark-slides/scripts/xml_text_overlap_lint.py +367 -0
- package/skills/lark-slides/scripts/xml_text_overlap_lint_test.py +263 -0
- package/skills/lark-task/SKILL.md +165 -0
- package/skills/lark-task/references/lark-task-assign.md +38 -0
- package/skills/lark-task/references/lark-task-comment.md +28 -0
- package/skills/lark-task/references/lark-task-complete.md +27 -0
- package/skills/lark-task/references/lark-task-create.md +57 -0
- package/skills/lark-task/references/lark-task-followers.md +35 -0
- package/skills/lark-task/references/lark-task-get-my-tasks.md +55 -0
- package/skills/lark-task/references/lark-task-get-related-tasks.md +53 -0
- package/skills/lark-task/references/lark-task-reminder.md +36 -0
- package/skills/lark-task/references/lark-task-reopen.md +27 -0
- package/skills/lark-task/references/lark-task-search.md +41 -0
- package/skills/lark-task/references/lark-task-set-ancestor.md +32 -0
- package/skills/lark-task/references/lark-task-subscribe-event.md +86 -0
- package/skills/lark-task/references/lark-task-tasklist-create.md +35 -0
- package/skills/lark-task/references/lark-task-tasklist-members.md +36 -0
- package/skills/lark-task/references/lark-task-tasklist-search.md +38 -0
- package/skills/lark-task/references/lark-task-tasklist-task-add.md +38 -0
- package/skills/lark-task/references/lark-task-update.md +37 -0
- package/skills/lark-task/references/lark-task-upload-attachment.md +59 -0
- package/skills/lark-vc/SKILL.md +168 -0
- package/skills/lark-vc/references/lark-vc-notes.md +126 -0
- package/skills/lark-vc/references/lark-vc-recording.md +153 -0
- package/skills/lark-vc/references/lark-vc-search.md +193 -0
- package/skills/lark-vc-agent/SKILL.md +121 -0
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md +247 -0
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-join.md +133 -0
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-leave.md +111 -0
- package/skills/lark-whiteboard/SKILL.md +144 -0
- package/skills/lark-whiteboard/references/connectors.md +102 -0
- package/skills/lark-whiteboard/references/content.md +40 -0
- package/skills/lark-whiteboard/references/image.md +80 -0
- package/skills/lark-whiteboard/references/lark-whiteboard-query.md +49 -0
- package/skills/lark-whiteboard/references/lark-whiteboard-update.md +100 -0
- package/skills/lark-whiteboard/references/layout.md +374 -0
- package/skills/lark-whiteboard/references/schema.md +357 -0
- package/skills/lark-whiteboard/references/style.md +318 -0
- package/skills/lark-whiteboard/references/typography.md +73 -0
- package/skills/lark-whiteboard/routes/dsl.md +107 -0
- package/skills/lark-whiteboard/routes/mermaid.md +27 -0
- package/skills/lark-whiteboard/routes/svg.md +54 -0
- package/skills/lark-whiteboard/scenes/architecture.md +433 -0
- package/skills/lark-whiteboard/scenes/bar-chart.md +187 -0
- package/skills/lark-whiteboard/scenes/comparison.md +135 -0
- package/skills/lark-whiteboard/scenes/fishbone.md +238 -0
- package/skills/lark-whiteboard/scenes/flowchart.md +198 -0
- package/skills/lark-whiteboard/scenes/flywheel.md +195 -0
- package/skills/lark-whiteboard/scenes/funnel.md +198 -0
- package/skills/lark-whiteboard/scenes/line-chart.md +214 -0
- package/skills/lark-whiteboard/scenes/mermaid.md +130 -0
- package/skills/lark-whiteboard/scenes/milestone.md +139 -0
- package/skills/lark-whiteboard/scenes/organization.md +173 -0
- package/skills/lark-whiteboard/scenes/photo-showcase.md +198 -0
- package/skills/lark-whiteboard/scenes/pyramid.md +99 -0
- package/skills/lark-whiteboard/scenes/swimlane.md +371 -0
- package/skills/lark-whiteboard/scenes/treemap.md +198 -0
- package/skills/lark-wiki/SKILL.md +119 -0
- package/skills/lark-wiki/references/lark-wiki-delete-space.md +205 -0
- package/skills/lark-wiki/references/lark-wiki-member-add.md +66 -0
- package/skills/lark-wiki/references/lark-wiki-member-list.md +76 -0
- package/skills/lark-wiki/references/lark-wiki-member-remove.md +61 -0
- package/skills/lark-wiki/references/lark-wiki-move.md +183 -0
- package/skills/lark-wiki/references/lark-wiki-node-copy.md +72 -0
- package/skills/lark-wiki/references/lark-wiki-node-create.md +127 -0
- package/skills/lark-wiki/references/lark-wiki-node-delete.md +62 -0
- package/skills/lark-wiki/references/lark-wiki-node-get.md +56 -0
- package/skills/lark-wiki/references/lark-wiki-node-list.md +198 -0
- package/skills/lark-wiki/references/lark-wiki-space-create.md +46 -0
- package/skills/lark-wiki/references/lark-wiki-space-list.md +198 -0
- package/skills/lark-workflow-meeting-summary/SKILL.md +104 -0
- package/skills/lark-workflow-standup-report/SKILL.md +120 -0
- package/skills/mmx-cli/SKILL.md +440 -0
- package/src/bot.ts +109 -0
- package/src/cards.ts +105 -0
- package/src/config.ts +33 -0
- package/src/daemon.ts +217 -0
- package/src/extension.ts +132 -0
- package/src/poller.ts +135 -0
- package/src/renderer.ts +47 -0
- package/src/session-registry.ts +90 -0
- package/src/types.ts +29 -0
- package/tests/bot.test.ts +104 -0
- package/tests/cards.test.ts +48 -0
- package/tests/config.test.ts +59 -0
- package/tests/renderer.test.ts +74 -0
- package/tests/session-registry.test.ts +94 -0
- package/tests/types.test.ts +35 -0
- package/tsconfig.json +16 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# im +chat-create
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
|
|
4
|
+
|
|
5
|
+
Create a group chat. Supports both user identity (`--as user`) and bot identity (`--as bot`). You can specify the group name, description, members (users/bots), owner, chat type (private/public), and group mode. Set `--chat-mode topic` to create a topic chat.
|
|
6
|
+
|
|
7
|
+
This skill maps to the shortcut: `lark-cli im +chat-create` (internally calls `POST /open-apis/im/v1/chats`).
|
|
8
|
+
|
|
9
|
+
- `--as bot` requires the `im:chat:create` scope.
|
|
10
|
+
- `--as user` requires the `im:chat:create_by_user` scope.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Create a private group (default)
|
|
16
|
+
lark-cli im +chat-create --name "My Group"
|
|
17
|
+
|
|
18
|
+
# Create a public group (name is required and must be at least 2 characters)
|
|
19
|
+
lark-cli im +chat-create --name "Public Group" --type public
|
|
20
|
+
|
|
21
|
+
# Create a topic chat
|
|
22
|
+
lark-cli im +chat-create --name "Topic Group" --chat-mode topic
|
|
23
|
+
|
|
24
|
+
# Specify the group owner
|
|
25
|
+
lark-cli im +chat-create --name "My Group" --owner ou_xxx
|
|
26
|
+
|
|
27
|
+
# Invite user members (comma-separated open_ids, up to 50)
|
|
28
|
+
lark-cli im +chat-create --name "My Group" --users "ou_aaa,ou_bbb"
|
|
29
|
+
|
|
30
|
+
# Invite bot members (comma-separated app IDs, up to 5)
|
|
31
|
+
lark-cli im +chat-create --name "My Group" --bots "cli_aaa,cli_bbb"
|
|
32
|
+
|
|
33
|
+
# Invite both users and bots
|
|
34
|
+
lark-cli im +chat-create --name "My Group" --users "ou_aaa" --bots "cli_aaa"
|
|
35
|
+
|
|
36
|
+
# Make the creating bot a group manager (bot identity only)
|
|
37
|
+
lark-cli im +chat-create --name "My Group" --set-bot-manager --as bot
|
|
38
|
+
|
|
39
|
+
# JSON output
|
|
40
|
+
lark-cli im +chat-create --name "My Group" --format json
|
|
41
|
+
|
|
42
|
+
# Create a group with bot identity
|
|
43
|
+
lark-cli im +chat-create --name "My Group" --users "ou_aaa" --as bot
|
|
44
|
+
|
|
45
|
+
# Create a group with user identity
|
|
46
|
+
lark-cli im +chat-create --name "My Group" --users "ou_aaa,ou_bbb" --as user
|
|
47
|
+
|
|
48
|
+
# Preview the request without creating anything
|
|
49
|
+
lark-cli im +chat-create --name "My Group" --dry-run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Parameters
|
|
53
|
+
|
|
54
|
+
| Parameter | Required | Limits | Description |
|
|
55
|
+
|------|------|------|------|
|
|
56
|
+
| `--name <name>` | Required for public groups | Max 60 characters; at least 2 characters for public groups | Group name (`"(no subject)"` for private groups if omitted) |
|
|
57
|
+
| `--description <text>` | No | Max 100 characters | Group description |
|
|
58
|
+
| `--users <ids>` | No | Up to 50, format `ou_xxx` | Comma-separated user open_ids |
|
|
59
|
+
| `--bots <ids>` | No | Up to 5, format `cli_xxx` | Comma-separated bot app IDs |
|
|
60
|
+
| `--owner <open_id>` | No | Format `ou_xxx` | Owner open_id (defaults to the bot when using `--as bot`, or the authorized user when using `--as user`) |
|
|
61
|
+
| `--type <type>` | No | `private` (default) or `public` | Group type. Default to `private`; pass `public` only when the user explicitly asks for a discoverable/public group. |
|
|
62
|
+
| `--chat-mode <mode>` | No | `group` (default) or `topic` | Group mode; `topic` creates a topic chat (not the same as `group_message_type=thread`). When the user asks for a topic chat, pass `topic` explicitly — do not rely on the default. |
|
|
63
|
+
| `--set-bot-manager` | No | - | Set the creating bot as a group manager (only effective with `--as bot`) |
|
|
64
|
+
| `--format json` | No | - | Output as JSON |
|
|
65
|
+
| `--as <identity>` | No | `bot` or `user` | Identity type |
|
|
66
|
+
| `--dry-run` | No | - | Preview the request without executing it |
|
|
67
|
+
|
|
68
|
+
> **`--chat-mode topic` vs "normal group with topic-message mode"**: `--chat-mode topic` here creates a 话题群 — the entire group is a topic chat. This is different from "normal group (`chat_mode=group`) + topic-message mode (`group_message_type=thread`)". This CLI exposes only `chat_mode`; `group_message_type` is intentionally not surfaced.
|
|
69
|
+
|
|
70
|
+
## AI Usage Guidance
|
|
71
|
+
|
|
72
|
+
### When using `--as bot`
|
|
73
|
+
|
|
74
|
+
Bot may fail to invite users who are mutually invisible to it during group creation (error 232043). To avoid this, use the **two-step flow** below instead of passing other users' open_ids in `--users`.
|
|
75
|
+
|
|
76
|
+
1. **Get the current user's open_id:** Run `lark-cli contact +search-user --query "<name or email>"` to retrieve it.
|
|
77
|
+
2. **Create the group — by default include the current user:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
lark-cli im +chat-create --name "<group name>" \
|
|
81
|
+
--users "<current user open_id>" --as bot
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Default behavior:** Always add the current user to the group, unless the user explicitly says "do not add me" or "bot-only group" — only then omit `--users`.
|
|
85
|
+
|
|
86
|
+
3. **Add other members via user identity** (requires the current user to be in the group):
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
lark-cli im chat.members create \
|
|
90
|
+
--params '{"chat_id":"<chat_id from step 2>","member_id_type":"open_id","succeed_type":1}' \
|
|
91
|
+
--data '{"id_list":["ou_aaa","ou_bbb"]}' \
|
|
92
|
+
--as user
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`succeed_type=1` ensures reachable users are added successfully; unreachable ones are returned in `invalid_id_list` instead of failing the whole request.
|
|
96
|
+
|
|
97
|
+
4. **Check `invalid_id_list`** in the response. If non-empty, report to the user which members could not be added.
|
|
98
|
+
|
|
99
|
+
### When using `--as user`
|
|
100
|
+
|
|
101
|
+
User identity does not have the bot visibility limitation, so you can create the group and invite members in one step:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
lark-cli im +chat-create --name "<group name>" --users "ou_aaa,ou_bbb" --as user
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The authorized user is automatically the group creator and member.
|
|
108
|
+
|
|
109
|
+
## Output Fields
|
|
110
|
+
|
|
111
|
+
| Field | Description |
|
|
112
|
+
|------|------|
|
|
113
|
+
| `chat_id` | The new group's ID (`oc_xxx` format) |
|
|
114
|
+
| `name` | Group name |
|
|
115
|
+
| `chat_type` | Group type (`private` / `public`) |
|
|
116
|
+
| `owner_id` | Owner ID (may be empty when a bot creates the group and `--owner` is not specified) |
|
|
117
|
+
| `external` | Whether the group is external |
|
|
118
|
+
| `share_link` | Group share link (omitted if retrieval fails) |
|
|
119
|
+
|
|
120
|
+
## Usage Scenarios
|
|
121
|
+
|
|
122
|
+
### Scenario 1: Create a group and specify the owner
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
lark-cli im +chat-create --name "Project Discussion Group" --owner ou_xxx
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Scenario 2: Create a group and invite users and a bot
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
lark-cli im +chat-create --name "Project Discussion Group" \
|
|
132
|
+
--owner ou_xxx \
|
|
133
|
+
--users "ou_aaa,ou_bbb" \
|
|
134
|
+
--bots "cli_aaa"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Scenario 3: Create a group and send a welcome message
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
CHAT_ID=$(lark-cli im +chat-create --name "New Group" --format json | jq -r '.data.chat_id')
|
|
141
|
+
lark-cli im +messages-send --chat-id "$CHAT_ID" --text "Welcome, everyone!"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Common Errors and Troubleshooting
|
|
145
|
+
|
|
146
|
+
| Symptom | Root Cause | Solution |
|
|
147
|
+
|---------|---------|---------|
|
|
148
|
+
| Permission denied (99991672) | The app does not have `im:chat:create` (bot) or `im:chat:create_by_user` (user) permission enabled | Enable the required permission for the app in the Open Platform console |
|
|
149
|
+
| `--name is required for public groups and must be at least 2 characters` | A public group was created without a name or with a name shorter than 2 characters | Provide a name with at least 2 characters |
|
|
150
|
+
| `--name exceeds the maximum of 60 characters` | The group name is too long | Shorten the name to 60 characters or fewer |
|
|
151
|
+
| `--description exceeds the maximum of 100 characters` | The group description is too long | Shorten the description to 100 characters or fewer |
|
|
152
|
+
| `--users exceeds the maximum of 50` | Too many user members were provided | Split the operation into batches and add more members later |
|
|
153
|
+
| `--bots exceeds the maximum of 5` | Too many bot members were provided | Invite at most 5 bots at once |
|
|
154
|
+
| `invalid user id: expected open_id (ou_xxx)` | Invalid user ID format | Use the `ou_xxx` format for users |
|
|
155
|
+
| `invalid bot id: expected app ID (cli_xxx)` | Invalid bot ID format | Use the `cli_xxx` format for bots |
|
|
156
|
+
| `invalid --owner: expected open_id (ou_xxx)` | Invalid owner ID format | Use the `ou_xxx` format for the owner |
|
|
157
|
+
| `bot is invisible to user` (232043) | The bot and target users are mutually invisible | Follow the two-step flow in AI Usage Guidance above — do not pass other users in `--users` during creation |
|
|
158
|
+
|
|
159
|
+
## References
|
|
160
|
+
|
|
161
|
+
- [lark-im](../SKILL.md) - all IM commands
|
|
162
|
+
- [lark-shared](../../lark-shared/SKILL.md) - authentication and global parameters
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Group Chat Identity Rules
|
|
2
|
+
|
|
3
|
+
> Warning: The most common source of failure in group operations is choosing the wrong identity. Confirm the identity before performing the action.
|
|
4
|
+
|
|
5
|
+
Group-chat operations support both `--as user` (UAT user identity) and `--as bot` (TAT bot identity). Choosing the correct identity is critical for success.
|
|
6
|
+
|
|
7
|
+
## Basic Principles
|
|
8
|
+
|
|
9
|
+
- **If the user explicitly specifies an identity:** use exactly what the user requested (`--as user` or `--as bot`) without guessing.
|
|
10
|
+
- **If the user does not specify an identity:** infer the correct identity from context instead of relying on the default.
|
|
11
|
+
|
|
12
|
+
## Identity Selection by Operation
|
|
13
|
+
|
|
14
|
+
| Operation | Recommended Identity | Why |
|
|
15
|
+
|------|---------|-----------------------------------|
|
|
16
|
+
| Create group (`+chat-create`) | Depends on the scenario | Infer from context |
|
|
17
|
+
| Add members (member-management flow) | `--as user` | Bot visibility is limited and often fails when the target user is mutually invisible to the bot (232024) |
|
|
18
|
+
| Update group (`+chat-update`) | Owner identity | Permission changes require owner/admin privileges; owner transfer requires owner identity |
|
|
19
|
+
|
|
20
|
+
## Inferring the Owner
|
|
21
|
+
|
|
22
|
+
When an owner-level action is needed and the owner is unknown, infer in this order:
|
|
23
|
+
|
|
24
|
+
1. A bot created the group and `--owner` was **not** specified -> the owner is the bot (`--as bot`)
|
|
25
|
+
2. A bot created the group and `--owner ou_xxx` **was** specified -> the owner is that user (`--as user`)
|
|
26
|
+
3. A user created the group and `--owner` was **not** specified -> the owner is the current user (`--as user`)
|
|
27
|
+
4. Still unclear -> ask the user to confirm who owns the group before making owner-level changes
|
|
28
|
+
|
|
29
|
+
### When the Owner Is Neither the Current User Nor the Bot
|
|
30
|
+
|
|
31
|
+
If the query shows that the owner is a third-party user (`owner_id` is neither the currently authorized user nor the bot), the current identity does not have owner privileges. In that case:
|
|
32
|
+
|
|
33
|
+
- **Permission/setting changes:** if the bot is an admin of the group, `--as bot` can still perform admin-level operations such as renaming the group or changing permissions.
|
|
34
|
+
- **Owner-only actions such as owner transfer:** require the actual owner to complete UAT authorization via `lark-cli auth login`, then perform the action as that owner.
|
|
35
|
+
- Explain the limitation clearly to the user instead of retrying blindly.
|
|
36
|
+
|
|
37
|
+
## Common Pitfalls
|
|
38
|
+
|
|
39
|
+
### Inviting Members During Group Creation
|
|
40
|
+
|
|
41
|
+
If a bot creates a group and `--users` includes users who are mutually invisible to the bot, the entire request fails with 232043. Use two steps instead:
|
|
42
|
+
|
|
43
|
+
1. Create the group with the bot first, excluding invisible users: `lark-cli im +chat-create --name "Group Name"`
|
|
44
|
+
2. Add users later with a user-identity member-management flow
|
|
45
|
+
|
|
46
|
+
### Insufficient Privileges
|
|
47
|
+
|
|
48
|
+
- **232016 / 232002 / 232017:** the current identity is not the owner or an admin -> switch to the owner identity
|
|
49
|
+
- **232011:** the current user is not in the group -> use a group-member identity, or join the group first
|
|
50
|
+
- **232024:** the bot and the target user are mutually invisible -> switch to `--as user`
|
|
51
|
+
|
|
52
|
+
## References
|
|
53
|
+
|
|
54
|
+
- [lark-im](../SKILL.md) - all IM commands
|
|
55
|
+
- [lark-shared](../../lark-shared/SKILL.md) - authentication and global parameters
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<link rel="icon" href="favicon.ico" />
|
|
7
|
+
<title></title>
|
|
8
|
+
<style>
|
|
9
|
+
* {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.open-platform-wrapper {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
height: 100vh;
|
|
21
|
+
background-color: #ffffff;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.open-platform-icon {
|
|
25
|
+
width: 120px;
|
|
26
|
+
height: 120px;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.open-platform-desc {
|
|
31
|
+
margin-top: 16px;
|
|
32
|
+
line-height: 22px;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
color: #646a73;
|
|
35
|
+
text-align: center
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.open-platform-back {
|
|
39
|
+
border-radius: 6px;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
height: 32px;
|
|
42
|
+
line-height: 22px;
|
|
43
|
+
min-width: 80px;
|
|
44
|
+
padding: 4px 11px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
touch-action: manipulation;
|
|
48
|
+
transition: color .1s ease-in, background-color .1s ease-in, border-color .1s ease-in, width .2s ease-in;
|
|
49
|
+
user-select: none;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
background: #1456f0;
|
|
52
|
+
border: 1px solid #1456f0;
|
|
53
|
+
color: #ffffff;
|
|
54
|
+
margin-top: 16px;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
57
|
+
</head>
|
|
58
|
+
<body>
|
|
59
|
+
<div class="open-platform-wrapper">
|
|
60
|
+
<img class="open-platform-icon"
|
|
61
|
+
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjkxMyA1NS4yNDRjLTUuNjMyIDIuOTUtOC4yNDYgNi4yODQtOC4yNDYgOS40NHY5LjcyYzAtMy4xNTYgMi42MTQtNi40OSA4LjI0Ni05LjQ0di05LjcyWm05NC4xNjMtMTIuMDg0di05LjcyNmM1LjkzNC0zLjE5IDguOTgxLTYuODkxIDguOTgxLTEwLjcyNXY5LjcyYzAgMy44NC0zLjA0NyA3LjU0My04Ljk4MSAxMC43MzJaIiBmaWxsPSIjMEMyOTZFIi8+PHBhdGggZD0iTTYwLjIyOSAxOS4wNTkgNDguNzMgNDkuOTIyIDYwLjM2NSA3Mi45MmwtOC40NzQgMjMuODczSDE2LjkyM2E0IDQgMCAwIDEtNC00VjIzLjA2YTQgNCAwIDAgMSA0LTRINjAuMjNaIiBmaWxsPSIjQkJCRkM0IiBmaWxsLW9wYWNpdHk9Ii40NSIvPjxwYXRoIGQ9Ik03MS40MDggMTkuMDU5IDYwLjAxMyA0OS45MjIgNzEuNDYgNzIuOTJsLTguMzI1IDIzLjg3M2gzOS45NDNhNCA0IDAgMCAwIDQtNFYyMy4wNmE0IDQgMCAwIDAtNC00aC0zMS42N1oiIGZpbGw9IiNCQkJGQzQiIGZpbGwtb3BhY2l0eT0iLjQ1Ii8+PHBhdGggZD0iTTIxLjkyMyAyNi4xYTIgMiAwIDEgMSAwIDQgMiAyIDAgMCAxIDAtNFptMyAyYTMgMyAwIDEgMC02IDAgMyAzIDAgMCAwIDYgMFptNi45MTUtMmEyIDIgMCAxIDEgMCA0IDIgMiAwIDAgMSAwLTRabTMgMmEzIDMgMCAxIDAtNiAwIDMgMyAwIDAgMCA2IDBabS0xNS43NjMgNy4zOTRhLjUuNSAwIDAgMSAuNS0uNWgzMS41ODFhLjUuNSAwIDAgMSAwIDFIMTkuNTc1YS41LjUgMCAwIDEtLjUtLjVabTQ4LjQ3NyAwYS41LjUgMCAwIDEgLjUtLjVoMzIuNDY1YS41LjUgMCAwIDEgMCAxSDY4LjA1MmEuNS41IDAgMCAxLS41LS41WiIgZmlsbD0iIzhGOTU5RSIvPjxwYXRoIGQ9Ik05OCAxMTFjOS45NDEgMCAxOC04LjA1OSAxOC0xOHMtOC4wNTktMTgtMTgtMThjLTkuOTQyIDAtMTggOC4wNTktMTggMThzOC4wNTggMTggMTggMThaIiBmaWxsPSIjRjgwIi8+PHBhdGggZD0iTTk3LjE4MSA4NC44MThhLjgxOC44MTggMCAwIDAtLjgxOC44MTl2OS44MThjMCAuNDUyLjM2Ni44MTguODE4LjgxOGgxLjYzN2EuODE4LjgxOCAwIDAgMCAuODE4LS44MTh2LTkuODE5YS44MTguODE4IDAgMCAwLS44MTgtLjgxOEg5Ny4xOFptMCAxMy4wOTJhLjgxOC44MTggMCAwIDAtLjgxOC44MTh2MS42MzZjMCAuNDUyLjM2Ni44MTguODE4LjgxOGgxLjYzN2EuODE4LjgxOCAwIDAgMCAuODE4LS44MTh2LTEuNjM2YS44MTguODE4IDAgMCAwLS44MTgtLjgxOUg5Ny4xOFoiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNC4wMjcgODUuMzFjMi40OSA1LjUxIDE0Ljc3IDkuOTQgNDEuNDUgOS45M3Y5LjcyMWMtMjYuNjguMDEtMzguOTYtNC40Mi00MS40NS05Ljkzdi05LjcyWm04NC44MS0yNy4yN2MxNy41Mi0yLjY5IDI1LjgwNy03LjAyNiAyNy4yLTExLjcxdjkuNzJjLS4zMyA0LjY3LTkuNjggOS4wMi0yNy4yIDExLjcxdi05LjcyWiIgZmlsbD0iIzMzNzBGRiIvPjxwYXRoIGQ9Ik04OS4yMzcgMTMuMDFjMTguMDU4IDAgMjYuOCAzLjI1IDI2LjggOS43MnY5LjcyYzAtNi40Ny04Ljc0Mi05LjcyLTI2LjgtOS43MnYtOS43MlptLTg0LjU3IDUxLjdjMCA2LjYgMTEuMzcgMTIuNDUgMzAuNDcgMTIuNDR2OS43MmMtMTkuMSAwLTMwLjQ3LTUuODQtMzAuNDctMTIuNDR2LTkuNzJaIiBmaWxsPSIjMDBENkI5Ii8+PC9zdmc+"
|
|
62
|
+
alt="">
|
|
63
|
+
<div class="open-platform-desc">The page does not exist.</div>
|
|
64
|
+
<a class="open-platform-back" href="/">Go to homepage</a>
|
|
65
|
+
</div>
|
|
66
|
+
<script>window.gfdatav1={"env":"prod","ver":"1.0.0.13","canary":0,"garrModules":null,"envName":"prod","region":"CN","idc":"lf","webServerCodeType":"DeployServerlessWebServer","runtime":"node","extra":{"canaryType":null}}</script><script>
|
|
67
|
+
|
|
68
|
+
function parseQueryString(queryString) {
|
|
69
|
+
// 移除开头的 "?"
|
|
70
|
+
if (queryString.charAt(0) === '?') {
|
|
71
|
+
queryString = queryString.substring(1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var params = {};
|
|
75
|
+
if (!queryString) return params;
|
|
76
|
+
|
|
77
|
+
// 分割参数对
|
|
78
|
+
var paramPairs = queryString.split('&');
|
|
79
|
+
|
|
80
|
+
for (var i = 0; i < paramPairs.length; i++) {
|
|
81
|
+
var paramPair = paramPairs[i].split('=');
|
|
82
|
+
var key = decodeURIComponent(paramPair[0]);
|
|
83
|
+
var value = paramPair.length > 1 ? decodeURIComponent(paramPair[1]) : '';
|
|
84
|
+
|
|
85
|
+
// 处理重复参数(转为数组)
|
|
86
|
+
if (params[key] === undefined) {
|
|
87
|
+
params[key] = value;
|
|
88
|
+
} else if (!Array.isArray(params[key])) {
|
|
89
|
+
params[key] = [params[key], value];
|
|
90
|
+
} else {
|
|
91
|
+
params[key].push(value);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return params;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getLocale() {
|
|
99
|
+
var zhLang = 'zh-CN';
|
|
100
|
+
var enLang = 'en-US';
|
|
101
|
+
|
|
102
|
+
var queryLang = parseQueryString(window.location.search).lang;
|
|
103
|
+
var cookieLang = getCookieLocale();
|
|
104
|
+
var lang = enLang;
|
|
105
|
+
|
|
106
|
+
<!--从cookie中取值-->
|
|
107
|
+
function getCookieLocale() {
|
|
108
|
+
var locale = '';
|
|
109
|
+
var cookies = document.cookie.split('; ');
|
|
110
|
+
var loclaeKey = 'open_locale';
|
|
111
|
+
|
|
112
|
+
for (var i = 0; i < cookies.length; i++) {
|
|
113
|
+
var cookie = cookies[i].trim();
|
|
114
|
+
var cookieArr = cookie.split('=');
|
|
115
|
+
if (cookieArr[0] === loclaeKey) {
|
|
116
|
+
locale = cookieArr[1];
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return locale;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function setLocaleCookie(lang) {
|
|
124
|
+
var date = new Date();
|
|
125
|
+
// 300天到期
|
|
126
|
+
date.setTime(date.getTime() + (300 * 24 * 60 * 60 * 1000));
|
|
127
|
+
var expires = 'expires=' + date.toUTCString();
|
|
128
|
+
document.cookie = 'open_locale=' + lang + '; ' + expires + '; path=/;';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 获取浏览器默认语言
|
|
132
|
+
if (navigator.language.indexOf('en') !== -1) {
|
|
133
|
+
lang = enLang;
|
|
134
|
+
} else if (navigator.language.indexOf('zh') !== -1) {
|
|
135
|
+
lang = zhLang;
|
|
136
|
+
}
|
|
137
|
+
if (cookieLang === enLang) {
|
|
138
|
+
lang = enLang;
|
|
139
|
+
} else if (cookieLang === zhLang) {
|
|
140
|
+
lang = zhLang;
|
|
141
|
+
}
|
|
142
|
+
if (queryLang === enLang) {
|
|
143
|
+
lang = enLang;
|
|
144
|
+
} else if (queryLang === zhLang) {
|
|
145
|
+
lang = zhLang;
|
|
146
|
+
}
|
|
147
|
+
// 设置cookie
|
|
148
|
+
setLocaleCookie(lang);
|
|
149
|
+
return lang;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 根据域名获取当前brand
|
|
153
|
+
function isLarkDomain() {
|
|
154
|
+
var defaultBrandMap = {
|
|
155
|
+
lark: ['larksuite'],
|
|
156
|
+
feishu: ['feishu', 'larkoffice', 'larkenterprise'],
|
|
157
|
+
};
|
|
158
|
+
const { hostname } = window.location;
|
|
159
|
+
|
|
160
|
+
if (defaultBrandMap.feishu.some((item) => hostname.includes(item))) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (defaultBrandMap.lark.some((item) => hostname.includes(item))) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (window.domainBrand) {
|
|
169
|
+
return window.domainBrand === 'lark';
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
var isLarkBrand = isLarkDomain();
|
|
176
|
+
|
|
177
|
+
var config = {
|
|
178
|
+
'zh-CN': {
|
|
179
|
+
'desc': '抱歉,您访问的页面不存在',
|
|
180
|
+
'back': '返回首页',
|
|
181
|
+
'title': (isLarkBrand ? 'Lark' : '飞书') + '开放平台',
|
|
182
|
+
},
|
|
183
|
+
'en-US': {
|
|
184
|
+
'desc': 'The page does not exist.',
|
|
185
|
+
'back': 'Go to homepage',
|
|
186
|
+
'title': (isLarkBrand ? 'Lark': 'Feishu') + ' Open Platform',
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
var locale = getLocale();
|
|
190
|
+
var descObj = document.querySelector('.open-platform-desc');
|
|
191
|
+
var backObj = document.querySelector('.open-platform-back');
|
|
192
|
+
descObj.innerHTML = config[locale].desc;
|
|
193
|
+
backObj.innerHTML = config[locale].back;
|
|
194
|
+
document.title = config[locale].title;
|
|
195
|
+
|
|
196
|
+
</script>
|
|
197
|
+
</body>
|
|
198
|
+
</html>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# im +chat-messages-list
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
|
|
4
|
+
|
|
5
|
+
Fetch the message list for a conversation. Supports both group chats and direct messages.
|
|
6
|
+
|
|
7
|
+
This skill maps to the shortcut: `lark-cli im +chat-messages-list` (internally calls `GET /open-apis/im/v1/messages`, and automatically resolves the p2p chat_id when needed).
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Get group chat messages (json output by default)
|
|
13
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx
|
|
14
|
+
|
|
15
|
+
# Get direct messages with a user (pass open_id and resolve p2p chat_id automatically)
|
|
16
|
+
lark-cli im +chat-messages-list --user-id ou_xxx
|
|
17
|
+
|
|
18
|
+
# Specify a time range (ISO 8601)
|
|
19
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --start "2026-03-10T00:00:00+08:00" --end "2026-03-11T00:00:00+08:00"
|
|
20
|
+
|
|
21
|
+
# Specify a time range (date only)
|
|
22
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --start 2026-03-10 --end 2026-03-11
|
|
23
|
+
|
|
24
|
+
# Control sort order and page size (max 50)
|
|
25
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --sort asc --page-size 20
|
|
26
|
+
|
|
27
|
+
# Pagination
|
|
28
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --page-token "xxx"
|
|
29
|
+
|
|
30
|
+
# JSON output
|
|
31
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --format json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Parameters
|
|
35
|
+
|
|
36
|
+
| Parameter | Required | Description |
|
|
37
|
+
|------|------|------|
|
|
38
|
+
| `--chat-id <id>` | One of two | Specify the conversation by its chat_id directly (e.g., group chat `oc_xxx`) |
|
|
39
|
+
| `--user-id <id>` | One of two | Specify a DM conversation by the other user's open_id (`ou_xxx`); p2p chat_id is resolved automatically. Requires user identity (`--as user`); not supported with bot identity |
|
|
40
|
+
| `--start <time>` | No | Start time (ISO 8601 or date only) |
|
|
41
|
+
| `--end <time>` | No | End time (ISO 8601 or date only) |
|
|
42
|
+
| `--sort <order>` | No | Sort order: `asc` / `desc` (default `desc`) |
|
|
43
|
+
| `--page-size <n>` | No | Page size (default 50, max 50) |
|
|
44
|
+
| `--page-token <token>` | No | Pagination token |
|
|
45
|
+
|
|
46
|
+
> Rule: `--chat-id` and `--user-id` are mutually exclusive. You must provide exactly one of them.
|
|
47
|
+
|
|
48
|
+
## Resource Rendering
|
|
49
|
+
|
|
50
|
+
Messages are rendered into human-readable text for inspection. Image messages are shown as placeholders such as `[Image: img_xxx]`; files and videos are rendered with resource keys in the content. Resource binaries are **not** downloaded automatically by this command.
|
|
51
|
+
|
|
52
|
+
Use [lark-im-messages-resources-download](lark-im-messages-resources-download.md) when you need to download an image or file from a specific message.
|
|
53
|
+
|
|
54
|
+
| Resource Type | Marker in Content | Behavior |
|
|
55
|
+
|---------|-------------|------|
|
|
56
|
+
| Image | `[Image: img_xxx]` | Download manually with `im +messages-resources-download --type image` |
|
|
57
|
+
| File | `<file key="file_xxx" .../>` | Download manually with `im +messages-resources-download --type file` |
|
|
58
|
+
| Audio | `<audio key="file_xxx" .../>` | Download manually with `im +messages-resources-download --type file` |
|
|
59
|
+
| Video | `<video key="file_xxx" .../>` | Download manually with `im +messages-resources-download --type file` |
|
|
60
|
+
|
|
61
|
+
## Thread Expansion (`thread_id`)
|
|
62
|
+
|
|
63
|
+
In JSON output, a message may contain a `thread_id` (`omt_xxx`) field, which means the message has replies in a thread. Use [`im +threads-messages-list`](lark-im-threads-messages-list.md) to inspect replies in that thread:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
lark-cli im +threads-messages-list --thread omt_xxx
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Scenario | Recommendation |
|
|
70
|
+
|------|------|
|
|
71
|
+
| You need context | Call `im +threads-messages-list --sort desc --page-size 10` for the discovered thread_id to inspect recent replies |
|
|
72
|
+
| The user asks for the "full discussion" | Use `im +threads-messages-list --sort asc --page-size 50`, then paginate if needed |
|
|
73
|
+
| You only need an overview | Skip thread expansion |
|
|
74
|
+
|
|
75
|
+
## Output Fields
|
|
76
|
+
|
|
77
|
+
| Field | Description |
|
|
78
|
+
|------|------|
|
|
79
|
+
| `messages` | Message array |
|
|
80
|
+
| `total` | Number of messages in the current page |
|
|
81
|
+
| `has_more` | Whether additional pages are available |
|
|
82
|
+
| `page_token` | Pagination token for the next page |
|
|
83
|
+
|
|
84
|
+
Each message contains:
|
|
85
|
+
|
|
86
|
+
| Field | Description |
|
|
87
|
+
|------|------|
|
|
88
|
+
| `message_id` | Message ID |
|
|
89
|
+
| `msg_type` | Message type: `text`, `image`, `file`, `interactive`, `post`, `audio`, `video`, `system`, etc. |
|
|
90
|
+
| `create_time` | Creation time |
|
|
91
|
+
| `sender` | Sender information (includes `name` for user senders) |
|
|
92
|
+
| `content` | Message content |
|
|
93
|
+
| `deleted` | Whether the message has been recalled (always present, `true` = recalled) |
|
|
94
|
+
| `updated` | Whether the message has been edited after sending |
|
|
95
|
+
| `mentions` | Array of @mentions in the message; each item contains `{id, key, name}`. Present only when the message contains @mentions |
|
|
96
|
+
| `thread_id` | Thread ID (`omt_xxx`) if the message has replies in a thread. Present only when replies exist |
|
|
97
|
+
|
|
98
|
+
## Pagination (`has_more` / `page_token`)
|
|
99
|
+
|
|
100
|
+
`im +chat-messages-list` returns `has_more` and `page_token` when more data is available. Use `--page-token` to continue:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
lark-cli im +chat-messages-list --chat-id oc_xxx --page-token <PAGE_TOKEN>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
You can also fall back to the generic API:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
lark-cli api GET /open-apis/im/v1/messages \
|
|
110
|
+
--params 'container_id_type=chat&container_id=oc_xxx&page_size=50&page_token=<PAGE_TOKEN>'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Common Errors and Troubleshooting
|
|
114
|
+
|
|
115
|
+
| Symptom | Root Cause | Solution |
|
|
116
|
+
|---------|---------|---------|
|
|
117
|
+
| `specify --chat-id <chat_id> or --user-id <open_id>` | Neither `--chat-id` nor `--user-id` was provided | You must provide exactly one |
|
|
118
|
+
| `--chat-id and --user-id cannot be specified together` | Both parameters were provided | Use only one |
|
|
119
|
+
| `--user-id requires user identity (--as user); use --chat-id when calling with bot identity` | `--user-id` was used with bot identity | The p2p resolution endpoint requires user identity. Either pass `--as user` or look up the p2p `chat_id` separately and pass it via `--chat-id` |
|
|
120
|
+
| `P2P chat not found for this user` | `--user-id` was used but no p2p chat exists for the current identity and that user | Confirm the target direct-message relationship exists for the current identity |
|
|
121
|
+
| `--start: invalid time format` | Invalid time format | Use ISO 8601 or date-only format such as `2026-03-10` |
|
|
122
|
+
| Permission denied | Message read permissions are missing | Ensure the app has `im:message:readonly` and `im:chat:read` enabled |
|
|
123
|
+
|
|
124
|
+
## AI Usage Guidance
|
|
125
|
+
|
|
126
|
+
1. **Resolving chat_id from a chat name:** When the user refers to a chat by name and you don't have the `chat_id`, use [`+chat-search`](lark-im-chat-search.md) first:
|
|
127
|
+
```bash
|
|
128
|
+
# Find chat_id by name, then list messages
|
|
129
|
+
lark-cli im +chat-search --query "<chat name keyword>" --format json
|
|
130
|
+
lark-cli im +chat-messages-list --chat-id <chat_id>
|
|
131
|
+
```
|
|
132
|
+
**Do not use `im chats search` or `+chat-list` — always use the `+chat-search` shortcut.**
|
|
133
|
+
2. **Prefer `--chat-id` when available:** if the chat_id is already known, use it directly to avoid extra API calls.
|
|
134
|
+
3. **For direct messages:** use `--user-id` to resolve the p2p chat automatically instead of looking it up manually. This requires user identity (`--as user`); with bot identity, resolve the p2p `chat_id` yourself and pass it via `--chat-id`.
|
|
135
|
+
4. **For time ranges:** both ISO 8601 and date-only inputs are supported. Date-only is usually simpler.
|
|
136
|
+
5. **For full content:** table output truncates content. Use `--format json` when you need the complete message body.
|
|
137
|
+
6. **For sender info:** the command already resolves sender names, so you do not need a separate lookup.
|
|
138
|
+
7. **Application/bot identity + named group history:** If the user says "使用应用身份/以 bot 身份" and asks to list or read historical messages for a named group, use bot identity for both steps:
|
|
139
|
+
```bash
|
|
140
|
+
lark-cli im +chat-search --as bot --query "<chat name keyword>" --format json
|
|
141
|
+
lark-cli im +chat-messages-list --as bot --chat-id <chat_id> --page-size 50 --format json
|
|
142
|
+
```
|
|
143
|
+
Do not use `im +messages-search --as bot`; `+messages-search` is user-only. Continue with `--page-token` if `has_more=true`.
|
|
144
|
+
|
|
145
|
+
## References
|
|
146
|
+
|
|
147
|
+
- [lark-im](../SKILL.md) - all IM commands
|
|
148
|
+
- [lark-shared](../../lark-shared/SKILL.md) - authentication and global parameters
|