@wirecat/notion-cli 0.6.0 → 0.8.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 +70 -0
- package/README.md +20 -3
- package/contracts/wirecat.json +238 -2
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-FDS2ENXJ.js +42 -0
- package/dist/bundle/{all-profiles-AELHUTFU.js → all-profiles-MIGUJ6UM.js} +11 -11
- package/dist/bundle/{anthropic-3CCYAGO3.js → anthropic-ZTYBZ7PI.js} +5 -5
- package/dist/bundle/{app-server-DJ6P4NY4.js → app-server-MGXJZOJ2.js} +72 -72
- package/dist/bundle/{bun-2FLR4IV4.js → bun-NS5YLOQT.js} +2 -2
- package/dist/bundle/{bun-sqlite-QB6CU6TH.js → bun-sqlite-EKMD3TXK.js} +6 -6
- package/dist/bundle/{chunk-GUIQJUJV.js → chunk-2BPQNFA5.js} +6 -6
- package/dist/bundle/{chunk-RD7BKTWV.js → chunk-2Q5ATPA6.js} +4 -4
- package/dist/bundle/{chunk-DHVVXQEL.js → chunk-2T76TPDD.js} +3 -3
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-2TVHFJKV.js} +1 -1
- package/dist/bundle/{chunk-IURYZSG3.js → chunk-2XWVZDOM.js} +12 -12
- package/dist/bundle/{chunk-OEQNP56V.js → chunk-43PCMVTZ.js} +1 -1
- package/dist/bundle/{chunk-WGZH2M64.js → chunk-53UXHJEO.js} +16 -3
- package/dist/bundle/{chunk-KB35BVTG.js → chunk-5KL3PQWI.js} +2 -2
- package/dist/bundle/{chunk-A42T4YX7.js → chunk-5QCPDJLB.js} +2 -2
- package/dist/bundle/{chunk-PHKED7AG.js → chunk-64KVWK5N.js} +5 -5
- package/dist/bundle/{chunk-QGGRFRMP.js → chunk-66M7VFIM.js} +38 -38
- package/dist/bundle/{chunk-EHW45LLT.js → chunk-6BOEXO72.js} +3 -3
- package/dist/bundle/{chunk-QEJFBORC.js → chunk-6P7HUUR5.js} +3 -3
- package/dist/bundle/{chunk-P27NDZQR.js → chunk-77727OQH.js} +214 -158
- package/dist/bundle/{chunk-BEV5LO4D.js → chunk-7KNBZOLH.js} +13 -13
- package/dist/bundle/{chunk-FMMYBVCH.js → chunk-7YPZPJTB.js} +1 -1
- package/dist/bundle/{chunk-CHPWBQUK.js → chunk-A5PL2GYK.js} +1 -1
- package/dist/bundle/{chunk-2Z7UOXFC.js → chunk-AG34MPVN.js} +1 -1
- package/dist/bundle/{chunk-STTO2MSY.js → chunk-BCO37YUH.js} +327 -6
- package/dist/bundle/{chunk-CL3YNUCC.js → chunk-COF6KS7A.js} +6 -6
- package/dist/bundle/{chunk-YDDI4QIT.js → chunk-CWTTCFDX.js} +1182 -669
- package/dist/bundle/{chunk-T37TAXVL.js → chunk-D2IVASIC.js} +2 -2
- package/dist/bundle/{chunk-5OJLUUOJ.js → chunk-D3G375NT.js} +6 -6
- package/dist/bundle/{chunk-3MYN2RMG.js → chunk-DGZNVYKK.js} +8 -8
- package/dist/bundle/{chunk-LC6WE6JS.js → chunk-DLEAVO2T.js} +14 -7
- package/dist/bundle/{chunk-KGAUINBO.js → chunk-DW6YAEMZ.js} +10 -10
- package/dist/bundle/{chunk-WB2KSQIP.js → chunk-E4FNVLTR.js} +39 -6
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-E5EYJU5R.js} +1 -1
- package/dist/bundle/{chunk-3LMW7U7F.js → chunk-E5XATHAF.js} +21 -8
- package/dist/bundle/{chunk-3UX4VJWD.js → chunk-EXHTGQR2.js} +3 -4
- package/dist/bundle/{chunk-JFSVAOA7.js → chunk-EZAVBR47.js} +2 -2
- package/dist/bundle/{chunk-HOVHE3A3.js → chunk-F7DHR4OO.js} +7 -7
- package/dist/bundle/{chunk-HM6AMYHR.js → chunk-FGWQHNKK.js} +2 -2
- package/dist/bundle/{chunk-DGMTSDKB.js → chunk-FSWLPNJT.js} +5 -5
- package/dist/bundle/{chunk-F5ZAN7OC.js → chunk-GFI3UUIU.js} +1 -1
- package/dist/bundle/{chunk-4RFR4J2O.js → chunk-GGNVBN2S.js} +2 -2
- package/dist/bundle/{chunk-UOC52GCB.js → chunk-GPFE4SS7.js} +4 -4
- package/dist/bundle/{chunk-ESZHGC4Q.js → chunk-H76WEF2L.js} +6 -6
- package/dist/bundle/{chunk-LECMHK2F.js → chunk-HPS2YGSZ.js} +1 -1
- package/dist/bundle/{chunk-LQVDFD65.js → chunk-HZ5LRWKH.js} +2 -2
- package/dist/bundle/{chunk-SEAGUFBX.js → chunk-I5OAVMOI.js} +12 -12
- package/dist/bundle/{chunk-TFT4FVRU.js → chunk-I62MWK5L.js} +14 -2
- package/dist/bundle/{chunk-WAGADES3.js → chunk-IBFCD6TR.js} +17 -17
- package/dist/bundle/{chunk-7L2XOKDZ.js → chunk-IL3UYHCR.js} +8 -8
- package/dist/bundle/{chunk-T6XIBULH.js → chunk-J4CXJJJU.js} +132 -32
- package/dist/bundle/{chunk-RXU5T5NM.js → chunk-JRZEXLRQ.js} +13 -12
- package/dist/bundle/{chunk-IJVTN5L3.js → chunk-KDPV6YBX.js} +2 -2
- package/dist/bundle/{chunk-BAXNAOOL.js → chunk-KHEISFJO.js} +3 -3
- package/dist/bundle/{chunk-GPRJXJC7.js → chunk-KI6OOW6D.js} +22 -1
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-KPBUJQKT.js} +1 -1
- package/dist/bundle/{chunk-FRB2L7OE.js → chunk-LEO5GWPD.js} +3 -3
- package/dist/bundle/{chunk-BQBC2WIG.js → chunk-LKUWH6KU.js} +1 -1
- package/dist/bundle/{chunk-AE4VW4NB.js → chunk-LYJDZILD.js} +3 -3
- package/dist/bundle/{chunk-NSR43UEW.js → chunk-M27SMKNH.js} +5 -5
- package/dist/bundle/{chunk-K5IC4FZN.js → chunk-MA6U4XH2.js} +1 -1
- package/dist/bundle/{chunk-2XUV7HNE.js → chunk-MC3LAGIW.js} +2 -2
- package/dist/bundle/{chunk-YUDVRFXN.js → chunk-MGC2BAD2.js} +1 -1
- package/dist/bundle/{chunk-KNCPBX5P.js → chunk-MLXDGBH4.js} +19 -19
- package/dist/bundle/{chunk-WAU5LSHP.js → chunk-NQA2STEE.js} +113 -13
- package/dist/bundle/{chunk-6EJCI47L.js → chunk-NSBTYJRP.js} +4 -4
- package/dist/bundle/{chunk-5XPHFV7H.js → chunk-NSQN4F7H.js} +8 -8
- package/dist/bundle/{chunk-YXYZAWWW.js → chunk-NVXMWAEV.js} +6 -6
- package/dist/bundle/{chunk-EZMG5QXB.js → chunk-OZAP4FEG.js} +8 -8
- package/dist/bundle/{chunk-2CMLY2X3.js → chunk-OZZ5PTHG.js} +5 -5
- package/dist/bundle/{chunk-6YOMPW7Y.js → chunk-P4ADIGTL.js} +8 -8
- package/dist/bundle/{chunk-DIU2QJJF.js → chunk-PVTW7ZOY.js} +23 -23
- package/dist/bundle/{chunk-4VXXOJ2F.js → chunk-Q5PNS2K2.js} +3 -3
- package/dist/bundle/{chunk-ERN53B3Z.js → chunk-QQP54EEZ.js} +29 -178
- package/dist/bundle/{chunk-XYQVVW4R.js → chunk-RM4DO2WZ.js} +1 -1
- package/dist/bundle/{chunk-GCAJW4SR.js → chunk-S3SLDYTU.js} +1 -1
- package/dist/bundle/{chunk-JVESLS7B.js → chunk-S5NFSVNK.js} +63 -63
- package/dist/bundle/{chunk-Q7EIL6VU.js → chunk-UE7ST7JC.js} +30 -30
- package/dist/bundle/{chunk-SAPP2LEH.js → chunk-ULTKZLJV.js} +7 -7
- package/dist/bundle/{chunk-G4ZU73SD.js → chunk-VJ5EF4C7.js} +76 -61
- package/dist/bundle/{chunk-7JVKQ6NM.js → chunk-WBVZVP4T.js} +4 -4
- package/dist/bundle/{chunk-AZLDR36U.js → chunk-WDL3QYN2.js} +3 -3
- package/dist/bundle/{chunk-FV4WTZCU.js → chunk-WPNY2J2X.js} +16 -16
- package/dist/bundle/{chunk-YYQ5GKAI.js → chunk-XRA2V4MM.js} +1886 -860
- package/dist/bundle/{chunk-VH7526NL.js → chunk-Y6KPZOOD.js} +3 -3
- package/dist/bundle/{chunk-ZDYEOE7L.js → chunk-YAYVXHMO.js} +48 -48
- package/dist/bundle/{chunk-W2VQDIU5.js → chunk-YG2FFC2R.js} +9 -9
- package/dist/bundle/{chunk-HHEWTLAT.js → chunk-YOZHKJEN.js} +2 -2
- package/dist/bundle/{chunk-KZJQPJK5.js → chunk-ZKD3TL3O.js} +4 -4
- package/dist/bundle/command-contract-ZGBZCKZP.js +41 -0
- package/dist/bundle/{command-server-entry-VUR6WL77.js → command-server-entry-ZXB7VUIG.js} +29 -29
- package/dist/bundle/{decode-I64PF2RM.js → decode-BGLAM2YP.js} +5 -5
- package/dist/bundle/{dispatch-JQBAZWCL.js → dispatch-A3WIRXBM.js} +8 -8
- package/dist/bundle/{echarts-YRRVLEX3.js → echarts-ISH62J4E.js} +2 -2
- package/dist/bundle/{embed-BLXLKMK2.js → embed-POZWSFKL.js} +6 -6
- package/dist/bundle/{embedder-JYGF6R7I.js → embedder-7DIUHQOQ.js} +9 -9
- package/dist/bundle/{failure-I6AAF5R5.js → failure-BBT3B4UY.js} +2 -2
- package/dist/bundle/{first-run-YLDOZGY6.js → first-run-SLMRAWYB.js} +12 -12
- package/dist/bundle/first-screen-CCLGBTQ2.js +41 -0
- package/dist/bundle/{instructions-AG7SRWTR.js → instructions-G5ZGHVFB.js} +1 -1
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-MQ2L5IIM.js} +2 -2
- package/dist/bundle/meeting-combined-P56K6BUT.js +25 -0
- package/dist/bundle/meeting-model-UY4ABXAZ.js +27 -0
- package/dist/bundle/{meeting-semantic-3DZPHM7L.js → meeting-semantic-VPMFO4FB.js} +6 -6
- package/dist/bundle/{node-GJQYN4FT.js → node-NLJINXVQ.js} +2 -2
- package/dist/bundle/{node-sqlite-7VXIRQPH.js → node-sqlite-LPV27ECD.js} +7 -7
- package/dist/bundle/notes-search-TKP34WJZ.js +64 -0
- package/dist/bundle/notion.js +13 -13
- package/dist/bundle/{oauth-N67CH2TK.js → oauth-SC4HSJ7X.js} +7 -7
- package/dist/bundle/{open-JGXVHIKO.js → open-K2JIOWCG.js} +5 -5
- package/dist/bundle/{openai-PFQJTF4H.js → openai-MCKQLBZM.js} +18 -18
- package/dist/bundle/{process-MEKCZMX3.js → process-LPVAYRO7.js} +1 -1
- package/dist/bundle/{program-DUJYLJH5.js → program-QXA6YXUO.js} +11870 -8637
- package/dist/bundle/{prompt-FW44QDHD.js → prompt-XWESMSOG.js} +5 -5
- package/dist/bundle/{recognize-62TDQ6A7.js → recognize-TDE6PPXV.js} +4 -4
- package/dist/bundle/{remote-7ONFD7GG.js → remote-OAGPQQVE.js} +11 -11
- package/dist/bundle/{rerank-YOHQQJS4.js → rerank-375AKI4E.js} +7 -7
- package/dist/bundle/{schemas-IIGJ7DOP.js → schemas-ZE62D6CG.js} +1 -1
- package/dist/bundle/{serve-ZCXGT5RB.js → serve-YWCHKQEP.js} +9 -9
- package/dist/bundle/{server-RQ74M637.js → server-C4SH5PRK.js} +64 -64
- package/dist/bundle/server-SYGVF5BJ.js +90 -0
- package/dist/bundle/{services-FWBRZ57M.js → services-5Z2P4D2K.js} +51 -51
- package/dist/bundle/{sqlite-runtime-ZZBNGV5L.js → sqlite-runtime-KLELNUHI.js} +6 -6
- package/dist/bundle/{state-GDDFO62Y.js → state-OWEBLXCG.js} +6 -6
- package/dist/bundle/{store-D2LRIWEI.js → store-F63SKKV7.js} +27 -23
- package/dist/bundle/{store-KQCLR57N.js → store-IVJXGAX7.js} +21 -21
- package/dist/bundle/store-maintenance-command-YBMOO7XH.js +77 -0
- package/dist/bundle/surface-G3ITURGS.js +76 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +3 -25
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/comments.d.ts +1 -1
- package/dist/commands/comments.d.ts.map +1 -1
- package/dist/commands/comments.js +33 -2
- package/dist/commands/comments.js.map +1 -1
- package/dist/commands/databases.d.ts.map +1 -1
- package/dist/commands/databases.js +3 -2
- package/dist/commands/databases.js.map +1 -1
- package/dist/commands/documents.d.ts +13 -2
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +291 -23
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +20 -10
- package/dist/commands/library.js.map +1 -1
- package/dist/commands/meetings.d.ts +7 -0
- package/dist/commands/meetings.d.ts.map +1 -0
- package/dist/commands/meetings.js +136 -0
- package/dist/commands/meetings.js.map +1 -0
- package/dist/commands/rows.d.ts +4 -0
- package/dist/commands/rows.d.ts.map +1 -0
- package/dist/commands/rows.js +51 -0
- package/dist/commands/rows.js.map +1 -0
- package/dist/commands/writing.d.ts +2 -1
- package/dist/commands/writing.d.ts.map +1 -1
- package/dist/commands/writing.js +2 -2
- package/dist/commands/writing.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -2
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +13 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +22 -7
- package/dist/context.js.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 +90 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/knowledge.d.ts +18 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/library.d.ts +4 -5
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +11 -14
- 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 +40 -1
- package/dist/notion/errors.js.map +1 -1
- package/dist/notion/meeting-notes.d.ts +10 -0
- package/dist/notion/meeting-notes.d.ts.map +1 -0
- package/dist/notion/meeting-notes.js +196 -0
- package/dist/notion/meeting-notes.js.map +1 -0
- package/dist/notion/notion.d.ts +46 -0
- package/dist/notion/notion.d.ts.map +1 -1
- package/dist/notion/notion.js +105 -14
- package/dist/notion/notion.js.map +1 -1
- package/dist/notion/page-target.d.ts +30 -0
- package/dist/notion/page-target.d.ts.map +1 -0
- package/dist/notion/page-target.js +73 -0
- package/dist/notion/page-target.js.map +1 -0
- package/dist/notion/port.d.ts +10 -0
- package/dist/notion/port.d.ts.map +1 -1
- package/dist/notion/port.js +21 -0
- package/dist/notion/port.js.map +1 -1
- package/dist/notion/properties.d.ts +55 -0
- package/dist/notion/properties.d.ts.map +1 -0
- package/dist/notion/properties.js +280 -0
- package/dist/notion/properties.js.map +1 -0
- package/dist/notion/reads.d.ts +19 -1
- package/dist/notion/reads.d.ts.map +1 -1
- package/dist/notion/reads.js +2 -1
- package/dist/notion/reads.js.map +1 -1
- package/dist/notion/rows.d.ts +14 -0
- package/dist/notion/rows.d.ts.map +1 -0
- package/dist/notion/rows.js +119 -0
- package/dist/notion/rows.js.map +1 -0
- package/dist/notion/writes.d.ts +99 -0
- package/dist/notion/writes.d.ts.map +1 -1
- package/dist/notion/writes.js +278 -67
- package/dist/notion/writes.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +7 -1
- package/dist/program.js.map +1 -1
- package/dist/sync/comments.d.ts +12 -0
- package/dist/sync/comments.d.ts.map +1 -0
- package/dist/sync/comments.js +47 -0
- package/dist/sync/comments.js.map +1 -0
- package/dist/sync/files.d.ts +10 -4
- 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 +33 -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 +25 -29
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +1 -11
- package/dist/sync/users.d.ts.map +1 -1
- package/dist/sync/users.js +0 -33
- package/dist/sync/users.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
- package/skills/notion-cli/SKILL.md +29 -3
- package/dist/bundle/agent-ILG6AH7S.js +0 -42
- package/dist/bundle/command-contract-L2FASWD6.js +0 -41
- package/dist/bundle/first-screen-GZH3LMLZ.js +0 -41
- package/dist/bundle/meeting-combined-OFQSGKBG.js +0 -25
- package/dist/bundle/meeting-model-K6NSX3O5.js +0 -27
- package/dist/bundle/notes-search-ACDOPTNH.js +0 -64
- package/dist/bundle/server-XMZF57WM.js +0 -90
- package/dist/bundle/store-maintenance-command-CK2MU5M6.js +0 -77
- package/dist/bundle/surface-K4TPIQW7.js +0 -76
- package/dist/bundle/{hast-util-from-html-X2DCPS3T.js → hast-util-from-html-237ZT4C7.js} +3 -3
- package/dist/bundle/{hast-util-to-mdast-3CSMIWK2.js → hast-util-to-mdast-H5COQ6HJ.js} +6 -6
- package/dist/bundle/{mdast-util-gfm-JO7PHUIB.js → mdast-util-gfm-M3K5BNY2.js} +16 -16
- package/dist/bundle/{mdast-util-to-hast-AYJV7KAE.js → mdast-util-to-hast-TSB5MAAV.js} +1 -1
- package/dist/bundle/{mdast-util-to-markdown-DOXGHRI7.js → mdast-util-to-markdown-SG6455IT.js} +10 -10
- package/dist/bundle/{micromark-extension-gfm-PQ7DWZM7.js → micromark-extension-gfm-7SUOOQ3A.js} +3 -3
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseLacking
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-I62MWK5L.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PACE,
|
|
8
8
|
FloodMemory,
|
|
@@ -14,214 +14,72 @@ import {
|
|
|
14
14
|
holdEnd,
|
|
15
15
|
pacePathFor,
|
|
16
16
|
recipientsPathFor,
|
|
17
|
+
refuseUnknownPermissionKeys,
|
|
17
18
|
servicesFor,
|
|
19
|
+
terminalAsker,
|
|
18
20
|
waitForTurn
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XRA2V4MM.js";
|
|
20
22
|
import {
|
|
21
|
-
AUTHORITY_KEY,
|
|
22
23
|
CEILING_KEY,
|
|
23
|
-
DEFAULT_PERMISSIONS,
|
|
24
|
-
KEYED_UNDER_HOUSEKEEPING,
|
|
25
|
-
WRITE_KEYS,
|
|
26
24
|
asFirstWord,
|
|
27
25
|
baseContext,
|
|
28
26
|
environmentOf,
|
|
29
27
|
fetchesUnder,
|
|
30
|
-
issueMessage,
|
|
31
|
-
keyForCommand,
|
|
32
28
|
levelFor,
|
|
33
29
|
limitBatch,
|
|
34
|
-
permissionIssues,
|
|
35
|
-
publicIssue,
|
|
36
30
|
readKeysForCommand,
|
|
37
31
|
recalledAccount,
|
|
38
32
|
rememberAccount,
|
|
39
|
-
rootOf2 as rootOf
|
|
40
|
-
|
|
41
|
-
} from "./chunk-P27NDZQR.js";
|
|
33
|
+
rootOf2 as rootOf
|
|
34
|
+
} from "./chunk-77727OQH.js";
|
|
42
35
|
import {
|
|
43
36
|
providerErrorKey
|
|
44
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-P4ADIGTL.js";
|
|
45
38
|
import {
|
|
46
39
|
OFFLINE,
|
|
47
40
|
chatIdIn,
|
|
48
41
|
profilesOnAccount
|
|
49
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YAYVXHMO.js";
|
|
50
43
|
import {
|
|
51
44
|
capability,
|
|
52
45
|
throughWrapper
|
|
53
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-5KL3PQWI.js";
|
|
54
47
|
import {
|
|
55
48
|
codeOf,
|
|
56
49
|
currentOperation
|
|
57
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-DGZNVYKK.js";
|
|
58
51
|
import {
|
|
59
52
|
servingProfiles
|
|
60
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-53UXHJEO.js";
|
|
61
54
|
import {
|
|
62
55
|
openStore
|
|
63
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-CWTTCFDX.js";
|
|
64
57
|
import {
|
|
65
58
|
chatReferenceOf,
|
|
66
59
|
ensureAccount,
|
|
67
60
|
foldName,
|
|
68
61
|
isId,
|
|
69
62
|
pickPerson
|
|
70
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-DW6YAEMZ.js";
|
|
71
64
|
import {
|
|
72
65
|
isCliFailure
|
|
73
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-HZ5LRWKH.js";
|
|
74
67
|
import {
|
|
75
68
|
CliError
|
|
76
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-FGWQHNKK.js";
|
|
77
70
|
import {
|
|
78
71
|
__name
|
|
79
72
|
} from "./chunk-ZVVMGPBJ.js";
|
|
80
73
|
|
|
81
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
82
|
-
import { openSync } from "node:fs";
|
|
83
|
-
import { createInterface } from "node:readline";
|
|
84
|
-
import { ReadStream } from "node:tty";
|
|
85
|
-
var fromTerminal = /* @__PURE__ */ __name(async (question) => {
|
|
86
|
-
if (!process.stdin.isTTY || !process.stderr.isTTY)
|
|
87
|
-
return null;
|
|
88
|
-
let input;
|
|
89
|
-
try {
|
|
90
|
-
input = new ReadStream(openSync("/dev/tty", "r"));
|
|
91
|
-
} catch {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const reader = createInterface({ input, output: process.stderr, terminal: true });
|
|
95
|
-
try {
|
|
96
|
-
return await new Promise((resolve, reject) => {
|
|
97
|
-
const cancel = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "cancelled \u2014 nothing was done")), "cancel");
|
|
98
|
-
reader.once("SIGINT", cancel);
|
|
99
|
-
reader.once("close", cancel);
|
|
100
|
-
reader.question(question, resolve);
|
|
101
|
-
});
|
|
102
|
-
} finally {
|
|
103
|
-
reader.close();
|
|
104
|
-
input.destroy();
|
|
105
|
-
}
|
|
106
|
-
}, "fromTerminal");
|
|
107
|
-
var what = /* @__PURE__ */ __name((key, { chatId, count, personIds, forEveryone }) => [
|
|
108
|
-
key,
|
|
109
|
-
forEveryone ? "for everyone" : void 0,
|
|
110
|
-
count !== void 0 ? `${count} ${count === 1 ? "item" : "items"}` : void 0,
|
|
111
|
-
personIds?.length ? `${personIds.length} ${personIds.length === 1 ? "person" : "people"}` : void 0,
|
|
112
|
-
chatId !== null ? `in chat ${chatId}` : void 0
|
|
113
|
-
].filter(Boolean).join(", "), "what");
|
|
114
|
-
var answerOf = /* @__PURE__ */ __name(async (command, question) => {
|
|
115
|
-
const given = command.optsWithGlobals();
|
|
116
|
-
if (given.json === true || given.jsonl === true)
|
|
117
|
-
return null;
|
|
118
|
-
return (environmentOf(command).answer ?? fromTerminal)(question);
|
|
119
|
-
}, "answerOf");
|
|
120
|
-
var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) => {
|
|
121
|
-
if (environmentOf(command).agent)
|
|
122
|
-
return;
|
|
123
|
-
const flag = skipFlagFor(key);
|
|
124
|
-
const given = command.optsWithGlobals();
|
|
125
|
-
if (flag === "--yes" ? given.yes === true : given.allowDangerous === true)
|
|
126
|
-
return;
|
|
127
|
-
const machine = given.json === true || given.jsonl === true;
|
|
128
|
-
const answer = machine ? null : await (environmentOf(command).answer ?? fromTerminal)(`${what(key, request)} \u2014 go ahead? [y/N] `);
|
|
129
|
-
if (answer === null) {
|
|
130
|
-
throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is at a terminal to answer \u2014 add ${flag} to go ahead`, { permission: key });
|
|
131
|
-
}
|
|
132
|
-
if (!/^\s*y(es)?\s*$/i.test(answer))
|
|
133
|
-
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
134
|
-
}, "terminalAsker");
|
|
135
|
-
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
137
|
-
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
138
|
-
"help",
|
|
139
|
-
"guide",
|
|
140
|
-
"config",
|
|
141
|
-
"session",
|
|
142
|
-
"doctor",
|
|
143
|
-
"commands",
|
|
144
|
-
"complete",
|
|
145
|
-
"upgrade",
|
|
146
|
-
"skill",
|
|
147
|
-
"mcp",
|
|
148
|
-
"runs"
|
|
149
|
-
]);
|
|
150
|
-
var commandPathKey = /* @__PURE__ */ __name((path) => path[0] === void 0 || HOUSEKEEPING.has(path[0]) && !KEYED_UNDER_HOUSEKEEPING.has(path.join(".")) ? null : path.join("."), "commandPathKey");
|
|
151
|
-
var commandPermissions = /* @__PURE__ */ __name(({ keyOf = commandPathKey, extra = [], defaults = {}, alsoChecks } = {}) => ({
|
|
152
|
-
keyOf,
|
|
153
|
-
extra: [AUTHORITY_KEY, ...extra],
|
|
154
|
-
defaults: { ...DEFAULT_PERMISSIONS, ...defaults },
|
|
155
|
-
...alsoChecks ? { alsoChecks } : {}
|
|
156
|
-
}), "commandPermissions");
|
|
157
|
-
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
158
|
-
const words = [];
|
|
159
|
-
for (let at = command; at?.parent; at = at.parent)
|
|
160
|
-
words.unshift(at.name());
|
|
161
|
-
return words;
|
|
162
|
-
}, "pathOf");
|
|
163
|
-
var rootOf2 = /* @__PURE__ */ __name((command) => {
|
|
164
|
-
let at = command;
|
|
165
|
-
while (at.parent)
|
|
166
|
-
at = at.parent;
|
|
167
|
-
return at;
|
|
168
|
-
}, "rootOf");
|
|
169
|
-
var everyCommand = /* @__PURE__ */ __name((command) => [command, ...command.commands.flatMap(everyCommand)], "everyCommand");
|
|
170
|
-
var knownPermissionKeys = /* @__PURE__ */ __name((command, keyOf = (one) => keyForCommand(pathOf(one)), extra = []) => {
|
|
171
|
-
const known = /* @__PURE__ */ new Set();
|
|
172
|
-
const add = /* @__PURE__ */ __name((key) => {
|
|
173
|
-
for (let parts = key.split("."); parts.length > 0; parts = parts.slice(0, -1))
|
|
174
|
-
known.add(parts.join("."));
|
|
175
|
-
}, "add");
|
|
176
|
-
if (typeof keyOf !== "function") {
|
|
177
|
-
for (const one of everyCommand(rootOf2(command))) {
|
|
178
|
-
const key = keyOf.keyOf(pathOf(one));
|
|
179
|
-
if (key)
|
|
180
|
-
add(key);
|
|
181
|
-
}
|
|
182
|
-
for (const key of [...keyOf.extra, ...extra])
|
|
183
|
-
add(key);
|
|
184
|
-
return known;
|
|
185
|
-
}
|
|
186
|
-
for (const one of everyCommand(rootOf2(command))) {
|
|
187
|
-
const own = keyOf(one);
|
|
188
|
-
const key = own === void 0 ? keyForCommand(pathOf(one)) : own;
|
|
189
|
-
if (key)
|
|
190
|
-
add(key);
|
|
191
|
-
}
|
|
192
|
-
for (const key of [...WRITE_KEYS, ...extra])
|
|
193
|
-
add(key);
|
|
194
|
-
return known;
|
|
195
|
-
}, "knownPermissionKeys");
|
|
196
|
-
var knownBeside = /* @__PURE__ */ __name((key, known) => {
|
|
197
|
-
const parent = key.split(".").slice(0, -1).join(".");
|
|
198
|
-
const depth = parent === "" ? 1 : parent.split(".").length + 1;
|
|
199
|
-
return [...known].filter((one) => one.split(".").length === depth && (parent === "" || one.startsWith(`${parent}.`))).sort();
|
|
200
|
-
}, "knownBeside");
|
|
201
|
-
var unknownPermissionKeys = /* @__PURE__ */ __name((levels, known) => Object.keys(levels).filter((key) => key !== CEILING_KEY && !known.has(key)), "unknownPermissionKeys");
|
|
202
|
-
var unknownPermissionIssues = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
|
|
203
|
-
const saved = settings.savedPermissions ?? Object.keys(settings.permissions).filter((key) => key !== CEILING_KEY && settings.permissionSources[key] !== "flag").map((key) => ({ key, at: ["profiles", settings.profile, "permissions", key] }));
|
|
204
|
-
return permissionIssues(saved, knownPermissionKeys(command, keyOf), { file: settings.configPath, tool }).map(publicIssue);
|
|
205
|
-
}, "unknownPermissionIssues");
|
|
206
|
-
var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
|
|
207
|
-
const issues = unknownPermissionIssues(command, settings, tool, keyOf);
|
|
208
|
-
if (issues.length > 0)
|
|
209
|
-
throw new CliError("configuration_error", issueMessage(issues), { permission: issues[0]?.key });
|
|
210
|
-
const flagged = Object.keys(settings.permissions).filter((key2) => settings.permissionSources[key2] === "flag");
|
|
211
|
-
const [key] = unknownPermissionKeys(Object.fromEntries(flagged.map((one) => [one, true])), knownPermissionKeys(command, keyOf));
|
|
212
|
-
if (key !== void 0)
|
|
213
|
-
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
214
|
-
}, "refuseUnknownPermissionKeys");
|
|
215
|
-
|
|
216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
217
75
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
218
76
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
219
77
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
220
78
|
var chatOf = /* @__PURE__ */ __name((args) => typeof args[0] === "string" && /^-?\d+$/.test(args[0]) ? args[0] : void 0, "chatOf");
|
|
221
79
|
var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer }) => {
|
|
222
|
-
const kept = /* @__PURE__ */ __name(async (operation,
|
|
80
|
+
const kept = /* @__PURE__ */ __name(async (operation, what) => {
|
|
223
81
|
try {
|
|
224
|
-
await
|
|
82
|
+
await what();
|
|
225
83
|
} catch (error) {
|
|
226
84
|
warn(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
|
|
227
85
|
event: "warning",
|
|
@@ -310,7 +168,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
310
168
|
});
|
|
311
169
|
}, "flooded");
|
|
312
170
|
|
|
313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
314
172
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
315
173
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
316
174
|
const write = currentOperation();
|
|
@@ -409,7 +267,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
409
267
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
410
268
|
}, "byPart");
|
|
411
269
|
|
|
412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
413
271
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
414
272
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
415
273
|
let warned = false;
|
|
@@ -985,7 +843,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
985
843
|
}
|
|
986
844
|
}, "keep");
|
|
987
845
|
|
|
988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
989
847
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
990
848
|
let opened;
|
|
991
849
|
return {
|
|
@@ -1079,7 +937,7 @@ var settled = /* @__PURE__ */ __name(async (pending, ms) => {
|
|
|
1079
937
|
clearTimeout(timer);
|
|
1080
938
|
}
|
|
1081
939
|
}, "settled");
|
|
1082
|
-
var listened = /* @__PURE__ */ __name(({ run, operation, what
|
|
940
|
+
var listened = /* @__PURE__ */ __name(({ run, operation, what }, events, warn, waitMs) => {
|
|
1083
941
|
const abort = new AbortController();
|
|
1084
942
|
let closing = false;
|
|
1085
943
|
const ended = Promise.resolve().then(() => run(abort.signal)).catch((error) => {
|
|
@@ -1087,11 +945,11 @@ var listened = /* @__PURE__ */ __name(({ run, operation, what: what2 }, events,
|
|
|
1087
945
|
return;
|
|
1088
946
|
const warning = { event: "warning", code: "listen_failed", operation };
|
|
1089
947
|
events(warning);
|
|
1090
|
-
warn(`${
|
|
948
|
+
warn(`${what} arriving during this command are not saved: ${error instanceof Error ? error.message : String(error)}`, warning);
|
|
1091
949
|
});
|
|
1092
950
|
return {
|
|
1093
951
|
operation,
|
|
1094
|
-
what
|
|
952
|
+
what,
|
|
1095
953
|
closing: /* @__PURE__ */ __name(() => {
|
|
1096
954
|
closing = true;
|
|
1097
955
|
}, "closing"),
|
|
@@ -1182,10 +1040,10 @@ var connected = /* @__PURE__ */ __name((connection, { app, provider, name, delet
|
|
|
1182
1040
|
events(warning);
|
|
1183
1041
|
warn(text, warning);
|
|
1184
1042
|
}, "warned");
|
|
1185
|
-
passives.forEach(({ operation, what
|
|
1043
|
+
passives.forEach(({ operation, what }, at) => {
|
|
1186
1044
|
if (ended[at])
|
|
1187
1045
|
return;
|
|
1188
|
-
warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${
|
|
1046
|
+
warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${what} at exit`);
|
|
1189
1047
|
});
|
|
1190
1048
|
await settled(/* @__PURE__ */ new Set([...pending, ...announcing]), closeWaitMs);
|
|
1191
1049
|
closing.abort();
|
|
@@ -1244,14 +1102,14 @@ var warnUnserved = /* @__PURE__ */ __name(async (messenger, profile, { env, rend
|
|
|
1244
1102
|
const newest = (await store.chats.chatStats(account)).map((one) => one.newestAt).reduce((latest, at) => at !== null && (latest === null || at > latest) ? at : latest, null);
|
|
1245
1103
|
renderer.warn(`no \`${messenger.app.command} ${profile} serve\` keeps profile "${profile}" up to date \u2014 ` + (newest === null ? "the local store holds no messages yet" : `the newest stored message is from ${newest}`));
|
|
1246
1104
|
}, "warnUnserved");
|
|
1247
|
-
var
|
|
1105
|
+
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
1248
1106
|
const words = [];
|
|
1249
1107
|
for (let at = command; at?.parent; at = at.parent)
|
|
1250
1108
|
words.unshift(at.name());
|
|
1251
1109
|
return words;
|
|
1252
1110
|
}, "pathOf");
|
|
1253
1111
|
var refuseDenied = /* @__PURE__ */ __name((command, settings) => {
|
|
1254
|
-
for (const key of readKeysForCommand(
|
|
1112
|
+
for (const key of readKeysForCommand(pathOf(command))) {
|
|
1255
1113
|
const { level, key: named } = levelFor(settings.permissions, key);
|
|
1256
1114
|
if (level !== "deny")
|
|
1257
1115
|
continue;
|
|
@@ -1274,7 +1132,7 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1274
1132
|
const base = baseContext(command, (flags, options) => messenger.resolveSettings(flags, { ...options, ...resolving }));
|
|
1275
1133
|
const { profile } = base.settings;
|
|
1276
1134
|
refuseDenied(command, base.settings);
|
|
1277
|
-
refuseLacking(messenger,
|
|
1135
|
+
refuseLacking(messenger, pathOf(command));
|
|
1278
1136
|
refuseUnknownPermissionKeys(command, base.settings, app.command, messenger.permissionKey);
|
|
1279
1137
|
const warn = /* @__PURE__ */ __name((text, warning) => base.renderer.warn(text, warning), "warn");
|
|
1280
1138
|
const accountFor = /* @__PURE__ */ __name(() => {
|
|
@@ -1386,13 +1244,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1386
1244
|
}, "messengerContext");
|
|
1387
1245
|
|
|
1388
1246
|
export {
|
|
1389
|
-
answerOf,
|
|
1390
|
-
terminalAsker,
|
|
1391
|
-
commandPermissions,
|
|
1392
|
-
knownPermissionKeys,
|
|
1393
|
-
knownBeside,
|
|
1394
|
-
unknownPermissionIssues,
|
|
1395
|
-
refuseUnknownPermissionKeys,
|
|
1396
1247
|
fill,
|
|
1397
1248
|
connectedFor,
|
|
1398
1249
|
refuseLocalWrite,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|