@wirecat/notion-cli 0.5.0 → 0.7.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/CHANGELOG.md +47 -0
- package/README.md +5 -0
- package/contracts/wirecat.json +55 -2
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-AILW4JPO.js +42 -0
- package/dist/bundle/{all-profiles-V37KCXH3.js → all-profiles-CKOACXTW.js} +64 -21
- package/dist/bundle/{anthropic-Q4S3BYXD.js → anthropic-DWBBVTU3.js} +6 -6
- package/dist/bundle/{app-server-43SR3ACI.js → app-server-BHFYNCDE.js} +86 -65
- package/dist/bundle/{bun-M3J2QTR3.js → bun-ICK2XT7J.js} +2 -2
- package/dist/bundle/{bun-sqlite-EJ3W2PSV.js → bun-sqlite-LU5V5Y4A.js} +7 -7
- package/dist/bundle/{chunk-KHWOLBHQ.js → chunk-2OZVCNU5.js} +2 -2
- package/dist/bundle/{chunk-O5YB7FQD.js → chunk-2RNJ2JP3.js} +4 -4
- package/dist/bundle/{chunk-TP7GDWVF.js → chunk-364ET7LV.js} +1 -1
- package/dist/bundle/{chunk-TDNURSU6.js → chunk-3AKMIKND.js} +19 -19
- package/dist/bundle/{chunk-O3DYRCIT.js → chunk-3DGHBXH2.js} +1 -1
- package/dist/bundle/chunk-3KOJNZH3.js +80 -0
- package/dist/bundle/{chunk-DSP36YHQ.js → chunk-3T3OAYL4.js} +2 -2
- package/dist/bundle/{chunk-W7HM2VGO.js → chunk-3YXYA6HB.js} +1 -1
- package/dist/bundle/chunk-3ZSUVFR7.js +398 -0
- package/dist/bundle/{chunk-GCZ6MAEN.js → chunk-46JBCXLI.js} +43 -64
- package/dist/bundle/{chunk-DB2XKHI4.js → chunk-4FHKSSXQ.js} +2 -2
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-BNEE35WD.js → chunk-5NFIUY2P.js} +4 -4
- package/dist/bundle/{chunk-E5WLE7BM.js → chunk-63SW4UXG.js} +3 -4
- package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-64IK7JFO.js} +2 -2
- package/dist/bundle/{chunk-HZRQLAHO.js → chunk-6MQSBWWF.js} +1 -1
- package/dist/bundle/{chunk-2FJNMADN.js → chunk-6UZ5D2WP.js} +10 -10
- package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
- package/dist/bundle/chunk-7COTHS6G.js +388 -0
- package/dist/bundle/{chunk-TOSCB4SO.js → chunk-A3RJ6FD5.js} +29 -10
- package/dist/bundle/chunk-ADCAWRRX.js +2366 -0
- package/dist/bundle/{chunk-PPHBRESD.js → chunk-ALAPDLCP.js} +2 -2
- package/dist/bundle/{chunk-ONZVPE24.js → chunk-B6DJQBZI.js} +6 -6
- package/dist/bundle/{chunk-N2XADGL4.js → chunk-BFCRGLOF.js} +4 -4
- package/dist/bundle/{chunk-5P5TXU2K.js → chunk-BFHPT67P.js} +9581 -10764
- package/dist/bundle/{chunk-NA6QLHBZ.js → chunk-BQ6CXCLP.js} +10 -8
- package/dist/bundle/{chunk-JCKWQGCD.js → chunk-BXXHUO7Y.js} +110 -862
- package/dist/bundle/chunk-DCSPCOPB.js +221 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/chunk-EMIJVLOA.js +30 -0
- package/dist/bundle/{chunk-DFCHHR5M.js → chunk-EUF5JNPG.js} +1 -1
- package/dist/bundle/{chunk-RIGE67FR.js → chunk-EWXMIKZN.js} +43 -33
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-QYXWRKNA.js → chunk-FHYV4VWY.js} +16 -9
- package/dist/bundle/{chunk-WE4UFASG.js → chunk-FNESLLZS.js} +29 -1
- package/dist/bundle/chunk-FO3XY2Y2.js +108 -0
- package/dist/bundle/chunk-HJDQTM3T.js +353 -0
- package/dist/bundle/chunk-HOO53OYK.js +561 -0
- package/dist/bundle/{chunk-KHZ2RGXI.js → chunk-HSVKU4OJ.js} +153 -572
- package/dist/bundle/{chunk-CDK5E45T.js → chunk-IEY7KS6Q.js} +2 -100
- package/dist/bundle/{chunk-RJMQGG3P.js → chunk-ITW26OBI.js} +65 -49
- package/dist/bundle/{chunk-FBZI4Z3Z.js → chunk-ITWINZ6R.js} +13 -26
- package/dist/bundle/{chunk-J3NKZ6MO.js → chunk-IYZWHCZJ.js} +155 -435
- package/dist/bundle/{chunk-W53EJOFQ.js → chunk-J3DZVB67.js} +1 -1
- package/dist/bundle/{chunk-FKA7DOCK.js → chunk-JEZJFQQW.js} +1 -1
- package/dist/bundle/chunk-JPGN473W.js +50 -0
- package/dist/bundle/{chunk-NTG657MI.js → chunk-JVRBW5LH.js} +7 -64
- package/dist/bundle/chunk-KBY42GKW.js +785 -0
- package/dist/bundle/{chunk-DO7BLXO3.js → chunk-KWBLDSRV.js} +16 -3
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-PWRRDDMZ.js → chunk-LBRTLZHI.js} +249 -555
- package/dist/bundle/{chunk-B3FSLAIU.js → chunk-LEPPRULN.js} +20 -6
- package/dist/bundle/{chunk-WPP76PSX.js → chunk-LVAFTQ45.js} +32 -24
- package/dist/bundle/{chunk-PAW6RRCW.js → chunk-MB4HXDBT.js} +8 -210
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-UZSBGECU.js → chunk-N3NJPHZB.js} +1 -65
- package/dist/bundle/{chunk-BWLBSQSU.js → chunk-NCCRLAAI.js} +4 -4
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-H3E2PZ5Y.js → chunk-NV7NNL5T.js} +7 -7
- package/dist/bundle/chunk-OALFRUMI.js +67 -0
- package/dist/bundle/{chunk-CWXOXIWS.js → chunk-OCGNOJYD.js} +1 -1
- package/dist/bundle/chunk-OFMCU3BH.js +72 -0
- package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
- package/dist/bundle/{chunk-E2AFUJDR.js → chunk-OP2BH55P.js} +3 -3
- package/dist/bundle/{chunk-P5BHKKBI.js → chunk-OS4WPXPZ.js} +4 -4
- package/dist/bundle/{chunk-XUPN2EHR.js → chunk-OW5HW3TD.js} +23 -7
- package/dist/bundle/{chunk-ECC2UX7X.js → chunk-PDVXG3T3.js} +6 -6
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-G2MJYXZG.js → chunk-PSMRUOII.js} +4 -4
- package/dist/bundle/{chunk-DBEQI5YM.js → chunk-QK52ARAU.js} +3 -3
- package/dist/bundle/{chunk-QWYMXFKM.js → chunk-QMNEDK7Z.js} +3 -3
- package/dist/bundle/chunk-R4JV3VLU.js +714 -0
- package/dist/bundle/{chunk-C32AKHTY.js → chunk-REOBWSGV.js} +35 -12
- package/dist/bundle/{chunk-X2M6NIQG.js → chunk-RNVYNPXT.js} +1 -1
- package/dist/bundle/{chunk-HHVFIXDO.js → chunk-RXGX2CZX.js} +399 -399
- package/dist/bundle/{chunk-W5JZMXGW.js → chunk-S35UJBFZ.js} +75 -75
- package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
- package/dist/bundle/chunk-S5P7THM5.js +72 -0
- package/dist/bundle/{chunk-NE43YXKL.js → chunk-SRVTGI3M.js} +3 -3
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/chunk-TWY543BS.js +39 -0
- package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
- package/dist/bundle/{chunk-3RL2MIUF.js → chunk-UO4O6WQ4.js} +8 -8
- package/dist/bundle/chunk-UPL474OW.js +94 -0
- package/dist/bundle/chunk-UQVUXG7H.js +594 -0
- package/dist/bundle/chunk-UYEDQGMI.js +340 -0
- package/dist/bundle/chunk-VNWF4I7E.js +34 -0
- package/dist/bundle/{chunk-FPUGMDJV.js → chunk-VRBEYOJL.js} +1 -1
- package/dist/bundle/{chunk-BBSFQ3PU.js → chunk-VXKD533R.js} +1646 -1337
- package/dist/bundle/{chunk-ECEZOLOD.js → chunk-VYZ2J7DT.js} +4 -4
- package/dist/bundle/{chunk-TD2JZ25O.js → chunk-WJFQMOVM.js} +113 -80
- package/dist/bundle/{chunk-MNRMKWCN.js → chunk-WUNEJRLJ.js} +6 -6
- package/dist/bundle/chunk-WVN2KTNS.js +52 -0
- package/dist/bundle/{chunk-GTY6N5KZ.js → chunk-X5LUHN62.js} +2 -2
- package/dist/bundle/{chunk-LBYGJKXW.js → chunk-X737FHZP.js} +4 -4
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/chunk-YSF5JBRA.js +36 -0
- package/dist/bundle/{chunk-QIG55MZH.js → chunk-ZGUUP2T3.js} +12 -12
- package/dist/bundle/{chunk-AT5I34AN.js → chunk-ZMKAI3F3.js} +3 -3
- package/dist/bundle/command-contract-C2CF4QAH.js +41 -0
- package/dist/bundle/{command-server-entry-LJ627ZUA.js → command-server-entry-F3B2KSPO.js} +30 -27
- package/dist/bundle/{decode-PX2LZ5Y2.js → decode-FDHFF7GC.js} +6 -6
- package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
- package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-IXKG5Z5Y.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FVTUDXDU.js → echarts-PGJPVPA4.js} +2 -2
- package/dist/bundle/{embed-CCSDK43I.js → embed-U6X7CNNK.js} +7 -7
- package/dist/bundle/{embedder-VHI4DHB7.js → embedder-3ROL6ROQ.js} +10 -10
- package/dist/bundle/{failure-FZ6VYKEQ.js → failure-IYMRXM2X.js} +3 -3
- package/dist/bundle/first-run-PNVNHGR7.js +29 -0
- package/dist/bundle/first-screen-DEDD64YH.js +41 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
- package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
- package/dist/bundle/{instructions-HET7BCYK.js → instructions-MJQWRI2D.js} +1 -1
- package/dist/bundle/{mcp-RGNRW77S.js → mcp-JNHOSK4L.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
- package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
- package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
- package/dist/bundle/meeting-combined-HEC25QPY.js +25 -0
- package/dist/bundle/meeting-model-R7QPDNZZ.js +27 -0
- package/dist/bundle/{meeting-semantic-UD26T37N.js → meeting-semantic-7WPLMBNT.js} +7 -7
- package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
- package/dist/bundle/{node-CXZIFHZC.js → node-3UXNV3CD.js} +2 -2
- package/dist/bundle/{node-sqlite-ME7KMORI.js → node-sqlite-ULWDWM3I.js} +8 -8
- package/dist/bundle/notes-search-7PE3E3C7.js +64 -0
- package/dist/bundle/notion.js +14 -14
- package/dist/bundle/oauth-LNUZMA72.js +20 -0
- package/dist/bundle/{open-HA6D3SXR.js → open-HGHC35M4.js} +6 -6
- package/dist/bundle/{openai-H5AJPZBX.js → openai-ISSP57MV.js} +21 -18
- package/dist/bundle/{process-5RUXWGYS.js → process-PB2WCOR2.js} +1 -1
- package/dist/bundle/{program-F3NBTZ7J.js → program-GASBJRMG.js} +7574 -7047
- package/dist/bundle/{prompt-6XSUOLHK.js → prompt-3VGQVX2B.js} +6 -6
- package/dist/bundle/{recognize-2Y7AUVGG.js → recognize-7Q2P3NME.js} +5 -5
- package/dist/bundle/{remote-KCABPXQ3.js → remote-BBAWKVIT.js} +12 -11
- package/dist/bundle/{rerank-BTN7LUVA.js → rerank-H4PUS4HV.js} +8 -8
- package/dist/bundle/{schemas-VVLTLMXS.js → schemas-TTVUADHT.js} +39 -60
- package/dist/bundle/{serve-CYEMVRFC.js → serve-FZNSKY7R.js} +11 -11
- package/dist/bundle/{server-WFIICGMI.js → server-BRRNDW6L.js} +78 -56
- package/dist/bundle/server-CQJ4LKAZ.js +90 -0
- package/dist/bundle/{services-L4W6ZWDG.js → services-PEU557KZ.js} +103 -88
- package/dist/bundle/{sqlite-runtime-IKMYLRQC.js → sqlite-runtime-4IZJ4YUM.js} +7 -7
- package/dist/bundle/{state-LMUP636P.js → state-MX3JVT5Q.js} +7 -7
- package/dist/bundle/{store-W2JC2JP4.js → store-JUT34REM.js} +24 -20
- package/dist/bundle/{store-A2QZFBOX.js → store-PP4BPADZ.js} +30 -18
- package/dist/bundle/store-maintenance-command-GRFTJBSB.js +77 -0
- package/dist/bundle/surface-FPWES3NY.js +76 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +22 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/api.d.ts +7 -2
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +19 -141
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +14 -6
- package/dist/commands/library.js.map +1 -1
- package/dist/config.d.ts +11 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +63 -54
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +11 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +20 -7
- package/dist/context.js.map +1 -1
- package/dist/generated/definitions.d.ts.map +1 -1
- package/dist/generated/definitions.js +72 -18
- package/dist/generated/definitions.js.map +1 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +49 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +32 -32
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/types.d.ts +125 -25
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/generated/wirecat-config.d.ts +13 -0
- package/dist/generated/wirecat-config.d.ts.map +1 -0
- package/dist/generated/wirecat-config.js +82 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/library.d.ts +3 -0
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +11 -1
- package/dist/library.js.map +1 -1
- package/dist/notion/client.d.ts +2 -6
- package/dist/notion/client.d.ts.map +1 -1
- package/dist/notion/client.js +7 -8
- package/dist/notion/client.js.map +1 -1
- package/dist/notion/errors.d.ts +5 -0
- package/dist/notion/errors.d.ts.map +1 -1
- package/dist/notion/errors.js +21 -1
- package/dist/notion/errors.js.map +1 -1
- package/dist/notion/port.d.ts +10 -0
- package/dist/notion/port.d.ts.map +1 -1
- package/dist/notion/port.js +19 -0
- package/dist/notion/port.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -0
- package/dist/program.js.map +1 -1
- package/dist/sync/files.d.ts +12 -0
- package/dist/sync/files.d.ts.map +1 -1
- package/dist/sync/files.js.map +1 -1
- package/dist/sync/from-config.d.ts +13 -0
- package/dist/sync/from-config.d.ts.map +1 -0
- package/dist/sync/from-config.js +32 -0
- package/dist/sync/from-config.js.map +1 -0
- package/dist/sync/source.d.ts +2 -1
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +48 -48
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +4 -1
- package/dist/sync/users.d.ts.map +1 -1
- package/dist/sync/users.js +3 -1
- package/dist/sync/users.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -8
- package/dist/bundle/chunk-6EOZTUHT.js +0 -726
- package/dist/bundle/command-contract-TVRFW2IX.js +0 -38
- package/dist/bundle/first-run-7JKE5AHN.js +0 -29
- package/dist/bundle/first-screen-ZROHOEYJ.js +0 -38
- package/dist/bundle/meeting-combined-SSTOJUIJ.js +0 -24
- package/dist/bundle/meeting-model-K7TPS4S5.js +0 -26
- package/dist/bundle/oauth-XBTROXHB.js +0 -20
- package/dist/bundle/server-UC2FNNXX.js +0 -72
- package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +0 -63
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
|
|
4
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/ports/wirecat-tools.js
|
|
5
5
|
var WIRECAT_TOOLS = [
|
|
6
6
|
{
|
|
7
7
|
command: "tg",
|
|
@@ -67,6 +67,13 @@ var WIRECAT_TOOLS = [
|
|
|
67
67
|
package: "@wirecat/bitrix24-cli",
|
|
68
68
|
does: "Bitrix24 CRM: deals, leads and pipelines, searchable with your other WireCat data"
|
|
69
69
|
},
|
|
70
|
+
{
|
|
71
|
+
command: "amo",
|
|
72
|
+
appName: "amo-cli",
|
|
73
|
+
envPrefix: "AMO",
|
|
74
|
+
package: "@wirecat/amo-cli",
|
|
75
|
+
does: "amoCRM and Kommo: deals, contacts and companies, searchable with your other WireCat data"
|
|
76
|
+
},
|
|
70
77
|
{
|
|
71
78
|
command: "pbx",
|
|
72
79
|
appName: "asterisk-cli",
|
|
@@ -80,6 +87,27 @@ var WIRECAT_TOOLS = [
|
|
|
80
87
|
envPrefix: "WCNOTION",
|
|
81
88
|
package: "@wirecat/notion-cli",
|
|
82
89
|
does: "Notion pages and databases as local text, searchable with your other WireCat data"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
command: "ydisk",
|
|
93
|
+
appName: "yandex-disk-cli",
|
|
94
|
+
envPrefix: "YDISK",
|
|
95
|
+
package: "@wirecat/yandex-disk-cli",
|
|
96
|
+
does: "Yandex Disk folders as local text, searchable with your other WireCat data"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
command: "wordpress",
|
|
100
|
+
appName: "wordpress-cli",
|
|
101
|
+
envPrefix: "WCWP",
|
|
102
|
+
package: "@wirecat/wordpress-cli",
|
|
103
|
+
does: "WordPress posts and pages, searchable with your other WireCat data"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
command: "linear",
|
|
107
|
+
appName: "linear-cli",
|
|
108
|
+
envPrefix: "WCLINEAR",
|
|
109
|
+
package: "@wirecat/linear-cli",
|
|
110
|
+
does: "Linear issues and projects, searchable with your other WireCat data"
|
|
83
111
|
}
|
|
84
112
|
];
|
|
85
113
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CLIENT_INFO_META_KEY
|
|
5
|
+
} from "./chunk-PL5P7UKW.js";
|
|
6
|
+
import {
|
|
7
|
+
agentOf,
|
|
8
|
+
clientHash,
|
|
9
|
+
currentCaller
|
|
10
|
+
} from "./chunk-BQ6CXCLP.js";
|
|
11
|
+
import {
|
|
12
|
+
__name
|
|
13
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
14
|
+
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
16
|
+
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
17
|
+
const client = caller?.agent?.client?.name;
|
|
18
|
+
if (client && client !== "unknown")
|
|
19
|
+
return client;
|
|
20
|
+
const kind = caller?.agent?.kind;
|
|
21
|
+
return kind && kind !== "mcp-client" ? kind : fallback;
|
|
22
|
+
}, "callingAgent");
|
|
23
|
+
var CALLER_META_KEY = "wirecat.dev/caller";
|
|
24
|
+
var PROXY_CLIENT_NAME = "all-profiles";
|
|
25
|
+
var NAME = /^[\w .@()/+-]{1,64}$/;
|
|
26
|
+
var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
|
|
27
|
+
var clientFrom = /* @__PURE__ */ __name((value) => {
|
|
28
|
+
if (!value || typeof value !== "object")
|
|
29
|
+
return void 0;
|
|
30
|
+
const { name, version } = value;
|
|
31
|
+
const named = plain(name);
|
|
32
|
+
if (!named)
|
|
33
|
+
return void 0;
|
|
34
|
+
const versioned = plain(version);
|
|
35
|
+
return { name: named, ...versioned ? { version: versioned } : {} };
|
|
36
|
+
}, "clientFrom");
|
|
37
|
+
var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
|
|
38
|
+
const meta = ctx?.mcpReq?._meta;
|
|
39
|
+
const requestId = ctx?.mcpReq?.id;
|
|
40
|
+
const initialized = source.client?.();
|
|
41
|
+
const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
|
|
42
|
+
if (proxied)
|
|
43
|
+
return proxied;
|
|
44
|
+
const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
|
|
45
|
+
const mcp = /* @__PURE__ */ __name((connection) => ({
|
|
46
|
+
tool,
|
|
47
|
+
...requestId === void 0 ? {} : { request_id: String(requestId) },
|
|
48
|
+
...connection ? { connection_id: connection } : {}
|
|
49
|
+
}), "mcp");
|
|
50
|
+
const auth = ctx?.http?.authInfo;
|
|
51
|
+
if (auth) {
|
|
52
|
+
const registered = plain(auth.extra?.clientName);
|
|
53
|
+
return {
|
|
54
|
+
via: "mcp-http",
|
|
55
|
+
agent: {
|
|
56
|
+
kind: "mcp-client",
|
|
57
|
+
session_id: ctx?.sessionId ?? null,
|
|
58
|
+
client: {
|
|
59
|
+
name: registered ?? client?.name ?? "unknown",
|
|
60
|
+
...client?.version ? { version: client.version } : {},
|
|
61
|
+
id: clientHash(auth.clientId)
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
mcp: mcp(ctx?.sessionId)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
|
|
68
|
+
return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
|
|
69
|
+
}, "callerOf");
|
|
70
|
+
var passedOn = /* @__PURE__ */ __name((value, tool) => {
|
|
71
|
+
if (!value || typeof value !== "object")
|
|
72
|
+
return void 0;
|
|
73
|
+
const { via, agent, mcp } = value;
|
|
74
|
+
if (via !== "mcp-stdio" && via !== "mcp-http")
|
|
75
|
+
return void 0;
|
|
76
|
+
const a = agent && typeof agent === "object" ? agent : void 0;
|
|
77
|
+
const kind = plain(a?.kind);
|
|
78
|
+
const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
|
|
79
|
+
const client = clientFrom(a?.client);
|
|
80
|
+
const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
|
|
81
|
+
const m = mcp && typeof mcp === "object" ? mcp : {};
|
|
82
|
+
const request = plain(m.request_id);
|
|
83
|
+
const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
|
|
84
|
+
return {
|
|
85
|
+
via,
|
|
86
|
+
...kind ? {
|
|
87
|
+
agent: {
|
|
88
|
+
kind,
|
|
89
|
+
session_id: session,
|
|
90
|
+
...a?.from_chat === true ? { from_chat: true } : {},
|
|
91
|
+
...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
|
|
92
|
+
}
|
|
93
|
+
} : {},
|
|
94
|
+
mcp: {
|
|
95
|
+
tool,
|
|
96
|
+
...request ? { request_id: request } : {},
|
|
97
|
+
...connection ? { connection_id: connection } : {},
|
|
98
|
+
proxied: true
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, "passedOn");
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
callingAgent,
|
|
105
|
+
CALLER_META_KEY,
|
|
106
|
+
PROXY_CLIENT_NAME,
|
|
107
|
+
callerOf
|
|
108
|
+
};
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
AUDIT_MIN_SCORE
|
|
5
|
+
} from "./chunk-BFHPT67P.js";
|
|
6
|
+
import {
|
|
7
|
+
LIST_QUERY_GUIDE,
|
|
8
|
+
nativeTerms
|
|
9
|
+
} from "./chunk-R4JV3VLU.js";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_CONFIG,
|
|
12
|
+
environmentOf,
|
|
13
|
+
itemOf,
|
|
14
|
+
listOf,
|
|
15
|
+
nextStep,
|
|
16
|
+
renderAnswer,
|
|
17
|
+
snakeKeys,
|
|
18
|
+
withAgentLevels
|
|
19
|
+
} from "./chunk-LBRTLZHI.js";
|
|
20
|
+
import {
|
|
21
|
+
formatReference
|
|
22
|
+
} from "./chunk-BXXHUO7Y.js";
|
|
23
|
+
import {
|
|
24
|
+
queryError
|
|
25
|
+
} from "./chunk-RXGX2CZX.js";
|
|
26
|
+
import {
|
|
27
|
+
CliError
|
|
28
|
+
} from "./chunk-4FHKSSXQ.js";
|
|
29
|
+
import {
|
|
30
|
+
__name
|
|
31
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
32
|
+
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
34
|
+
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
35
|
+
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
36
|
+
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
37
|
+
return Number(value);
|
|
38
|
+
}, "positiveCount");
|
|
39
|
+
var configuredLimit = /* @__PURE__ */ __name((command, most = Number.POSITIVE_INFINITY) => {
|
|
40
|
+
const { resolveSettings, env } = environmentOf(command);
|
|
41
|
+
const { limit: _typed, ...flags } = command.optsWithGlobals();
|
|
42
|
+
const configured = resolveSettings?.(flags, { needsProfile: false, ...env ? { env } : {} }).limit ?? DEFAULT_CONFIG.defaults.limit;
|
|
43
|
+
return Math.min(configured, most);
|
|
44
|
+
}, "configuredLimit");
|
|
45
|
+
var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
|
|
46
|
+
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
47
|
+
var pagingOf = /* @__PURE__ */ __name((command) => {
|
|
48
|
+
const environment = environmentOf(command);
|
|
49
|
+
const flags = command.optsWithGlobals();
|
|
50
|
+
if (!environment.resolveSettings)
|
|
51
|
+
return { limit: flags.limit ?? DEFAULT_CONFIG.defaults.limit, page: flags.page ?? 1 };
|
|
52
|
+
const { limit, page } = environment.resolveSettings(withAgentLevels(command, command.optsWithGlobals()), {
|
|
53
|
+
env: environment.env ?? process.env,
|
|
54
|
+
needsProfile: false,
|
|
55
|
+
readOnly: true
|
|
56
|
+
});
|
|
57
|
+
return { limit: limit ?? DEFAULT_CONFIG.defaults.limit, page: page ?? 1 };
|
|
58
|
+
}, "pagingOf");
|
|
59
|
+
|
|
60
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
61
|
+
var defined = /* @__PURE__ */ __name((record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== void 0)), "defined");
|
|
62
|
+
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
63
|
+
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
64
|
+
all_can_pin: settings.allCanPin,
|
|
65
|
+
only_admins_add: settings.onlyAdminsAdd,
|
|
66
|
+
only_admins_call: settings.onlyAdminsCall,
|
|
67
|
+
only_owner_edits_info: settings.onlyOwnerEditsInfo,
|
|
68
|
+
members_see_link: settings.membersSeeLink,
|
|
69
|
+
join_approval: settings.joinApproval,
|
|
70
|
+
only_admins_send: settings.onlyAdminsSend,
|
|
71
|
+
only_admins_edit_info: settings.onlyAdminsEditInfo,
|
|
72
|
+
disappearing_seconds: settings.disappearingSeconds
|
|
73
|
+
}), "settingsOf");
|
|
74
|
+
var chatAnswer = /* @__PURE__ */ __name((account, chat) => defined({
|
|
75
|
+
ref: chatRef(account, chat.id),
|
|
76
|
+
id: chat.id,
|
|
77
|
+
title: chat.title,
|
|
78
|
+
kind: chat.kind,
|
|
79
|
+
unread_count: chat.unreadCount,
|
|
80
|
+
unread_mentions: chat.unreadMentions,
|
|
81
|
+
last_message_at: chat.lastMessageAt,
|
|
82
|
+
participants_count: chat.participantsCount,
|
|
83
|
+
muted: chat.muted,
|
|
84
|
+
muted_until: chat.mutedUntil ?? void 0,
|
|
85
|
+
archived: chat.archived,
|
|
86
|
+
marked_unread: chat.markedUnread,
|
|
87
|
+
membership_state: chat.membershipState,
|
|
88
|
+
parent_chat_id: chat.parentChatId ?? void 0,
|
|
89
|
+
scope: chat.scope,
|
|
90
|
+
provider_metadata: chat.providerMetadata,
|
|
91
|
+
description: chat.description,
|
|
92
|
+
invite_link: chat.link,
|
|
93
|
+
settings: chat.settings ? settingsOf(chat.settings) : void 0,
|
|
94
|
+
members: chat.members?.map(memberAnswer)
|
|
95
|
+
}), "chatAnswer");
|
|
96
|
+
var memberAnswer = /* @__PURE__ */ __name((member) => {
|
|
97
|
+
const group = member;
|
|
98
|
+
return defined({
|
|
99
|
+
id: member.id,
|
|
100
|
+
name: member.name,
|
|
101
|
+
username: member.username,
|
|
102
|
+
role: group.role,
|
|
103
|
+
last_seen_at: group.lastSeenAt,
|
|
104
|
+
registered_at: group.registeredAt,
|
|
105
|
+
joined_at: group.joinedAt,
|
|
106
|
+
invited_by: group.invitedBy,
|
|
107
|
+
is_bot: group.isBot,
|
|
108
|
+
deleted: group.deleted,
|
|
109
|
+
flagged: group.flagged,
|
|
110
|
+
has_photo: group.hasPhoto,
|
|
111
|
+
score: group.score,
|
|
112
|
+
reasons: group.reasons,
|
|
113
|
+
check: group.check ? snakeKeys(group.check) : void 0
|
|
114
|
+
});
|
|
115
|
+
}, "memberAnswer");
|
|
116
|
+
var contactRef = /* @__PURE__ */ __name((provider, id) => formatReference({ type: "contact", provider, id }), "contactRef");
|
|
117
|
+
var contactAnswer = /* @__PURE__ */ __name((account, contact) => {
|
|
118
|
+
const card = contact;
|
|
119
|
+
return defined({
|
|
120
|
+
ref: contactRef(account.provider, contact.id),
|
|
121
|
+
id: contact.id,
|
|
122
|
+
name: contact.name,
|
|
123
|
+
username: contact.username,
|
|
124
|
+
alias: contact.alias,
|
|
125
|
+
display_name: contact.displayName,
|
|
126
|
+
description: contact.description,
|
|
127
|
+
last_messaged_at: contact.lastMessagedAt,
|
|
128
|
+
chats: card.chats?.map((chat) => ({
|
|
129
|
+
ref: chatRef(account, chat.id),
|
|
130
|
+
id: chat.id,
|
|
131
|
+
title: chat.title,
|
|
132
|
+
kind: chat.kind,
|
|
133
|
+
last_message_at: chat.lastMessageAt
|
|
134
|
+
})),
|
|
135
|
+
notes: card.notes?.map(({ id, text, revision, createdAt, updatedAt }) => ({
|
|
136
|
+
id,
|
|
137
|
+
text,
|
|
138
|
+
revision,
|
|
139
|
+
created_at: createdAt,
|
|
140
|
+
updated_at: updatedAt
|
|
141
|
+
}))
|
|
142
|
+
});
|
|
143
|
+
}, "contactAnswer");
|
|
144
|
+
var contactShown = /* @__PURE__ */ __name((account, card, profile) => {
|
|
145
|
+
const { id: _id, name: _name, bio, chats, ...facts } = profile;
|
|
146
|
+
const listed = new Map(card.chats.map((chat) => [chat.id, chat]));
|
|
147
|
+
const active = new Set(chats.map(({ id }) => id));
|
|
148
|
+
const shared = [
|
|
149
|
+
...chats.map((chat) => ({
|
|
150
|
+
ref: chatRef(account, chat.id),
|
|
151
|
+
id: chat.id,
|
|
152
|
+
title: chat.title,
|
|
153
|
+
kind: chat.kind,
|
|
154
|
+
last_message_at: listed.get(chat.id)?.lastMessageAt ?? chat.lastAt,
|
|
155
|
+
their_messages: chat.theirMessages,
|
|
156
|
+
first_at: chat.firstAt,
|
|
157
|
+
last_at: chat.lastAt,
|
|
158
|
+
complete: chat.complete
|
|
159
|
+
})),
|
|
160
|
+
...card.chats.filter(({ id }) => !active.has(id)).map((chat) => ({
|
|
161
|
+
ref: chatRef(account, chat.id),
|
|
162
|
+
id: chat.id,
|
|
163
|
+
title: chat.title,
|
|
164
|
+
kind: chat.kind,
|
|
165
|
+
last_message_at: chat.lastMessageAt
|
|
166
|
+
}))
|
|
167
|
+
];
|
|
168
|
+
const answer = contactAnswer(account, card);
|
|
169
|
+
return {
|
|
170
|
+
...answer,
|
|
171
|
+
...snakeKeys(facts),
|
|
172
|
+
description: answer.description ?? bio,
|
|
173
|
+
chats: shared
|
|
174
|
+
};
|
|
175
|
+
}, "contactShown");
|
|
176
|
+
var chatEventAnswer = /* @__PURE__ */ __name((chatId, event) => defined({
|
|
177
|
+
chat_id: chatId,
|
|
178
|
+
time: event.timestamp,
|
|
179
|
+
type: event.event,
|
|
180
|
+
message_id: event.messageId,
|
|
181
|
+
by: event.by,
|
|
182
|
+
people: event.people,
|
|
183
|
+
title: event.title
|
|
184
|
+
}), "chatEventAnswer");
|
|
185
|
+
var HISTORY_TYPES = { joined: "join", left: "leave", changed: "profile" };
|
|
186
|
+
var memberEventAnswer = /* @__PURE__ */ __name((chatId, event) => defined({
|
|
187
|
+
chat_id: chatId,
|
|
188
|
+
time: event.at,
|
|
189
|
+
type: HISTORY_TYPES[event.event],
|
|
190
|
+
by: event.invitedBy === void 0 ? void 0 : { id: event.invitedBy, name: null },
|
|
191
|
+
people: [{ id: event.id, name: event.name, username: event.username }],
|
|
192
|
+
before: event.before ? { name: event.before.name, username: event.before.username } : void 0
|
|
193
|
+
}), "memberEventAnswer");
|
|
194
|
+
var inviteLinkAnswer = /* @__PURE__ */ __name((link) => defined({
|
|
195
|
+
link: link.link,
|
|
196
|
+
approval: link.approval,
|
|
197
|
+
expires_at: link.expiresAt,
|
|
198
|
+
max_uses: link.maxUses,
|
|
199
|
+
primary: link.primary,
|
|
200
|
+
revoked: link.revoked,
|
|
201
|
+
pending_count: link.pending,
|
|
202
|
+
joined_count: link.joined
|
|
203
|
+
}), "inviteLinkAnswer");
|
|
204
|
+
var joinRequestAnswer = /* @__PURE__ */ __name((request) => defined({
|
|
205
|
+
person_id: request.person.id,
|
|
206
|
+
name: request.person.name,
|
|
207
|
+
username: request.person.username,
|
|
208
|
+
requested_at: request.requestedAt,
|
|
209
|
+
about: request.about
|
|
210
|
+
}), "joinRequestAnswer");
|
|
211
|
+
var pollVoteAnswer = /* @__PURE__ */ __name((vote) => ({
|
|
212
|
+
person_id: vote.person.id,
|
|
213
|
+
name: vote.person.name,
|
|
214
|
+
username: vote.person.username,
|
|
215
|
+
answers: vote.answers,
|
|
216
|
+
voted_at: vote.votedAt
|
|
217
|
+
}), "pollVoteAnswer");
|
|
218
|
+
var reactorAnswer = /* @__PURE__ */ __name((reactor) => ({
|
|
219
|
+
person: { id: reactor.person.id, name: reactor.person.name, username: reactor.person.username },
|
|
220
|
+
reaction: reactor.reaction,
|
|
221
|
+
reacted_at: reactor.reactedAt
|
|
222
|
+
}), "reactorAnswer");
|
|
223
|
+
var topicAnswer = /* @__PURE__ */ __name((topic) => defined({
|
|
224
|
+
id: topic.id,
|
|
225
|
+
title: topic.title,
|
|
226
|
+
closed: topic.closed,
|
|
227
|
+
pinned: topic.pinned,
|
|
228
|
+
hidden: topic.hidden,
|
|
229
|
+
unread_count: topic.unreadCount,
|
|
230
|
+
last_message_at: topic.lastMessageAt,
|
|
231
|
+
created_at: topic.createdAt,
|
|
232
|
+
untrusted: ["title"]
|
|
233
|
+
}), "topicAnswer");
|
|
234
|
+
var folderAnswer = /* @__PURE__ */ __name((folder) => {
|
|
235
|
+
const shown = "chats" in folder ? folder : void 0;
|
|
236
|
+
const listed = shown ? void 0 : folder;
|
|
237
|
+
return defined({
|
|
238
|
+
id: folder.id,
|
|
239
|
+
title: folder.title,
|
|
240
|
+
chat_ids: listed ? listed.chatIds : shown?.chats.map((chat) => chat.id) ?? [],
|
|
241
|
+
emoji: folder.emoji,
|
|
242
|
+
include: folder.include,
|
|
243
|
+
skip: folder.skip,
|
|
244
|
+
excluded_chat_ids: listed?.excludedChatIds ?? shown?.excluded.map((chat) => chat.id),
|
|
245
|
+
pinned_chat_ids: listed?.pinnedChatIds ?? shown?.pinned.map((chat) => chat.id),
|
|
246
|
+
chats: shown?.chats,
|
|
247
|
+
pinned_chats: shown?.pinned,
|
|
248
|
+
excluded_chats: shown?.excluded
|
|
249
|
+
});
|
|
250
|
+
}, "folderAnswer");
|
|
251
|
+
var lines = /* @__PURE__ */ __name((line) => (body) => (body.items ?? (body.item === void 0 ? [] : [body.item])).map((item) => `${line(item).trimEnd()}
|
|
252
|
+
`).join(""), "lines");
|
|
253
|
+
var pageOf = /* @__PURE__ */ __name(({ limit, page, all }, { items, hasMore }) => all ? { limit: Math.max(1, items.length), has_more: false, page: 1 } : { limit, has_more: hasMore, page }, "pageOf");
|
|
254
|
+
var wholeList = /* @__PURE__ */ __name((command, items, extra = {}) => listOf(command, { items, limit: Math.max(1, items.length), has_more: false, ...extra }), "wholeList");
|
|
255
|
+
var chatShown = /* @__PURE__ */ __name((account, card) => {
|
|
256
|
+
const listed = card.members?.length;
|
|
257
|
+
const short = listed !== void 0 && card.participantsCount !== null && listed < card.participantsCount;
|
|
258
|
+
return itemOf(chatAnswer(account, card), short ? {
|
|
259
|
+
missing: [
|
|
260
|
+
{
|
|
261
|
+
field: "members",
|
|
262
|
+
why: `${listed} listed; the chat reports ${card.participantsCount} \u2014 the list may omit your account or be partial`,
|
|
263
|
+
step: "chats.members"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
next: [nextStep("chats.members", { args: { chat: card.id } })]
|
|
267
|
+
} : {});
|
|
268
|
+
}, "chatShown");
|
|
269
|
+
var scoreFloor = /* @__PURE__ */ __name((ast) => {
|
|
270
|
+
const term = nativeTerms(ast, "chats members check").get("score");
|
|
271
|
+
if (!term)
|
|
272
|
+
return AUDIT_MIN_SCORE;
|
|
273
|
+
const upper = term.operator === "range" ? term.upper ?? "*" : term.value;
|
|
274
|
+
if (term.operator !== "range" || upper !== "*")
|
|
275
|
+
queryError("query.unsupported-operator", term.span, "score takes a lower bound: score>=3", {
|
|
276
|
+
command: "chats members check",
|
|
277
|
+
guide: LIST_QUERY_GUIDE
|
|
278
|
+
});
|
|
279
|
+
const floor = Number(term.value);
|
|
280
|
+
return Math.ceil(term.lower_inclusive === false ? floor + 1 : floor);
|
|
281
|
+
}, "scoreFloor");
|
|
282
|
+
var auditAnswer = /* @__PURE__ */ __name((audit) => wholeList("chats members check", audit.items.map(memberAnswer), {
|
|
283
|
+
...audit.more ? { meta: { truncated: true } } : {},
|
|
284
|
+
...audit.completeness && audit.completeness.state !== "complete" ? {
|
|
285
|
+
missing: [
|
|
286
|
+
{
|
|
287
|
+
field: "reasons",
|
|
288
|
+
why: "never_wrote counts only stored messages, and the store does not hold the chat whole",
|
|
289
|
+
...audit.fetch ? { step: "messages.sync" } : {}
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
...audit.fetch ? { next: [nextStep("messages.sync", { args: { chat: audit.chatId } })] } : {}
|
|
293
|
+
} : {}
|
|
294
|
+
}), "auditAnswer");
|
|
295
|
+
var renderItem = /* @__PURE__ */ __name((command, output, value, next = []) => renderAnswer(command, output, itemOf(snakeKeys(value), { next })), "renderItem");
|
|
296
|
+
var withPage = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")), "withPage");
|
|
297
|
+
var documentLinkAnswer = /* @__PURE__ */ __name(({ url, documentId, title, inStore, locator, sentAt, sender }) => ({
|
|
298
|
+
url,
|
|
299
|
+
document_id: documentId,
|
|
300
|
+
title,
|
|
301
|
+
in_store: inStore,
|
|
302
|
+
ref: locator,
|
|
303
|
+
sent_at: sentAt,
|
|
304
|
+
sender
|
|
305
|
+
}), "documentLinkAnswer");
|
|
306
|
+
var accountAnswer = /* @__PURE__ */ __name((provider, { id, name, username, phone }) => ({
|
|
307
|
+
provider,
|
|
308
|
+
id,
|
|
309
|
+
name,
|
|
310
|
+
username,
|
|
311
|
+
...phone === void 0 ? {} : { phone }
|
|
312
|
+
}), "accountAnswer");
|
|
313
|
+
var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location, lastActiveAt, createdAt }) => ({
|
|
314
|
+
current,
|
|
315
|
+
client,
|
|
316
|
+
device,
|
|
317
|
+
location,
|
|
318
|
+
last_active_at: lastActiveAt,
|
|
319
|
+
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
320
|
+
}), "sessionAnswer");
|
|
321
|
+
|
|
322
|
+
export {
|
|
323
|
+
positiveCount,
|
|
324
|
+
configuredLimit,
|
|
325
|
+
withPaging,
|
|
326
|
+
window,
|
|
327
|
+
pagingOf,
|
|
328
|
+
chatRef,
|
|
329
|
+
chatAnswer,
|
|
330
|
+
memberAnswer,
|
|
331
|
+
contactRef,
|
|
332
|
+
contactAnswer,
|
|
333
|
+
contactShown,
|
|
334
|
+
chatEventAnswer,
|
|
335
|
+
memberEventAnswer,
|
|
336
|
+
inviteLinkAnswer,
|
|
337
|
+
joinRequestAnswer,
|
|
338
|
+
pollVoteAnswer,
|
|
339
|
+
reactorAnswer,
|
|
340
|
+
topicAnswer,
|
|
341
|
+
folderAnswer,
|
|
342
|
+
lines,
|
|
343
|
+
pageOf,
|
|
344
|
+
wholeList,
|
|
345
|
+
chatShown,
|
|
346
|
+
scoreFloor,
|
|
347
|
+
auditAnswer,
|
|
348
|
+
renderItem,
|
|
349
|
+
withPage,
|
|
350
|
+
documentLinkAnswer,
|
|
351
|
+
accountAnswer,
|
|
352
|
+
sessionAnswer
|
|
353
|
+
};
|