@wirecat/notion-cli 0.4.0 → 0.6.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 +58 -0
- package/README.md +5 -0
- package/contracts/wirecat.json +55 -2
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-ILG6AH7S.js +42 -0
- package/dist/bundle/{all-profiles-4IONYZB6.js → all-profiles-AELHUTFU.js} +64 -21
- package/dist/bundle/{anthropic-OXF74J4P.js → anthropic-3CCYAGO3.js} +6 -6
- package/dist/bundle/{app-server-M2VF6ABM.js → app-server-DJ6P4NY4.js} +86 -65
- package/dist/bundle/{bun-DLA6QRLL.js → bun-2FLR4IV4.js} +2 -2
- package/dist/bundle/{bun-sqlite-F4BYLW3F.js → bun-sqlite-QB6CU6TH.js} +7 -7
- package/dist/bundle/chunk-2CMLY2X3.js +72 -0
- package/dist/bundle/{chunk-TZ2QJ53V.js → chunk-2XUV7HNE.js} +2 -2
- package/dist/bundle/{chunk-6JBLIQQN.js → chunk-2Z7UOXFC.js} +1 -1
- package/dist/bundle/{chunk-6GN7KU7X.js → chunk-3LMW7U7F.js} +22 -10
- package/dist/bundle/chunk-3MYN2RMG.js +398 -0
- package/dist/bundle/{chunk-YFWLHTNO.js → chunk-3UX4VJWD.js} +1 -1
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/{chunk-4KUJTSHG.js → chunk-4RFR4J2O.js} +2 -2
- package/dist/bundle/{chunk-OCDJ4FFA.js → chunk-4VXXOJ2F.js} +4 -4
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-P3P6DA6K.js → chunk-5OJLUUOJ.js} +6 -6
- package/dist/bundle/{chunk-T5UNSFES.js → chunk-5XPHFV7H.js} +35 -12
- package/dist/bundle/{chunk-KL3P5TQK.js → chunk-6EJCI47L.js} +4 -4
- package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
- package/dist/bundle/{chunk-IJMFG7HB.js → chunk-6YOMPW7Y.js} +10 -8
- package/dist/bundle/{chunk-7NF3V5L2.js → chunk-7JVKQ6NM.js} +4 -4
- package/dist/bundle/chunk-7L2XOKDZ.js +353 -0
- package/dist/bundle/{chunk-TXONV3HW.js → chunk-A42T4YX7.js} +3 -3
- package/dist/bundle/chunk-AE4VW4NB.js +50 -0
- package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
- package/dist/bundle/{chunk-L6H7PY4X.js → chunk-AZLDR36U.js} +3 -3
- package/dist/bundle/{chunk-TFNRCCGR.js → chunk-BAXNAOOL.js} +4 -4
- package/dist/bundle/{chunk-QX3TPFEX.js → chunk-BEV5LO4D.js} +110 -862
- package/dist/bundle/{chunk-UROEWCOG.js → chunk-BQBC2WIG.js} +1 -65
- package/dist/bundle/{chunk-NO2LIHWA.js → chunk-CFQQTDSA.js} +1 -1
- package/dist/bundle/chunk-CHPWBQUK.js +39 -0
- package/dist/bundle/chunk-CL3YNUCC.js +388 -0
- package/dist/bundle/{chunk-WHJWURZB.js → chunk-DGMTSDKB.js} +6 -6
- package/dist/bundle/{chunk-HTKSCSJU.js → chunk-DHVVXQEL.js} +4 -4
- package/dist/bundle/chunk-DIU2QJJF.js +785 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-Z53LYX4M.js → chunk-EHW45LLT.js} +3 -3
- package/dist/bundle/{chunk-XCTOCVMW.js → chunk-ERN53B3Z.js} +32 -24
- package/dist/bundle/{chunk-CDGZZNGY.js → chunk-ESZHGC4Q.js} +38 -8
- package/dist/bundle/{chunk-RMJMID5D.js → chunk-EZMG5QXB.js} +8 -8
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-Y5LAJWR5.js → chunk-F5ZAN7OC.js} +1 -1
- package/dist/bundle/{chunk-2MHMKNWD.js → chunk-FMMYBVCH.js} +1 -1
- package/dist/bundle/{chunk-WZEEEQGC.js → chunk-FRB2L7OE.js} +3 -3
- package/dist/bundle/chunk-FV4WTZCU.js +561 -0
- package/dist/bundle/{chunk-BEPFGITI.js → chunk-G4ZU73SD.js} +101 -80
- package/dist/bundle/{chunk-5XP4KQ2F.js → chunk-GCAJW4SR.js} +1 -1
- package/dist/bundle/{chunk-FEMHUSGO.js → chunk-GPRJXJC7.js} +15 -1
- package/dist/bundle/chunk-GUIQJUJV.js +340 -0
- package/dist/bundle/{chunk-M2EEIYBU.js → chunk-HHEWTLAT.js} +2 -2
- package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-HM6AMYHR.js} +2 -2
- package/dist/bundle/{chunk-TJCPTRYD.js → chunk-HOVHE3A3.js} +7 -7
- package/dist/bundle/{chunk-YAPDU3SV.js → chunk-HVXOA4FO.js} +1 -1
- package/dist/bundle/{chunk-D6RCRBDH.js → chunk-IJVTN5L3.js} +2 -2
- package/dist/bundle/{chunk-CIVXTBJY.js → chunk-IURYZSG3.js} +39 -52
- package/dist/bundle/chunk-JFSVAOA7.js +108 -0
- package/dist/bundle/{chunk-FSJHASRQ.js → chunk-JVESLS7B.js} +611 -572
- package/dist/bundle/chunk-K5IC4FZN.js +36 -0
- package/dist/bundle/chunk-KB35BVTG.js +30 -0
- package/dist/bundle/chunk-KGAUINBO.js +594 -0
- package/dist/bundle/{chunk-AYU5TFDU.js → chunk-KNCPBX5P.js} +85 -76
- package/dist/bundle/{chunk-GSNE7OB4.js → chunk-KZJQPJK5.js} +4 -4
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-M6DGZ2O6.js → chunk-LC6WE6JS.js} +9 -9
- package/dist/bundle/{chunk-YGCI3DHS.js → chunk-LECMHK2F.js} +1 -1
- package/dist/bundle/chunk-LQVDFD65.js +72 -0
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-K5I64ZVI.js → chunk-NSR43UEW.js} +7 -64
- package/dist/bundle/{chunk-GK4GLPG2.js → chunk-OEQNP56V.js} +2 -100
- package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
- package/dist/bundle/{chunk-MRA62W5K.js → chunk-P27NDZQR.js} +255 -563
- package/dist/bundle/{chunk-GBFEEHQC.js → chunk-PHKED7AG.js} +8 -225
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-JODE2XED.js → chunk-Q7EIL6VU.js} +43 -33
- package/dist/bundle/{chunk-4TQVZXOV.js → chunk-QEJFBORC.js} +3 -3
- package/dist/bundle/{chunk-ZC6ZQQ55.js → chunk-QGGRFRMP.js} +65 -49
- package/dist/bundle/{chunk-JIRRF6BM.js → chunk-RD7BKTWV.js} +4 -4
- package/dist/bundle/chunk-RXU5T5NM.js +714 -0
- package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
- package/dist/bundle/{chunk-7NGFGFE5.js → chunk-SAPP2LEH.js} +10 -10
- package/dist/bundle/{chunk-COH7OEER.js → chunk-SEAGUFBX.js} +12 -12
- package/dist/bundle/{chunk-5LBJNTEJ.js → chunk-STTO2MSY.js} +43 -64
- package/dist/bundle/{chunk-5UA2TYMI.js → chunk-T37TAXVL.js} +2 -2
- package/dist/bundle/{chunk-R6SDRSZK.js → chunk-T6XIBULH.js} +139 -571
- package/dist/bundle/chunk-TFT4FVRU.js +67 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
- package/dist/bundle/{chunk-SGBS5QCU.js → chunk-UOC52GCB.js} +4 -4
- package/dist/bundle/chunk-UPL474OW.js +94 -0
- package/dist/bundle/chunk-VH7526NL.js +80 -0
- package/dist/bundle/chunk-VNWF4I7E.js +34 -0
- package/dist/bundle/chunk-W2VQDIU5.js +221 -0
- package/dist/bundle/{chunk-EQPAZ33O.js → chunk-WAGADES3.js} +19 -19
- package/dist/bundle/{chunk-WU3XHGOB.js → chunk-WAU5LSHP.js} +81 -438
- package/dist/bundle/{chunk-FIHXADRF.js → chunk-WB2KSQIP.js} +4 -4
- package/dist/bundle/{chunk-OI5DWZJG.js → chunk-WGZH2M64.js} +3 -3
- package/dist/bundle/chunk-WVN2KTNS.js +52 -0
- package/dist/bundle/{chunk-UKE3CGHK.js → chunk-XYQVVW4R.js} +1 -1
- package/dist/bundle/{chunk-7NVPM55S.js → chunk-YDDI4QIT.js} +2203 -1808
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-7YZPBAQX.js → chunk-YUDVRFXN.js} +1 -1
- package/dist/bundle/{chunk-EY6S7FV3.js → chunk-YXYZAWWW.js} +6 -6
- package/dist/bundle/{chunk-GCCPFKSU.js → chunk-YYQ5GKAI.js} +9532 -10735
- package/dist/bundle/chunk-ZDYEOE7L.js +2366 -0
- package/dist/bundle/command-contract-L2FASWD6.js +41 -0
- package/dist/bundle/{command-server-entry-2SORMVRM.js → command-server-entry-VUR6WL77.js} +30 -27
- package/dist/bundle/{decode-5O7IEFPN.js → decode-I64PF2RM.js} +6 -6
- package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
- package/dist/bundle/{dispatch-YHQX6FEJ.js → dispatch-JQBAZWCL.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-ARLMVQC7.js → echarts-YRRVLEX3.js} +2 -2
- package/dist/bundle/{embed-FUDUKQ3K.js → embed-BLXLKMK2.js} +7 -7
- package/dist/bundle/{embedder-HDRV7GX3.js → embedder-JYGF6R7I.js} +10 -10
- package/dist/bundle/{failure-JHXICWIL.js → failure-I6AAF5R5.js} +3 -3
- package/dist/bundle/first-run-YLDOZGY6.js +29 -0
- package/dist/bundle/first-screen-GZH3LMLZ.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-MEFIKCDI.js → instructions-AG7SRWTR.js} +1 -1
- package/dist/bundle/{mcp-VMS6PBCU.js → mcp-YGOAUNC3.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-OFQSGKBG.js +25 -0
- package/dist/bundle/meeting-model-K6NSX3O5.js +27 -0
- package/dist/bundle/{meeting-semantic-R4CSLVRG.js → meeting-semantic-3DZPHM7L.js} +7 -7
- package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
- package/dist/bundle/{node-MAQALPLA.js → node-GJQYN4FT.js} +2 -2
- package/dist/bundle/{node-sqlite-J7IJYNBO.js → node-sqlite-7VXIRQPH.js} +8 -8
- package/dist/bundle/notes-search-ACDOPTNH.js +64 -0
- package/dist/bundle/notion.js +14 -14
- package/dist/bundle/oauth-N67CH2TK.js +20 -0
- package/dist/bundle/{open-AB27MTGR.js → open-JGXVHIKO.js} +6 -6
- package/dist/bundle/{openai-D77MU5XV.js → openai-PFQJTF4H.js} +21 -18
- package/dist/bundle/{process-SIOWTRJ6.js → process-MEKCZMX3.js} +1 -1
- package/dist/bundle/{program-7K34KI27.js → program-DUJYLJH5.js} +6947 -6532
- package/dist/bundle/{prompt-W77YDHA6.js → prompt-FW44QDHD.js} +6 -6
- package/dist/bundle/{recognize-3JAXQQ36.js → recognize-62TDQ6A7.js} +5 -5
- package/dist/bundle/{remote-PSOJXCXO.js → remote-7ONFD7GG.js} +12 -11
- package/dist/bundle/{rerank-EE44ZTGL.js → rerank-YOHQQJS4.js} +8 -8
- package/dist/bundle/{schemas-LBYUMBC6.js → schemas-IIGJ7DOP.js} +39 -60
- package/dist/bundle/{serve-XJMGAMFW.js → serve-ZCXGT5RB.js} +11 -11
- package/dist/bundle/{server-ASU6CP5R.js → server-RQ74M637.js} +78 -56
- package/dist/bundle/server-XMZF57WM.js +90 -0
- package/dist/bundle/{services-PT4PA4J6.js → services-FWBRZ57M.js} +105 -90
- package/dist/bundle/{sqlite-runtime-YHXRTVXE.js → sqlite-runtime-ZZBNGV5L.js} +7 -7
- package/dist/bundle/{state-T6ZKFWGD.js → state-GDDFO62Y.js} +7 -7
- package/dist/bundle/{store-E5EE25FY.js → store-D2LRIWEI.js} +24 -20
- package/dist/bundle/{store-3MUCZEI3.js → store-KQCLR57N.js} +32 -18
- package/dist/bundle/store-maintenance-command-CK2MU5M6.js +77 -0
- package/dist/bundle/surface-K4TPIQW7.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 -119
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +16 -5
- 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/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 +4 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +69 -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/knowledge.d.ts +1 -0
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +68 -2
- package/dist/knowledge.js.map +1 -1
- package/dist/library.d.ts +12 -1
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +35 -1
- package/dist/library.js.map +1 -1
- package/dist/notion/port.d.ts.map +1 -1
- package/dist/notion/port.js +1 -0
- package/dist/notion/port.js.map +1 -1
- package/dist/notion/reads.d.ts +13 -1
- package/dist/notion/reads.d.ts.map +1 -1
- package/dist/notion/reads.js +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +19 -2
- package/dist/program.js.map +1 -1
- package/dist/sync/files.d.ts +19 -0
- package/dist/sync/files.d.ts.map +1 -1
- package/dist/sync/files.js.map +1 -1
- package/dist/sync/source.d.ts +1 -1
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +60 -55
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +22 -0
- package/dist/sync/users.d.ts.map +1 -0
- package/dist/sync/users.js +111 -0
- package/dist/sync/users.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/chunk-L62XTC7N.js +0 -726
- package/dist/bundle/chunk-SHTHNBHG.js +0 -2
- package/dist/bundle/command-contract-UBXS6NHI.js +0 -38
- package/dist/bundle/first-run-BGEFTXOE.js +0 -29
- package/dist/bundle/first-screen-F5F3VS6Y.js +0 -38
- package/dist/bundle/meeting-combined-HNSS3FQY.js +0 -24
- package/dist/bundle/meeting-model-REZVYGQW.js +0 -26
- package/dist/bundle/oauth-AMV4YGJD.js +0 -20
- package/dist/bundle/server-WSPQ5EOA.js +0 -72
- package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +0 -63
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.js
|
|
8
|
+
function longestStreak(value, substring) {
|
|
9
|
+
const source = String(value);
|
|
10
|
+
let index = source.indexOf(substring);
|
|
11
|
+
let expected = index;
|
|
12
|
+
let count = 0;
|
|
13
|
+
let max = 0;
|
|
14
|
+
if (typeof substring !== "string") {
|
|
15
|
+
throw new TypeError("Expected substring");
|
|
16
|
+
}
|
|
17
|
+
while (index !== -1) {
|
|
18
|
+
if (index === expected) {
|
|
19
|
+
if (++count > max) {
|
|
20
|
+
max = count;
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
count = 1;
|
|
24
|
+
}
|
|
25
|
+
expected = index + substring.length;
|
|
26
|
+
index = source.indexOf(substring, expected);
|
|
27
|
+
}
|
|
28
|
+
return max;
|
|
29
|
+
}
|
|
30
|
+
__name(longestStreak, "longestStreak");
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
longestStreak
|
|
34
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
questionTerms
|
|
5
|
+
} from "./chunk-PHKED7AG.js";
|
|
6
|
+
import {
|
|
7
|
+
meaningFloor
|
|
8
|
+
} from "./chunk-DGMTSDKB.js";
|
|
9
|
+
import {
|
|
10
|
+
validateVector
|
|
11
|
+
} from "./chunk-AZLDR36U.js";
|
|
12
|
+
import {
|
|
13
|
+
RRF_K,
|
|
14
|
+
plainQuery
|
|
15
|
+
} from "./chunk-LC6WE6JS.js";
|
|
16
|
+
import {
|
|
17
|
+
MEETING_FIELD_NAMES,
|
|
18
|
+
formatMeetingReference,
|
|
19
|
+
liftMeetingFields,
|
|
20
|
+
parseMeetingReference,
|
|
21
|
+
refreshMeetingIndex
|
|
22
|
+
} from "./chunk-JVESLS7B.js";
|
|
23
|
+
import {
|
|
24
|
+
CliError
|
|
25
|
+
} from "./chunk-HM6AMYHR.js";
|
|
26
|
+
import {
|
|
27
|
+
__name
|
|
28
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
29
|
+
|
|
30
|
+
// 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/services/meeting-combined.js
|
|
31
|
+
import { createHash } from "node:crypto";
|
|
32
|
+
|
|
33
|
+
// 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/services/meeting-hit-search.js
|
|
34
|
+
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
35
|
+
const { project, tag, topic, ...input } = request;
|
|
36
|
+
input.signal?.throwIfAborted();
|
|
37
|
+
if (project !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
|
|
38
|
+
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
39
|
+
const selection = [];
|
|
40
|
+
const knowledge = store.knowledge;
|
|
41
|
+
if (!knowledge && [project, tag, topic].some((value) => value !== void 0))
|
|
42
|
+
throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
|
|
43
|
+
for (const [kind, name] of [
|
|
44
|
+
["project", project],
|
|
45
|
+
["tag", tag],
|
|
46
|
+
["topic", topic]
|
|
47
|
+
]) {
|
|
48
|
+
if (name === void 0)
|
|
49
|
+
continue;
|
|
50
|
+
if (!knowledge)
|
|
51
|
+
continue;
|
|
52
|
+
const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
|
|
53
|
+
input.signal?.throwIfAborted();
|
|
54
|
+
if (found.ambiguous || found.matches.length !== 1)
|
|
55
|
+
throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
|
|
56
|
+
candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
|
|
57
|
+
});
|
|
58
|
+
const entry = found.matches[0];
|
|
59
|
+
const id = Number(entry?.id);
|
|
60
|
+
if (!entry || entry.kind !== kind || !Number.isSafeInteger(id) || id < 1)
|
|
61
|
+
throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
|
|
62
|
+
if (kind === "project")
|
|
63
|
+
input.projectId = id;
|
|
64
|
+
else
|
|
65
|
+
input.tagId = id;
|
|
66
|
+
selection.push({ kind, id, name: entry.name, by: "explicit-link" });
|
|
67
|
+
}
|
|
68
|
+
return { input, selection };
|
|
69
|
+
}, "resolveMeetingSelection");
|
|
70
|
+
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
|
|
71
|
+
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
72
|
+
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
73
|
+
if (options.refreshIndex !== false)
|
|
74
|
+
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
75
|
+
const result = await store.meetings.searchHits(lifted.query, input);
|
|
76
|
+
input.signal?.throwIfAborted();
|
|
77
|
+
return { ...result, selection };
|
|
78
|
+
}, "searchMeetingHits");
|
|
79
|
+
|
|
80
|
+
// 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/services/meeting-combined.js
|
|
81
|
+
var DEPTH = 200;
|
|
82
|
+
var cursorOf = /* @__PURE__ */ __name((value, key) => {
|
|
83
|
+
if (value === void 0)
|
|
84
|
+
return 0;
|
|
85
|
+
let cursor;
|
|
86
|
+
try {
|
|
87
|
+
cursor = JSON.parse(Buffer.from(value, "base64url").toString("utf8"));
|
|
88
|
+
} catch {
|
|
89
|
+
throw new CliError("validation_error", "the cursor is not from a combined meeting search; search again");
|
|
90
|
+
}
|
|
91
|
+
if (cursor?.version !== 1 || cursor.key !== key || !Number.isSafeInteger(cursor.offset) || cursor.offset < 0)
|
|
92
|
+
throw new CliError("validation_error", "the cursor belongs to another query, filter or model; search again");
|
|
93
|
+
return cursor.offset;
|
|
94
|
+
}, "cursorOf");
|
|
95
|
+
var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
|
|
96
|
+
const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
|
|
97
|
+
const { query, request: words } = liftMeetingFields(typed, chosen);
|
|
98
|
+
const { input, selection } = await resolveMeetingSelection(store, words);
|
|
99
|
+
const { after, limit = 20, maxReadBytes, ...filters } = input;
|
|
100
|
+
const terms = questionTerms(query);
|
|
101
|
+
const wordQuery = terms === null ? query : terms.join(" ");
|
|
102
|
+
const key = createHash("sha256").update(JSON.stringify([query, embedder.key, Object.entries(filters).filter(([name]) => name !== "signal")])).digest("base64url");
|
|
103
|
+
const offset = cursorOf(after, key);
|
|
104
|
+
let byWords = [];
|
|
105
|
+
let indexing = "ready";
|
|
106
|
+
let refused;
|
|
107
|
+
if (wordQuery.trim()) {
|
|
108
|
+
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
109
|
+
try {
|
|
110
|
+
const page = await store.meetings.searchHits(wordQuery, { ...filters, limit: DEPTH, maxReadBytes });
|
|
111
|
+
byWords = page.items;
|
|
112
|
+
indexing = page.coverage.indexing;
|
|
113
|
+
} catch (error) {
|
|
114
|
+
if (!(error instanceof CliError) || error.code !== "validation_error")
|
|
115
|
+
throw error;
|
|
116
|
+
refused = error.message;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
input.signal?.throwIfAborted();
|
|
120
|
+
const vectors = await embedder.embed([query], "query");
|
|
121
|
+
if (vectors.length !== 1)
|
|
122
|
+
throw new CliError("invalid_response", "Meeting query model returned another vector count");
|
|
123
|
+
const vector = vectors[0];
|
|
124
|
+
const ranked = await store.meetingVectors.ranked(embedder.key, validateVector(vector, embedder.dims), {
|
|
125
|
+
...filters,
|
|
126
|
+
limit: DEPTH,
|
|
127
|
+
...maxChunks === void 0 ? {} : { maxChunks },
|
|
128
|
+
...maxRows === void 0 ? {} : { maxRows },
|
|
129
|
+
...maxTextBytes === void 0 ? {} : { maxTextBytes }
|
|
130
|
+
});
|
|
131
|
+
const floor = meaningFloor(embedder.key);
|
|
132
|
+
const byMeaning = ranked.items.filter(({ score }) => score > floor);
|
|
133
|
+
const merged = /* @__PURE__ */ new Map();
|
|
134
|
+
byMeaning.forEach((hit, rank) => {
|
|
135
|
+
const reference = { type: "meeting", accountId: input.accountId, meetingId: hit.meetingId };
|
|
136
|
+
const first = formatMeetingReference({
|
|
137
|
+
...reference,
|
|
138
|
+
transcriptId: hit.transcriptId,
|
|
139
|
+
cuePosition: hit.firstPosition
|
|
140
|
+
});
|
|
141
|
+
merged.set(`${hit.transcriptId}:${hit.firstPosition}`, {
|
|
142
|
+
ref: first,
|
|
143
|
+
meetingId: hit.meetingId,
|
|
144
|
+
scope: "transcript",
|
|
145
|
+
text: hit.text,
|
|
146
|
+
startMs: null,
|
|
147
|
+
source: { title: hit.title, startedAt: hit.startedAt, url: null },
|
|
148
|
+
by: ["meaning"],
|
|
149
|
+
score: hit.score,
|
|
150
|
+
passage: {
|
|
151
|
+
first,
|
|
152
|
+
last: formatMeetingReference({ ...reference, transcriptId: hit.transcriptId, cuePosition: hit.lastPosition })
|
|
153
|
+
},
|
|
154
|
+
fused: 1 / (RRF_K + rank + 1)
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
byWords.forEach((hit, rank) => {
|
|
158
|
+
const share = 1 / (RRF_K + rank + 1);
|
|
159
|
+
const cue = hit.scope === "transcript" ? parseMeetingReference(hit.ref) : void 0;
|
|
160
|
+
const within = cue?.cuePosition === void 0 ? void 0 : byMeaning.find((passage) => passage.transcriptId === cue.transcriptId && passage.firstPosition <= cue.cuePosition && cue.cuePosition <= passage.lastPosition);
|
|
161
|
+
const held = within && merged.get(`${within.transcriptId}:${within.firstPosition}`);
|
|
162
|
+
const found = {
|
|
163
|
+
ref: hit.ref,
|
|
164
|
+
text: hit.text,
|
|
165
|
+
startMs: hit.startMs,
|
|
166
|
+
...hit.match === void 0 ? {} : { match: hit.match },
|
|
167
|
+
...hit.corrections === void 0 ? {} : { corrections: hit.corrections }
|
|
168
|
+
};
|
|
169
|
+
if (held && !held.by.includes("words")) {
|
|
170
|
+
Object.assign(held, found, { by: ["words", "meaning"], fused: held.fused + share });
|
|
171
|
+
if (hit.source?.url)
|
|
172
|
+
held.source.url = hit.source.url;
|
|
173
|
+
} else if (held)
|
|
174
|
+
held.fused += share;
|
|
175
|
+
else
|
|
176
|
+
merged.set(`w:${hit.ref}:${hit.scope}:${hit.id}`, {
|
|
177
|
+
...found,
|
|
178
|
+
meetingId: hit.meetingId,
|
|
179
|
+
scope: hit.scope,
|
|
180
|
+
source: {
|
|
181
|
+
title: hit.source?.title ?? null,
|
|
182
|
+
startedAt: hit.source?.startedAt ?? null,
|
|
183
|
+
url: hit.source?.url ?? null
|
|
184
|
+
},
|
|
185
|
+
by: ["words"],
|
|
186
|
+
score: null,
|
|
187
|
+
fused: share
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
const ordered = [...merged.values()].sort((a, b) => b.fused - a.fused || Number(b.by.includes("words")) - Number(a.by.includes("words")) || (b.score ?? -2) - (a.score ?? -2));
|
|
191
|
+
const items = ordered.slice(offset, offset + limit).map(({ fused: _, ...hit }) => hit);
|
|
192
|
+
const hasMore = ordered.length > offset + limit;
|
|
193
|
+
return {
|
|
194
|
+
items,
|
|
195
|
+
hasMore,
|
|
196
|
+
nextCursor: hasMore ? Buffer.from(JSON.stringify({ version: 1, key, offset: offset + limit })).toString("base64url") : null,
|
|
197
|
+
selection,
|
|
198
|
+
words: {
|
|
199
|
+
query: wordQuery,
|
|
200
|
+
...terms === null ? {} : { from: "question" },
|
|
201
|
+
...refused === void 0 ? {} : { refused }
|
|
202
|
+
},
|
|
203
|
+
model: { key: embedder.key, model: embedder.model, kind: embedder.kind, dims: embedder.dims },
|
|
204
|
+
coverage: {
|
|
205
|
+
archiveCompleteness: "unknown",
|
|
206
|
+
indexCompleteness: "unknown",
|
|
207
|
+
indexing,
|
|
208
|
+
/** Every vector of the selection was compared; false when `maxChunks` stopped the scan. */
|
|
209
|
+
meaningScanComplete: ranked.complete,
|
|
210
|
+
scanned: ranked.scanned,
|
|
211
|
+
/** Each side ranks this many at most; pages past them hold nothing more. */
|
|
212
|
+
depth: DEPTH
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
}, "searchMeetingsCombined");
|
|
216
|
+
|
|
217
|
+
export {
|
|
218
|
+
resolveMeetingSelection,
|
|
219
|
+
searchMeetingHits,
|
|
220
|
+
searchMeetingsCombined
|
|
221
|
+
};
|
|
@@ -23,28 +23,28 @@ import {
|
|
|
23
23
|
tagMemberIds,
|
|
24
24
|
thingOf,
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import {
|
|
28
|
-
fold
|
|
29
|
-
} from "./chunk-6JBLIQQN.js";
|
|
26
|
+
} from "./chunk-YDDI4QIT.js";
|
|
30
27
|
import {
|
|
31
28
|
ADDED_PROVIDER,
|
|
32
29
|
filesAccountSql,
|
|
33
30
|
folderProviderOf,
|
|
34
31
|
folderProviderSql,
|
|
35
32
|
isDocumentAccountProvider
|
|
36
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-BEV5LO4D.js";
|
|
37
34
|
import {
|
|
38
35
|
damagedFile
|
|
39
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LQVDFD65.js";
|
|
37
|
+
import {
|
|
38
|
+
fold
|
|
39
|
+
} from "./chunk-2Z7UOXFC.js";
|
|
40
40
|
import {
|
|
41
41
|
CliError
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-HM6AMYHR.js";
|
|
43
43
|
import {
|
|
44
44
|
__name
|
|
45
45
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
46
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// 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/store/damage.js
|
|
48
48
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
49
49
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
50
50
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
@@ -147,11 +147,11 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
|
|
|
147
147
|
};
|
|
148
148
|
}, "storeDamageReport");
|
|
149
149
|
|
|
150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// 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/store/document-transfer/index.js
|
|
151
151
|
import { realpathSync, statSync } from "node:fs";
|
|
152
152
|
import { resolve } from "node:path";
|
|
153
153
|
|
|
154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
154
|
+
// 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/store/sqlite/document-transfer/people.js
|
|
155
155
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
156
156
|
const creatable = /* @__PURE__ */ new Set();
|
|
157
157
|
let people = 0, identities = 0;
|
|
@@ -214,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
214
214
|
}
|
|
215
215
|
}, "copyPeople");
|
|
216
216
|
|
|
217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
217
|
+
// 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/store/document-transfer/digest.js
|
|
218
218
|
import { createHash } from "node:crypto";
|
|
219
219
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
220
220
|
|
|
221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
221
|
+
// 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/store/sqlite/document-transfer/collection.js
|
|
222
222
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
223
223
|
const colon = collection.indexOf(":");
|
|
224
224
|
const provider = collection.slice(0, colon);
|
|
@@ -262,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
262
262
|
};
|
|
263
263
|
}, "currentCollection");
|
|
264
264
|
|
|
265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
265
|
+
// 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/store/sqlite/document-transfer/plan.js
|
|
266
266
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
267
267
|
const mappings = /* @__PURE__ */ new Map();
|
|
268
268
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -429,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
429
429
|
};
|
|
430
430
|
}, "planTransfer");
|
|
431
431
|
|
|
432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
432
|
+
// 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/store/sqlite/document-transfer/snapshot.js
|
|
433
433
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
434
434
|
var MAX_ENTITIES = 1e3;
|
|
435
435
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -591,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
591
591
|
};
|
|
592
592
|
}), "transferSnapshot");
|
|
593
593
|
|
|
594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
594
|
+
// 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/store/sqlite/document-transfer/apply.js
|
|
595
595
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
596
596
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
597
597
|
return provider ?? null;
|
|
@@ -763,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
763
763
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
764
764
|
}, "remapEntity");
|
|
765
765
|
|
|
766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
766
|
+
// 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/store/document-transfer/index.js
|
|
767
767
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
768
768
|
for (const value of [options.source, options.destination, options.collection])
|
|
769
769
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -865,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
|
865
865
|
}
|
|
866
866
|
}, "applyWith");
|
|
867
867
|
|
|
868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
868
|
+
// 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/store/health.js
|
|
869
869
|
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
870
870
|
var JSON_COLUMNS = {
|
|
871
871
|
accounts: ["settings"],
|
|
@@ -1007,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
1007
1007
|
}
|
|
1008
1008
|
}, "storeHealth");
|
|
1009
1009
|
|
|
1010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1010
|
+
// 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/store/project-transfer/preview.js
|
|
1011
1011
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
1012
1012
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
1013
1013
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -1033,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
1033
1033
|
});
|
|
1034
1034
|
}, "previewProjectAnnotationSnapshot");
|
|
1035
1035
|
|
|
1036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1036
|
+
// 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/store/project-transfer/snapshot.js
|
|
1037
1037
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
1038
1038
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
1039
1039
|
throw new CliError("validation_error", "snapshot options are required");
|