@wirecat/cli-core 3.1.0-dev → 3.2.0-dev
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/CHANGELOG.md +102 -0
- package/dist/background/daily-archive-timer.d.ts +1 -1
- package/dist/bundle/{agent-RMLBQXJF-CuqJBQqf.js → agent-J75WGZEV-K_l-bQ-h.js} +5 -5
- package/dist/bundle/{all-profiles-3GEKS7PR-Bi_zb5_-.js → all-profiles-3GEKS7PR-BohqgNvP.js} +6 -6
- package/dist/bundle/{anthropic-EVM6I7MZ-BWI01JgC.js → anthropic-EVM6I7MZ-CqB3j7dB.js} +2 -2
- package/dist/bundle/{app-server-76XGUZHU-__6SrMhc.js → app-server-5BL62GAL-Osw_tMej.js} +20 -15
- package/dist/bundle/{bun-AWMVU72K-COHrAYHA.js → bun-AWMVU72K-Bk0oN5Sm.js} +2 -2
- package/dist/bundle/{bun-sqlite-CYFVVXXR-r_kJOwku.js → bun-sqlite-CYFVVXXR-4iGlaI9X.js} +3 -3
- package/dist/bundle/{chunk-4ZM6SE7G-DNDxhi8l.js → chunk-4HGRFFTO-fNvELOjI.js} +330 -56
- package/dist/bundle/{chunk-6G6TIMKP-CoVYG_I3.js → chunk-6G6TIMKP-Byea1UGV.js} +4 -4
- package/dist/bundle/{chunk-M5CHOMME-BIcASmVb.js → chunk-6OLVBOBX-Ch2rblZk.js} +17 -11
- package/dist/bundle/{chunk-CCFBHR4O-DAuKd8rI.js → chunk-CCFBHR4O-Bhxq5eaI.js} +1 -1
- package/dist/bundle/{chunk-DDXCCEI4-CHLrblc1.js → chunk-DDXCCEI4-CBg_l4Ro.js} +2 -2
- package/dist/bundle/{chunk-DZPIGAKP-nrRAPNTz.js → chunk-DZPIGAKP-BZy6DShN.js} +1 -1
- package/dist/bundle/{chunk-ERNCGLKE-4JdU74o6.js → chunk-ERNCGLKE-D3HStkJC.js} +1 -1
- package/dist/bundle/{chunk-GBNNGOIB-DVUFOYzA.js → chunk-GBNNGOIB-DS3rusdH.js} +5 -5
- package/dist/bundle/{chunk-GJTANPFI-5L6Owk-H.js → chunk-GJTANPFI-DlUMnFUQ.js} +3 -3
- package/dist/bundle/{chunk-6ZUQA7OL-ofpF0AvH.js → chunk-GRGGW52W-Fkw6omOx.js} +5 -5
- package/dist/bundle/{chunk-KSUALCA7-DB6cYuSU.js → chunk-KSUALCA7-SMNQ85c6.js} +1 -1
- package/dist/bundle/{chunk-LBVI4Z2X-COUoJmWU.js → chunk-LBVI4Z2X-D9_8iC1S.js} +1 -1
- package/dist/bundle/{chunk-M23BPYSL-ChiHsEsy.js → chunk-M23BPYSL-ByTcRixP.js} +3 -3
- package/dist/bundle/{chunk-Z3ZVBBWR-whNBW-iH.js → chunk-M4KMNZN6-CBeUwDlF.js} +2 -2
- package/dist/bundle/{chunk-NG7F5L7N-BKCEXGxy.js → chunk-NG7F5L7N-Ch_ERSNz.js} +1 -1
- package/dist/bundle/{chunk-NX2VS2ER-DS6Urg3e.js → chunk-NX2VS2ER-CWN0zXqZ.js} +1 -1
- package/dist/bundle/{chunk-O2HOOK7X-Dboq6vxP.js → chunk-O2HOOK7X-Dyw_Dcql.js} +4 -4
- package/dist/bundle/{chunk-PSD6373C-wlicX185.js → chunk-PSD6373C-DgL0rhKe.js} +1 -1
- package/dist/bundle/{chunk-RTCT4N7Y-Dn-lP1zF.js → chunk-RTCT4N7Y-BEZ3cJ5d.js} +1 -1
- package/dist/bundle/{chunk-S34BE7ZC-p6NeYmqQ.js → chunk-S34BE7ZC-BO0yaVoX.js} +1 -1
- package/dist/bundle/{chunk-E6KETVFF-wOOXf4op.js → chunk-SRAGL5LI-CKhhwRrx.js} +5 -5
- package/dist/bundle/{chunk-T6V6LFHT-Dwv7XUuC.js → chunk-T6V6LFHT-BazTZ25Y.js} +1 -1
- package/dist/bundle/{chunk-ACWFPMZF-DkR70AOW.js → chunk-TFRAD7RO-BVAK9frq.js} +50 -4
- package/dist/bundle/{chunk-UH2H3OLE-R_6H5D7o.js → chunk-UH2H3OLE-QNxQo07O.js} +1 -1
- package/dist/bundle/{chunk-UQJGYQ56-CANeLx5l.js → chunk-UQJGYQ56-PoYTv6WX.js} +1 -1
- package/dist/bundle/{chunk-VKZDPPVI-d7RS_QOW.js → chunk-VKZDPPVI-BOmnhxVJ.js} +2 -2
- package/dist/bundle/{chunk-UNGNJ255-CtLEiDap.js → chunk-W3AAOYWE-Cyx1kZsd.js} +7 -7
- package/dist/bundle/{chunk-WXEJSLMO-DbSxVCq9.js → chunk-WXEJSLMO-DCjDRcYe.js} +8 -8
- package/dist/bundle/{chunk-XW3IHFDH-CjmXc8aI.js → chunk-XW3IHFDH-CA9Bby7o.js} +1 -1
- package/dist/bundle/{chunk-YHBBPJW6-jAof9asy.js → chunk-YHBBPJW6-DKIU2gC4.js} +2 -2
- package/dist/bundle/{chunk-YITG2CE5-Bg4SA8X1.js → chunk-YITG2CE5-o18mzaka.js} +1 -1
- package/dist/bundle/{chunk-ZMRSCVFX-Dwxb-Yg1.js → chunk-ZMRSCVFX-uhwzmZUP.js} +1 -1
- package/dist/bundle/chunks.json +83 -83
- package/dist/bundle/{command-contract-4X4JDKH7-BsU8tW9N.js → command-contract-DHFUF6RM-Bnc6nJSk.js} +2 -2
- package/dist/bundle/{command-server-entry-3JEJBUK5-CF-VyCRd.js → command-server-entry-UQSMAHYK-DzjTaTCZ.js} +2 -2
- package/dist/bundle/{decode-KVUA3TLF-Ds0C1R9U.js → decode-KVUA3TLF-BoJfgCpS.js} +2 -2
- package/dist/bundle/{dist-TPSNLFVO-D1tJd0aB.js → dist-TPSNLFVO-55jBf4N-.js} +2 -2
- package/dist/bundle/documents.js +5 -5
- package/dist/bundle/{echarts-6Q4CQ2DC-BvZMDYNl.js → echarts-6Q4CQ2DC-w9WhKUJu.js} +1 -1
- package/dist/bundle/{embed-JGGK2WKR-h5ppwooq.js → embed-JGGK2WKR-Cl3meWl4.js} +2 -2
- package/dist/bundle/{embedder-5SIVKVWO-D4yt4YCy.js → embedder-5SIVKVWO-DJEa9hBn.js} +2 -2
- package/dist/bundle/{first-run-FFHXPGFC-CyHZ4KM3.js → first-run-BT3X33BP-JikrW5_w.js} +2 -2
- package/dist/bundle/{first-screen-2NGQNWIN-BkvwnUdE.js → first-screen-KGQQK446-D2MchUuo.js} +2 -2
- package/dist/bundle/{hast-util-from-html-WLAUHN53-BfAYjYKc.js → hast-util-from-html-WLAUHN53-BOWgHBLv.js} +4 -4
- package/dist/bundle/{hast-util-to-html-PJC36XDP-C8DGIyzU.js → hast-util-to-html-PJC36XDP-QwbM5c4F.js} +5 -5
- package/dist/bundle/{hast-util-to-mdast-ZQ5OFYUM-9p6MJEBi.js → hast-util-to-mdast-ZQ5OFYUM-BidjUANu.js} +6 -6
- package/dist/bundle/{index-BOgkxLir.js → index-CTvUjqLX.js} +331 -345
- package/dist/bundle/index.js +66 -66
- package/dist/bundle/install-IPXFNLYZ-BGKW94IA.js +5 -0
- package/dist/bundle/{instructions-NHSD6EUE-BfefgySD.js → instructions-34FSWDC6-BR7mbjJH.js} +2 -2
- package/dist/bundle/mail.js +3 -3
- package/dist/bundle/{mcp-server-5FM4GA2C-CNWjKPAi.js → mcp-server-5FM4GA2C-B4Sqou0Z.js} +2 -2
- package/dist/bundle/mcp.js +12 -12
- package/dist/bundle/{mdast-util-from-markdown-Y7N3XA5A-ZkhTz5VO.js → mdast-util-from-markdown-Y7N3XA5A-CBCtetYX.js} +8 -8
- package/dist/bundle/{mdast-util-gfm-52PMOHWQ-gfhFQVZ5.js → mdast-util-gfm-52PMOHWQ-Bv-Hkixb.js} +12 -12
- package/dist/bundle/{mdast-util-to-hast-4MTEM3TB-Bomsq1EU.js → mdast-util-to-hast-4MTEM3TB-40gSN0gV.js} +6 -6
- package/dist/bundle/mdast-util-to-markdown-UGCOLDXA-DnYraMQX.js +12 -0
- package/dist/bundle/{meeting-combined-G3OVTNM6-CFHWFlT-.js → meeting-combined-G3OVTNM6-C4Jdctiy.js} +2 -2
- package/dist/bundle/{meeting-model-RINL42I5-Bab4crMQ.js → meeting-model-RINL42I5-BLAAT6mv.js} +2 -2
- package/dist/bundle/meeting-semantic-I7AZQTEI-DQ19wjn5.js +5 -0
- package/dist/bundle/{micromark-extension-gfm-FRHRNOIW-81l4O6kr.js → micromark-extension-gfm-FRHRNOIW-BvJCT_wq.js} +6 -6
- package/dist/bundle/{node-ZIYT5JOL-WfCpdwZ2.js → node-ZIYT5JOL-DoWqiI0I.js} +2 -2
- package/dist/bundle/{node-sqlite-VFGFD4MA-CrKdzJgw.js → node-sqlite-VFGFD4MA-QH9swjUN.js} +3 -3
- package/dist/bundle/notes-search-2Q3C65PA-D2HqYyaY.js +5 -0
- package/dist/bundle/oauth-TVUNW3GM-uN6u_RWy.js +7 -0
- package/dist/bundle/{open-36SZHLGF-kGan0BjP.js → open-36SZHLGF-CPBs6fdy.js} +1 -1
- package/dist/bundle/{openai-Z2WIZ6AC-D-aH-As-.js → openai-Z2WIZ6AC-CcEngcFj.js} +2 -2
- package/dist/bundle/preload.js +1 -1
- package/dist/bundle/{process-KJQOPRSP-C6W_P1_I.js → process-KJQOPRSP-BNqvUqBZ.js} +2 -2
- package/dist/bundle/{prompt-S2W33X57-BEDbCA8B.js → prompt-S2W33X57-BiF1939t.js} +2 -2
- package/dist/bundle/{recognize-NBWDLXLD-B2LTlDUy.js → recognize-NBWDLXLD-BCqQ8iG1.js} +2 -2
- package/dist/bundle/{remote-O54ANXYL-DOEubnhV.js → remote-O54ANXYL-BixLG9XM.js} +2 -2
- package/dist/bundle/{rerank-HTCSXPM6-CVIU4cUa.js → rerank-HTCSXPM6-FGYUs2VW.js} +2 -2
- package/dist/bundle/serve-7KRXCBBZ-EVSG16Mc.js +8 -0
- package/dist/bundle/server-BFD6QUV7-OmgCCeuX.js +11 -0
- package/dist/bundle/server-G7VWUBA2-C3Gq_HlM.js +12 -0
- package/dist/bundle/{sqlite-runtime-KC3NKKRB-DYslMC-g.js → sqlite-runtime-KC3NKKRB-y_O8PNsQ.js} +1 -1
- package/dist/bundle/{start-Dtq56YXe.js → start-CqQGB7xI.js} +5 -5
- package/dist/bundle/start.js +1 -1
- package/dist/bundle/state-3CFS2SAC-CYYQ103I.js +5 -0
- package/dist/bundle/store-BSVRVKTV-Uot4OGm0.js +5 -0
- package/dist/bundle/{store-6CM2A3HP-CtnMVUVK.js → store-LGAEGNFF-BzNIKnoK.js} +2 -2
- package/dist/bundle/{store-maintenance-command-WYO5PN4V-B0wefBHZ.js → store-maintenance-command-Z27R7URJ-CoJCYGVq.js} +2 -2
- package/dist/bundle/surface-ZEEHYD5Q-DRIV3XG3.js +8 -0
- package/dist/bundle/testing.js +8 -8
- package/dist/cli/app-doctor-command.d.ts +187 -1
- package/dist/cli/app-doctor-command.d.ts.map +1 -1
- package/dist/cli/app-doctor-command.js +3 -2
- package/dist/cli/app-doctor-command.js.map +1 -1
- package/dist/cli/app-mcp-command.d.ts +187 -2
- package/dist/cli/app-mcp-command.d.ts.map +1 -1
- package/dist/cli/app-mcp-command.js +3 -2
- package/dist/cli/app-mcp-command.js.map +1 -1
- package/dist/cli/built-commands.d.ts +10 -0
- package/dist/cli/built-commands.d.ts.map +1 -0
- package/dist/cli/built-commands.js +33 -0
- package/dist/cli/built-commands.js.map +1 -0
- package/dist/cli/commands-command.d.ts.map +1 -1
- package/dist/cli/commands-command.js +3 -2
- package/dist/cli/commands-command.js.map +1 -1
- package/dist/cli/complete-command.d.ts +187 -2
- package/dist/cli/complete-command.d.ts.map +1 -1
- package/dist/cli/complete-command.js +3 -2
- package/dist/cli/complete-command.js.map +1 -1
- package/dist/cli/config-command.d.ts +189 -3
- package/dist/cli/config-command.d.ts.map +1 -1
- package/dist/cli/config-command.js +3 -2
- package/dist/cli/config-command.js.map +1 -1
- package/dist/cli/context.d.ts +8 -0
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +39 -2
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/documents/words.d.ts +1 -1
- package/dist/cli/dry-run-guard.d.ts.map +1 -1
- package/dist/cli/dry-run-guard.js +6 -28
- package/dist/cli/dry-run-guard.js.map +1 -1
- package/dist/cli/first-run.js +1 -1
- package/dist/cli/first-run.js.map +1 -1
- package/dist/cli/guide.d.ts.map +1 -1
- package/dist/cli/guide.js +3 -2
- package/dist/cli/guide.js.map +1 -1
- package/dist/cli/messenger/archive-commands.d.ts.map +1 -1
- package/dist/cli/messenger/archive-commands.js +3 -2
- package/dist/cli/messenger/archive-commands.js.map +1 -1
- package/dist/cli/messenger/complete-command.d.ts +187 -2
- package/dist/cli/messenger/complete-command.d.ts.map +1 -1
- package/dist/cli/messenger/complete-command.js +3 -2
- package/dist/cli/messenger/complete-command.js.map +1 -1
- package/dist/cli/messenger/doctor-command.d.ts.map +1 -1
- package/dist/cli/messenger/doctor-command.js +3 -2
- package/dist/cli/messenger/doctor-command.js.map +1 -1
- package/dist/cli/messenger/flood-command.d.ts.map +1 -1
- package/dist/cli/messenger/flood-command.js +3 -2
- package/dist/cli/messenger/flood-command.js.map +1 -1
- package/dist/cli/messenger/mcp-command.d.ts.map +1 -1
- package/dist/cli/messenger/mcp-command.js +3 -2
- package/dist/cli/messenger/mcp-command.js.map +1 -1
- package/dist/cli/messenger/metadata-command.d.ts.map +1 -1
- package/dist/cli/messenger/metadata-command.js +3 -2
- package/dist/cli/messenger/metadata-command.js.map +1 -1
- package/dist/cli/messenger/models-command.d.ts.map +1 -1
- package/dist/cli/messenger/models-command.js +3 -2
- package/dist/cli/messenger/models-command.js.map +1 -1
- package/dist/cli/messenger/server-command.d.ts +1 -1
- package/dist/cli/messenger/server-command.d.ts.map +1 -1
- package/dist/cli/messenger/server-command.js +3 -2
- package/dist/cli/messenger/server-command.js.map +1 -1
- package/dist/cli/messenger/session-commands.d.ts.map +1 -1
- package/dist/cli/messenger/session-commands.js +3 -2
- package/dist/cli/messenger/session-commands.js.map +1 -1
- package/dist/cli/messenger/store-maintenance-command.d.ts.map +1 -1
- package/dist/cli/messenger/store-maintenance-command.js +11 -5
- package/dist/cli/messenger/store-maintenance-command.js.map +1 -1
- package/dist/cli/model-catalogue-command.d.ts.map +1 -1
- package/dist/cli/model-catalogue-command.js +3 -2
- package/dist/cli/model-catalogue-command.js.map +1 -1
- package/dist/cli/oauth-session.d.ts.map +1 -1
- package/dist/cli/oauth-session.js +3 -2
- package/dist/cli/oauth-session.js.map +1 -1
- package/dist/cli/runs/command.d.ts.map +1 -1
- package/dist/cli/runs/command.js +3 -2
- package/dist/cli/runs/command.js.map +1 -1
- package/dist/cli/schedule/schedule-command.d.ts +1 -1
- package/dist/cli/schedule/schedule-command.d.ts.map +1 -1
- package/dist/cli/schedule/schedule-command.js +5 -3
- package/dist/cli/schedule/schedule-command.js.map +1 -1
- package/dist/cli/setup-command.d.ts.map +1 -1
- package/dist/cli/setup-command.js +3 -2
- package/dist/cli/setup-command.js.map +1 -1
- package/dist/cli/skill-command.d.ts.map +1 -1
- package/dist/cli/skill-command.js +3 -2
- package/dist/cli/skill-command.js.map +1 -1
- package/dist/cli/store-info.d.ts.map +1 -1
- package/dist/cli/store-info.js +5 -4
- package/dist/cli/store-info.js.map +1 -1
- package/dist/cli/token-session.d.ts.map +1 -1
- package/dist/cli/token-session.js +2 -1
- package/dist/cli/token-session.js.map +1 -1
- package/dist/cli/upgrade-command.d.ts.map +1 -1
- package/dist/cli/upgrade-command.js +4 -5
- package/dist/cli/upgrade-command.js.map +1 -1
- package/dist/cli/upkeep.d.ts +8 -0
- package/dist/cli/upkeep.d.ts.map +1 -0
- package/dist/cli/upkeep.js +11 -0
- package/dist/cli/upkeep.js.map +1 -0
- package/dist/entities/attachment.d.ts +0 -8
- package/dist/entities/attachment.d.ts.map +1 -1
- package/dist/entities/attachment.js +22 -20
- package/dist/entities/attachment.js.map +1 -1
- package/dist/entities/chat.d.ts +0 -4
- package/dist/entities/chat.d.ts.map +1 -1
- package/dist/entities/chat.js +6 -10
- package/dist/entities/chat.js.map +1 -1
- package/dist/entities/contact.d.ts +0 -7
- package/dist/entities/contact.d.ts.map +1 -1
- package/dist/entities/contact.js +9 -16
- package/dist/entities/contact.js.map +1 -1
- package/dist/entities/deal.d.ts +0 -36
- package/dist/entities/deal.d.ts.map +1 -1
- package/dist/entities/deal.js +22 -48
- package/dist/entities/deal.js.map +1 -1
- package/dist/entities/document.d.ts +0 -2
- package/dist/entities/document.d.ts.map +1 -1
- package/dist/entities/document.js +3 -5
- package/dist/entities/document.js.map +1 -1
- package/dist/entities/fields.d.ts +5 -1
- package/dist/entities/fields.d.ts.map +1 -1
- package/dist/entities/fields.js +6 -2
- package/dist/entities/fields.js.map +1 -1
- package/dist/entities/hit.d.ts +0 -18
- package/dist/entities/hit.d.ts.map +1 -1
- package/dist/entities/hit.js +19 -37
- package/dist/entities/hit.js.map +1 -1
- package/dist/entities/index.d.ts +0 -1
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +2 -3
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/message.d.ts +2 -34
- package/dist/entities/message.d.ts.map +1 -1
- package/dist/entities/message.js +35 -67
- package/dist/entities/message.js.map +1 -1
- package/dist/entities/task.d.ts +0 -19
- package/dist/entities/task.d.ts.map +1 -1
- package/dist/entities/task.js +18 -35
- package/dist/entities/task.js.map +1 -1
- package/dist/mcp/agent.d.ts +3 -0
- package/dist/mcp/agent.d.ts.map +1 -1
- package/dist/mcp/agent.js +48 -1
- package/dist/mcp/agent.js.map +1 -1
- package/dist/mcp/app-server.d.ts.map +1 -1
- package/dist/mcp/app-server.js +8 -5
- package/dist/mcp/app-server.js.map +1 -1
- package/dist/mcp/bot/instructions.js +1 -1
- package/dist/mcp/bot/instructions.js.map +1 -1
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +4 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/instructions.js +4 -4
- package/dist/mcp/instructions.js.map +1 -1
- package/dist/mcp/lean.d.ts +9 -0
- package/dist/mcp/lean.d.ts.map +1 -0
- package/dist/mcp/lean.js +7 -0
- package/dist/mcp/lean.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +6 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/surface.d.ts +51 -2
- package/dist/mcp/surface.d.ts.map +1 -1
- package/dist/mcp/surface.js +379 -52
- package/dist/mcp/surface.js.map +1 -1
- package/dist/mcp/tool.d.ts +9 -1
- package/dist/mcp/tool.d.ts.map +1 -1
- package/dist/mcp/tool.js +20 -6
- package/dist/mcp/tool.js.map +1 -1
- package/dist/output-detail.d.ts +8 -0
- package/dist/output-detail.d.ts.map +1 -1
- package/dist/output-detail.js +55 -0
- package/dist/output-detail.js.map +1 -1
- package/dist/services/package-upgrade.d.ts.map +1 -1
- package/dist/services/package-upgrade.js +3 -1
- package/dist/services/package-upgrade.js.map +1 -1
- package/dist/store/compatibility.d.ts +2 -0
- package/dist/store/compatibility.d.ts.map +1 -1
- package/dist/store/compatibility.js +12 -0
- package/dist/store/compatibility.js.map +1 -1
- package/dist/store/migrations.d.ts +3 -3
- package/dist/store/migrations.js +3 -3
- package/dist/store/sqlite/clients.d.ts +6 -0
- package/dist/store/sqlite/clients.d.ts.map +1 -1
- package/dist/store/sqlite/clients.js +6 -4
- package/dist/store/sqlite/clients.js.map +1 -1
- package/dist/store/sqlite/manifest.d.ts +4 -0
- package/dist/store/sqlite/manifest.d.ts.map +1 -1
- package/dist/store/sqlite/manifest.js.map +1 -1
- package/package.json +1 -1
- package/skills/link-conversations/SKILL.md +1 -1
- package/src/cli/app-doctor-command.ts +41 -42
- package/src/cli/app-mcp-command.ts +55 -52
- package/src/cli/built-commands.ts +32 -0
- package/src/cli/commands-command.ts +3 -2
- package/src/cli/complete-command.ts +53 -48
- package/src/cli/config-command.ts +180 -177
- package/src/cli/context.ts +44 -2
- package/src/cli/dry-run-guard.ts +11 -23
- package/src/cli/first-run.ts +1 -1
- package/src/cli/guide.ts +3 -2
- package/src/cli/messenger/archive-commands.ts +3 -2
- package/src/cli/messenger/complete-command.ts +30 -30
- package/src/cli/messenger/doctor-command.ts +3 -2
- package/src/cli/messenger/flood-command.ts +3 -2
- package/src/cli/messenger/mcp-command.ts +3 -2
- package/src/cli/messenger/metadata-command.ts +3 -2
- package/src/cli/messenger/models-command.ts +3 -2
- package/src/cli/messenger/server-command.ts +3 -2
- package/src/cli/messenger/session-commands.ts +3 -2
- package/src/cli/messenger/store-maintenance-command.ts +18 -12
- package/src/cli/model-catalogue-command.ts +3 -2
- package/src/cli/oauth-session.ts +3 -2
- package/src/cli/runs/command.ts +3 -2
- package/src/cli/schedule/schedule-command.ts +412 -410
- package/src/cli/setup-command.ts +3 -2
- package/src/cli/skill-command.ts +3 -2
- package/src/cli/store-info.ts +21 -16
- package/src/cli/token-session.ts +3 -2
- package/src/cli/upgrade-command.ts +59 -62
- package/src/cli/upkeep.ts +15 -0
- package/src/entities/attachment.ts +44 -30
- package/src/entities/chat.ts +9 -10
- package/src/entities/contact.ts +20 -21
- package/src/entities/deal.ts +66 -53
- package/src/entities/document.ts +3 -5
- package/src/entities/fields.ts +11 -2
- package/src/entities/hit.ts +52 -37
- package/src/entities/index.ts +2 -3
- package/src/entities/message.ts +101 -80
- package/src/entities/task.ts +37 -38
- package/src/mcp/agent.ts +51 -1
- package/src/mcp/app-server.ts +8 -5
- package/src/mcp/bot/instructions.ts +1 -1
- package/src/mcp/index.ts +4 -0
- package/src/mcp/instructions.ts +4 -4
- package/src/mcp/lean.ts +8 -0
- package/src/mcp/server.ts +6 -2
- package/src/mcp/surface.ts +436 -64
- package/src/mcp/tool.ts +27 -4
- package/src/output-detail.ts +61 -0
- package/src/services/package-upgrade.ts +3 -1
- package/src/store/compatibility.ts +12 -0
- package/src/store/migrations.ts +3 -3
- package/src/store/sqlite/clients.ts +17 -6
- package/src/store/sqlite/manifest.ts +4 -0
- package/dist/bundle/install-IPXFNLYZ-BSWiztYR.js +0 -5
- package/dist/bundle/mdast-util-to-markdown-UGCOLDXA-7D6EJn9r.js +0 -12
- package/dist/bundle/meeting-semantic-I7AZQTEI-BgZ3ZzQB.js +0 -5
- package/dist/bundle/notes-search-2Q3C65PA-CWKHboCy.js +0 -5
- package/dist/bundle/oauth-TVUNW3GM-BqlyhUfp.js +0 -7
- package/dist/bundle/serve-7KRXCBBZ-BO9BKhWL.js +0 -8
- package/dist/bundle/server-PIT6UZRZ-C6I-VrDd.js +0 -11
- package/dist/bundle/server-ZL4FMEHH-DP1oYgCn.js +0 -12
- package/dist/bundle/state-3CFS2SAC-xptBCfut.js +0 -5
- package/dist/bundle/store-ASWYHJ4Q-C7EFfvzB.js +0 -5
- package/dist/bundle/surface-DDH4HGT3-CBZnEqH_.js +0 -8
package/src/cli/setup-command.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { bufferedInput } from "./input-policy.js"
|
|
|
28
28
|
import { rememberAccount } from "./messenger/accounts.js"
|
|
29
29
|
import { ProfileTokenStore } from "./profile-token.js"
|
|
30
30
|
import { fromFile, NONE_NAMED } from "./settings.js"
|
|
31
|
+
import { upkeepCommand } from "./upkeep.js"
|
|
31
32
|
|
|
32
33
|
type Answers = Record<string, unknown>
|
|
33
34
|
|
|
@@ -52,7 +53,7 @@ const settingJsonSchema = (schema: v.GenericSchema): Record<string, unknown> =>
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/** The setup group a CLI gets by describing its flow: `show`, `apply`, `run` and the terminal walk-through. */
|
|
55
|
-
export const setupCommand = (setup: Setup): Command => {
|
|
56
|
+
export const setupCommand = upkeepCommand((setup: Setup): Command => {
|
|
56
57
|
const { app, configuration, check, ownerOnly = {} } = setup.definition
|
|
57
58
|
const cli = app.command
|
|
58
59
|
const { document } = setup
|
|
@@ -490,4 +491,4 @@ export const setupCommand = (setup: Setup): Command => {
|
|
|
490
491
|
}
|
|
491
492
|
|
|
492
493
|
return group
|
|
493
|
-
}
|
|
494
|
+
})
|
package/src/cli/skill-command.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { AppIdentity } from "../ports/app.js"
|
|
|
5
5
|
import { environmentOf, outputFor } from "./context.js"
|
|
6
6
|
import { grantsAuthority } from "./effects.js"
|
|
7
7
|
import { printItem } from "./envelope.js"
|
|
8
|
+
import { upkeepCommand } from "./upkeep.js"
|
|
8
9
|
|
|
9
10
|
const skillSources = new WeakMap<Command, URL>()
|
|
10
11
|
// zm and memo mount their own `skill` command in place of this one (`customizeSharedCommand`), from the same file.
|
|
@@ -20,7 +21,7 @@ export const skillSourceOf = (program: Command, appName: string): URL | undefine
|
|
|
20
21
|
* `skill show` and `skill install`. `skill` is the CLI's own SKILL.md, shipped beside `dist/` in the
|
|
21
22
|
* package and in a checkout alike, so the skill printed is always this version's.
|
|
22
23
|
*/
|
|
23
|
-
export const skillCommand = (app: AppIdentity, skill: URL): Command => {
|
|
24
|
+
export const skillCommand = upkeepCommand((app: AppIdentity, skill: URL): Command => {
|
|
24
25
|
const command = sharedSkillCommand(
|
|
25
26
|
app,
|
|
26
27
|
skill,
|
|
@@ -50,7 +51,7 @@ export const skillCommand = (app: AppIdentity, skill: URL): Command => {
|
|
|
50
51
|
],
|
|
51
52
|
})
|
|
52
53
|
return command
|
|
53
|
-
}
|
|
54
|
+
})
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Skills this package ships for the messenger CLIs, printed by `skill show <name>`: `skills/` beside `dist/` and `src/`.
|
package/src/cli/store-info.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { environmentOf, outputFor } from "./context.js"
|
|
|
20
20
|
import { LOCAL_READ } from "./effects.js"
|
|
21
21
|
import { itemOf, renderAnswer, snakeKeys } from "./envelope.js"
|
|
22
22
|
import { storeRecoverCommand } from "./store-recover.js"
|
|
23
|
+
import { upkeepCommand } from "./upkeep.js"
|
|
23
24
|
|
|
24
25
|
/** @experimental */
|
|
25
26
|
export type StoreInfo = v.InferOutput<typeof storeInfoEntity>
|
|
@@ -81,21 +82,25 @@ export const storeInfo = async (env: NodeJS.ProcessEnv): Promise<StoreInfo> => {
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
/** @experimental */
|
|
84
|
-
export const storeInfoCommand = (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
export const storeInfoCommand = upkeepCommand(
|
|
86
|
+
(): Command =>
|
|
87
|
+
annotate(new Command("info"), { output: { entity: "store_info" }, effects: LOCAL_READ })
|
|
88
|
+
.summary("the shared store's format, size and contents, and whether this tool can read it")
|
|
89
|
+
.description(
|
|
90
|
+
"the store file: where it is, its size, its schema against the one this tool speaks, which tools used it and how many rows it holds, by provider, chat kind, account, year (UTC) and attachment kind, over every account; changes nothing",
|
|
91
|
+
)
|
|
92
|
+
.action(async function (this: Command) {
|
|
93
|
+
const answer = await storeInfo(environmentOf(this).env ?? process.env)
|
|
94
|
+
renderAnswer(this, outputFor(this), itemOf(answer))
|
|
95
|
+
}),
|
|
96
|
+
)
|
|
94
97
|
|
|
95
98
|
/** `store info` for a tool with no `store` command of its own. */
|
|
96
|
-
export const sharedStoreCommand
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
export const sharedStoreCommand: (app?: { command: string; version?: string }) => Command = upkeepCommand(
|
|
100
|
+
(app?: { command: string; version?: string }): Command => {
|
|
101
|
+
const store = annotate(new Command("store"), { effects: LOCAL_READ })
|
|
102
|
+
.description("the shared local store every WireCat tool reads")
|
|
103
|
+
.addCommand(storeInfoCommand())
|
|
104
|
+
return app ? store.addCommand(storeRecoverCommand(app)) : store
|
|
105
|
+
},
|
|
106
|
+
)
|
package/src/cli/token-session.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { serviceApiCall } from "./service-api-call.js"
|
|
|
21
21
|
import { type ServiceApiManifest, siteValue } from "./service-api-manifest.js"
|
|
22
22
|
import type { GlobalFlags, ResolveOptions, Settings } from "./settings.js"
|
|
23
23
|
import { sharedCommand } from "./shared-contracts.js"
|
|
24
|
+
import { upkeepCommand } from "./upkeep.js"
|
|
24
25
|
|
|
25
26
|
export interface TokenSessionOptions {
|
|
26
27
|
app: AppIdentity
|
|
@@ -347,8 +348,8 @@ const tokenSessionCommandDefinition = (options: TokenSessionOptions): Command =>
|
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
/** cli-core's own command (WC-CMD-34): a CLI changes it only through its options. */
|
|
350
|
-
export const tokenSessionCommand: (options: TokenSessionOptions) => Command =
|
|
351
|
-
sharedCommand(tokenSessionCommandDefinition),
|
|
351
|
+
export const tokenSessionCommand: (options: TokenSessionOptions) => Command = upkeepCommand(
|
|
352
|
+
honoursDryRun(sharedCommand(tokenSessionCommandDefinition)),
|
|
352
353
|
)
|
|
353
354
|
|
|
354
355
|
const SITE = "site"
|
|
@@ -22,6 +22,7 @@ import { type BaseEnvironment, environmentOf } from "./context.js"
|
|
|
22
22
|
import { grantsAuthority, LOCAL_WRITE } from "./effects.js"
|
|
23
23
|
import { itemOf, renderAnswer, snakeKeys } from "./envelope.js"
|
|
24
24
|
import { usableProfileName } from "./profile.js"
|
|
25
|
+
import { upkeepCommand } from "./upkeep.js"
|
|
25
26
|
|
|
26
27
|
export interface UpgradeContext extends Omit<PackageUpgradePorts, "onInstall"> {
|
|
27
28
|
renderer: Renderer
|
|
@@ -94,70 +95,66 @@ const mcpWarnings = (command: string, current: string, servers: readonly McpServ
|
|
|
94
95
|
: []),
|
|
95
96
|
]
|
|
96
97
|
|
|
97
|
-
export const upgradeCommand = (
|
|
98
|
-
app: AppIdentity,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
mcpServers: await restartMcpServers(app, env, system),
|
|
129
|
-
staleSessions: staleMcpSessions(system),
|
|
98
|
+
export const upgradeCommand = upkeepCommand(
|
|
99
|
+
(app: AppIdentity, packageName: string, contextFor: (command: Command) => UpgradeContext): Command =>
|
|
100
|
+
grantsAuthority(
|
|
101
|
+
annotate(new Command("upgrade"), {
|
|
102
|
+
effects: LOCAL_WRITE,
|
|
103
|
+
offline: false,
|
|
104
|
+
examples: [`${app.command} upgrade --check`],
|
|
105
|
+
}),
|
|
106
|
+
{ unless: "check" },
|
|
107
|
+
)
|
|
108
|
+
.description(`upgrade ${app.command} with the package manager that installed it; --check only looks`)
|
|
109
|
+
.option("--check", "say whether a newer version exists, and install nothing")
|
|
110
|
+
.action(async function (this: Command, { check }: { check?: boolean }) {
|
|
111
|
+
if (this.optsWithGlobals<{ offline?: boolean }>().offline)
|
|
112
|
+
throw new CliError(
|
|
113
|
+
"validation_error",
|
|
114
|
+
`\`${app.command} upgrade\` asks npm for the newest version; not with --offline`,
|
|
115
|
+
)
|
|
116
|
+
const context = contextFor(this)
|
|
117
|
+
const { renderer } = context
|
|
118
|
+
const environment = environmentOf<BaseEnvironment & { afterUpgrade?: Partial<AfterUpgradeSystem> }>(this)
|
|
119
|
+
const env = environment.env ?? process.env
|
|
120
|
+
// Built before the install: after it, the old process may no longer find its own lazily loaded files.
|
|
121
|
+
const system = { ...thisSystem(packageName, app.command), ...environment.afterUpgrade }
|
|
122
|
+
const afterUpdate = async (): Promise<ServerRestarts> => {
|
|
123
|
+
const servers = (await context.afterUpdate?.()) ?? { restarted: [], left: [] }
|
|
124
|
+
return {
|
|
125
|
+
...servers,
|
|
126
|
+
mcpServers: await restartMcpServers(app, env, system),
|
|
127
|
+
staleSessions: staleMcpSessions(system),
|
|
128
|
+
}
|
|
130
129
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{ ...context, afterUpdate, onInstall: (argv) => renderer.note(`running: ${argv.join(" ")}`) },
|
|
135
|
-
)
|
|
136
|
-
if (reason === "held_back" && result.heldBack) renderer.warn(heldBackAdvice(result, result.heldBack))
|
|
137
|
-
if (reason === "unavailable") renderer.warn("npm did not answer, so nothing was run")
|
|
138
|
-
else if (reason === "up_to_date") renderer.note(`${app.command} ${app.version} is the newest`)
|
|
139
|
-
else if (reason === "manual") {
|
|
140
|
-
const advice =
|
|
141
|
-
result.installer === "checkout"
|
|
142
|
-
? "this is a checkout: `git pull && pnpm install && pnpm build`"
|
|
143
|
-
: result.installer === "npx"
|
|
144
|
-
? `npx runs whatever version it is asked for: \`npx ${packageName}@latest\``
|
|
145
|
-
: `cannot tell how ${app.command} was installed, so nothing was run`
|
|
146
|
-
renderer.warn(advice)
|
|
147
|
-
}
|
|
148
|
-
for (const profile of left) {
|
|
149
|
-
renderer.warn(
|
|
150
|
-
timedOut?.includes(profile)
|
|
151
|
-
? `the server for profile ${profile} did not restart in time and may still run ${app.command} ${app.version} — ` +
|
|
152
|
-
`\`${app.command} ${profile} server status\``
|
|
153
|
-
: `the server for profile ${profile} still runs ${app.command} ${app.version} — ` +
|
|
154
|
-
`\`${app.command} ${profile} server restart\``,
|
|
130
|
+
const { result, reason, left, timedOut } = await upgradePackage(
|
|
131
|
+
{ current: app.version, command: app.command, packageName, check: check === true },
|
|
132
|
+
{ ...context, afterUpdate, onInstall: (argv) => renderer.note(`running: ${argv.join(" ")}`) },
|
|
155
133
|
)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
renderer.
|
|
159
|
-
|
|
160
|
-
|
|
134
|
+
if (reason === "held_back" && result.heldBack) renderer.warn(heldBackAdvice(result, result.heldBack))
|
|
135
|
+
if (reason === "unavailable") renderer.warn("npm did not answer, so nothing was run")
|
|
136
|
+
else if (reason === "up_to_date") renderer.note(`${app.command} ${app.version} is the newest`)
|
|
137
|
+
else if (reason === "manual") {
|
|
138
|
+
const advice =
|
|
139
|
+
result.installer === "checkout"
|
|
140
|
+
? "this is a checkout: `git pull && pnpm install && pnpm build`"
|
|
141
|
+
: `npx runs whatever version it is asked for: \`npx ${packageName}@latest\``
|
|
142
|
+
renderer.warn(advice)
|
|
143
|
+
}
|
|
144
|
+
for (const profile of left) {
|
|
145
|
+
renderer.warn(
|
|
146
|
+
timedOut?.includes(profile)
|
|
147
|
+
? `the server for profile ${profile} did not restart in time and may still run ${app.command} ${app.version} — ` +
|
|
148
|
+
`\`${app.command} ${profile} server status\``
|
|
149
|
+
: `the server for profile ${profile} still runs ${app.command} ${app.version} — ` +
|
|
150
|
+
`\`${app.command} ${profile} server restart\``,
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
for (const line of mcpWarnings(app.command, app.version, result.mcpServers ?? [], result.staleSessions))
|
|
154
|
+
renderer.warn(line)
|
|
155
|
+
renderAnswer(this, context, itemOf(snakeKeys(result)), () => summary(app.command, result))
|
|
156
|
+
}),
|
|
157
|
+
)
|
|
161
158
|
|
|
162
159
|
const heldBackAdvice = (
|
|
163
160
|
{ installed, latest, installer }: PackageUpgradeResult,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Command } from "commander"
|
|
2
|
+
import { onBuilt } from "./built-commands.js"
|
|
3
|
+
|
|
4
|
+
const marked = new WeakSet<Command>()
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Marks what a factory builds as upkeep: cli-core's commands that run the CLI itself (config, sign-in, the store,
|
|
8
|
+
* MCP), not the service. Only those built by the factory: a CLI's own command added later under one stays its own.
|
|
9
|
+
*/
|
|
10
|
+
export const upkeepCommand = <A extends unknown[], R>(factory: (...args: A) => R) =>
|
|
11
|
+
onBuilt(factory, (command) => {
|
|
12
|
+
marked.add(command)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const isUpkeep = (command: Command | undefined): boolean => command !== undefined && marked.has(command)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot"
|
|
2
|
-
import { count, id, reference, text } from "./fields.js"
|
|
2
|
+
import { about, count, id, reference, text } from "./fields.js"
|
|
3
3
|
|
|
4
4
|
export const attachment = v.strictObject({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
message: about(v.optional(reference), "The message it came with, as a locator; absent inside that message."),
|
|
6
|
+
kind: about(text, "Lower-cased: `photo`, `video`, `file`, `voice`…"),
|
|
7
|
+
position: about(
|
|
8
|
+
v.optional(count),
|
|
9
|
+
"Its place among the message's attachments, from 1, as `attachments show --attachment` takes it.",
|
|
10
|
+
),
|
|
11
11
|
url: v.optional(text),
|
|
12
12
|
name: v.optional(text),
|
|
13
13
|
title: v.optional(text),
|
|
@@ -15,33 +15,45 @@ export const attachment = v.strictObject({
|
|
|
15
15
|
size: v.optional(count),
|
|
16
16
|
width: v.optional(count),
|
|
17
17
|
height: v.optional(count),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** The text read out of it; how it was read is `extraction`. */
|
|
21
|
-
text: v.optional(text),
|
|
18
|
+
duration: about(v.optional(v.number()), "Seconds, for audio and video."),
|
|
19
|
+
text: about(v.optional(text), "The text read out of it; how it was read is `extraction`."),
|
|
22
20
|
extraction: v.optional(v.strictObject({ origin: text, extractor: text, chars: count, error: v.optional(text) })),
|
|
23
21
|
local_path: v.optional(text),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
contact: about(
|
|
23
|
+
v.optional(
|
|
24
|
+
v.strictObject({
|
|
25
|
+
name: text,
|
|
26
|
+
first_name: v.optional(text),
|
|
27
|
+
last_name: v.optional(text),
|
|
28
|
+
phone: v.optional(text),
|
|
29
|
+
user_id: v.optional(id),
|
|
30
|
+
}),
|
|
31
|
+
),
|
|
32
|
+
'A shared contact card (`kind: "contact"`); the phone is the whole number as the sender put it.',
|
|
33
33
|
),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
v.array(
|
|
34
|
+
buttons: about(
|
|
35
|
+
v.optional(
|
|
37
36
|
v.array(
|
|
38
|
-
v.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
v.array(
|
|
38
|
+
v.strictObject({
|
|
39
|
+
kind: v.picklist([
|
|
40
|
+
"callback",
|
|
41
|
+
"link",
|
|
42
|
+
"message",
|
|
43
|
+
"chat",
|
|
44
|
+
"contact",
|
|
45
|
+
"location",
|
|
46
|
+
"app",
|
|
47
|
+
"clipboard",
|
|
48
|
+
"other",
|
|
49
|
+
]),
|
|
50
|
+
text,
|
|
51
|
+
url: v.optional(text),
|
|
52
|
+
}),
|
|
53
|
+
),
|
|
43
54
|
),
|
|
44
55
|
),
|
|
56
|
+
"A bot's keyboard under the message, row by row; `messages press` presses one.",
|
|
45
57
|
),
|
|
46
58
|
})
|
|
47
59
|
|
|
@@ -51,6 +63,8 @@ export const hitFile = v.strictObject({
|
|
|
51
63
|
kind: text,
|
|
52
64
|
name: v.optional(text),
|
|
53
65
|
size: v.optional(count),
|
|
54
|
-
|
|
55
|
-
|
|
66
|
+
local_path: about(
|
|
67
|
+
v.optional(text),
|
|
68
|
+
"The saved copy on this computer, once `messages download` fetched it; absent until then.",
|
|
69
|
+
),
|
|
56
70
|
})
|
package/src/entities/chat.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot"
|
|
2
|
-
import { count, id, providerMetadata, reference, text, time } from "./fields.js"
|
|
2
|
+
import { about, count, id, providerMetadata, reference, text, time } from "./fields.js"
|
|
3
3
|
import { member } from "./member.js"
|
|
4
4
|
|
|
5
5
|
const setting = v.optional(v.nullable(v.boolean()))
|
|
6
6
|
|
|
7
7
|
export const chat = v.strictObject({
|
|
8
|
-
ref: reference,
|
|
8
|
+
ref: about(reference, "The chat's locator, `chat:<provider>/<account>/<chat>`."),
|
|
9
9
|
id,
|
|
10
10
|
provider: v.optional(text),
|
|
11
11
|
account: v.optional(text),
|
|
@@ -16,17 +16,14 @@ export const chat = v.strictObject({
|
|
|
16
16
|
last_message_at: v.nullable(time),
|
|
17
17
|
participants_count: v.nullable(count),
|
|
18
18
|
muted: v.optional(v.boolean()),
|
|
19
|
-
|
|
20
|
-
muted_until: v.optional(time),
|
|
19
|
+
muted_until: about(v.optional(time), "When the mute ends; absent with `muted` true is for good."),
|
|
21
20
|
archived: v.optional(v.boolean()),
|
|
22
|
-
|
|
23
|
-
marked_unread: v.optional(v.boolean()),
|
|
21
|
+
marked_unread: about(v.optional(v.boolean()), "The owner marked it unread, whatever `unread_count` says."),
|
|
24
22
|
membership_state: v.optional(v.picklist(["joined", "left", "public", "imported", "archived", "external"])),
|
|
25
23
|
parent_chat_id: v.optional(id),
|
|
26
24
|
scope: v.optional(v.picklist(["personal", "work"])),
|
|
27
25
|
provider_metadata: providerMetadata,
|
|
28
|
-
|
|
29
|
-
description: v.optional(v.nullable(text)),
|
|
26
|
+
description: about(v.optional(v.nullable(text)), "`chats show`, a group or channel: what it says about itself."),
|
|
30
27
|
invite_link: v.optional(v.nullable(text)),
|
|
31
28
|
settings: v.optional(
|
|
32
29
|
v.strictObject({
|
|
@@ -41,6 +38,8 @@ export const chat = v.strictObject({
|
|
|
41
38
|
disappearing_seconds: v.optional(v.nullable(count)),
|
|
42
39
|
}),
|
|
43
40
|
),
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
members: about(
|
|
42
|
+
v.optional(v.array(member)),
|
|
43
|
+
"`chats show`: absent when no roster is known; an empty list is a known empty roster.",
|
|
44
|
+
),
|
|
46
45
|
})
|
package/src/entities/contact.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from "valibot"
|
|
2
2
|
import { chat } from "./chat.js"
|
|
3
3
|
import { profileFields } from "./contact-read.js"
|
|
4
|
-
import { count, id, reference, text, time } from "./fields.js"
|
|
4
|
+
import { about, count, id, reference, text, time } from "./fields.js"
|
|
5
5
|
|
|
6
6
|
/** Somebody in a messenger's contact list. */
|
|
7
7
|
export const contact = v.strictObject({
|
|
@@ -11,29 +11,28 @@ export const contact = v.strictObject({
|
|
|
11
11
|
username: v.nullable(text),
|
|
12
12
|
alias: v.optional(v.nullable(text)),
|
|
13
13
|
display_name: v.optional(v.nullable(text)),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
last_messaged_at: v.nullable(time),
|
|
18
|
-
/** For a source that knows it, such as a Zoom contact. */
|
|
19
|
-
email: v.optional(v.nullable(text)),
|
|
14
|
+
description: about(v.nullable(text), "Whatever they wrote about themselves."),
|
|
15
|
+
last_messaged_at: about(v.nullable(time), "The newest message in a one-to-one chat with them."),
|
|
16
|
+
email: about(v.optional(v.nullable(text)), "For a source that knows it, such as a Zoom contact."),
|
|
20
17
|
phones: v.optional(v.array(v.strictObject({ number: text, label: v.nullable(text) }))),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}),
|
|
18
|
+
chats: about(
|
|
19
|
+
v.optional(
|
|
20
|
+
v.array(
|
|
21
|
+
v.strictObject({
|
|
22
|
+
...v.pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
|
|
23
|
+
their_messages: about(v.optional(count), "Their messages stored; a floor unless `complete`."),
|
|
24
|
+
first_at: v.optional(v.nullable(time)),
|
|
25
|
+
last_at: v.optional(v.nullable(time)),
|
|
26
|
+
complete: about(v.optional(v.boolean()), "The store holds the whole chat, so the count is the real one."),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
33
29
|
),
|
|
30
|
+
"`contacts show`: the chats shared with them, and what the store holds of their messages in each.",
|
|
34
31
|
),
|
|
35
32
|
/** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
|
|
36
33
|
...v.partial(v.strictObject(profileFields)).entries,
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
notes: about(
|
|
35
|
+
v.optional(v.array(v.strictObject({ id, text, revision: count, created_at: time, updated_at: time }))),
|
|
36
|
+
"`contacts show --with-notes`: the owner's private notes about them.",
|
|
37
|
+
),
|
|
39
38
|
})
|