@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
|
@@ -3,14 +3,14 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
providerWaitMs,
|
|
5
5
|
statusToCode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OW5HW3TD.js";
|
|
7
7
|
import {
|
|
8
8
|
defineReasons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A3RJ6FD5.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError,
|
|
12
12
|
isCliError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4FHKSSXQ.js";
|
|
14
14
|
import {
|
|
15
15
|
__commonJS,
|
|
16
16
|
__name,
|
|
@@ -2996,7 +2996,6 @@ var REASONS = defineReasons([
|
|
|
2996
2996
|
["notion.invalid-response", "invalid_response", "Notion's answer does not have the documented shape"],
|
|
2997
2997
|
["notion.id-invalid", "validation_error", "that is not a Notion id or link"],
|
|
2998
2998
|
["notion.truncated", "provider_error", "Notion gave only part of the page"],
|
|
2999
|
-
["notion.no-workspace", "invalid_response", "Notion did not name the token's workspace"],
|
|
3000
2999
|
["notion.failed", "provider_error", "a Notion read failed"],
|
|
3001
3000
|
["notion.search-incomplete", "provider_error", "Notion cut the search for edits short"],
|
|
3002
3001
|
["notion.window-too-dense", "validation_error", "more than 10,000 rows of one database share one minute"],
|
|
@@ -3100,9 +3099,24 @@ var mapped = /* @__PURE__ */ __name(async (call) => {
|
|
|
3100
3099
|
var isNotFound = /* @__PURE__ */ __name((error) => isCliError(error) && error.code === "not_found", "isNotFound");
|
|
3101
3100
|
var isItemError = /* @__PURE__ */ __name((error) => isCliError(error) && (error.code === "not_found" || error.code === "permission_error"), "isItemError");
|
|
3102
3101
|
var isRefused = /* @__PURE__ */ __name((error) => isCliError(error) && error.code === "validation_error" && error.details.status === 400, "isRefused");
|
|
3102
|
+
var notionRefusal = /* @__PURE__ */ __name((status, answer) => {
|
|
3103
|
+
if (status === 429 || status === 529)
|
|
3104
|
+
return void 0;
|
|
3105
|
+
const body = answer ?? {};
|
|
3106
|
+
const failed = failureOf(new import_client.APIResponseError({
|
|
3107
|
+
code: typeof body.code === "string" ? body.code : "unknown",
|
|
3108
|
+
status,
|
|
3109
|
+
message: "",
|
|
3110
|
+
headers: new Headers(),
|
|
3111
|
+
rawBodyText: "",
|
|
3112
|
+
additional_data: body.additional_data && typeof body.additional_data === "object" ? body.additional_data : void 0,
|
|
3113
|
+
request_id: typeof body.request_id === "string" ? body.request_id : void 0
|
|
3114
|
+
}));
|
|
3115
|
+
return failed instanceof CliError ? failed : void 0;
|
|
3116
|
+
}, "notionRefusal");
|
|
3103
3117
|
|
|
3104
3118
|
// dist/version.js
|
|
3105
|
-
var VERSION = "0.
|
|
3119
|
+
var VERSION = "0.7.0";
|
|
3106
3120
|
|
|
3107
3121
|
// dist/identity.js
|
|
3108
3122
|
var PACKAGE = "@wirecat/notion-cli";
|
|
@@ -3136,11 +3150,11 @@ export {
|
|
|
3136
3150
|
NOTION,
|
|
3137
3151
|
BLOCKED,
|
|
3138
3152
|
blocked,
|
|
3139
|
-
failureOf,
|
|
3140
3153
|
mapped,
|
|
3141
3154
|
isNotFound,
|
|
3142
3155
|
isItemError,
|
|
3143
3156
|
isRefused,
|
|
3157
|
+
notionRefusal,
|
|
3144
3158
|
VERSION,
|
|
3145
3159
|
PACKAGE,
|
|
3146
3160
|
IDENTITY,
|
|
@@ -2,29 +2,21 @@ 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-OALFRUMI.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PACE,
|
|
8
8
|
FloodMemory,
|
|
9
|
-
OFFLINE,
|
|
10
9
|
Pacer,
|
|
11
10
|
RecipientList,
|
|
12
|
-
capability,
|
|
13
11
|
ceilingRefusal,
|
|
14
|
-
chatIdIn,
|
|
15
12
|
floodPathFor,
|
|
16
13
|
guardFor,
|
|
17
14
|
holdEnd,
|
|
18
15
|
pacePathFor,
|
|
19
|
-
profilesOnAccount,
|
|
20
16
|
recipientsPathFor,
|
|
21
17
|
servicesFor,
|
|
22
|
-
throughWrapper,
|
|
23
18
|
waitForTurn
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
servingProfiles
|
|
27
|
-
} from "./chunk-DO7BLXO3.js";
|
|
19
|
+
} from "./chunk-BFHPT67P.js";
|
|
28
20
|
import {
|
|
29
21
|
AUTHORITY_KEY,
|
|
30
22
|
CEILING_KEY,
|
|
@@ -33,8 +25,6 @@ import {
|
|
|
33
25
|
WRITE_KEYS,
|
|
34
26
|
asFirstWord,
|
|
35
27
|
baseContext,
|
|
36
|
-
codeOf,
|
|
37
|
-
currentOperation,
|
|
38
28
|
environmentOf,
|
|
39
29
|
fetchesUnder,
|
|
40
30
|
issueMessage,
|
|
@@ -48,29 +38,47 @@ import {
|
|
|
48
38
|
rememberAccount,
|
|
49
39
|
rootOf2 as rootOf,
|
|
50
40
|
skipFlagFor
|
|
51
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LBRTLZHI.js";
|
|
52
42
|
import {
|
|
53
43
|
providerErrorKey
|
|
54
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-BQ6CXCLP.js";
|
|
45
|
+
import {
|
|
46
|
+
OFFLINE,
|
|
47
|
+
chatIdIn,
|
|
48
|
+
profilesOnAccount
|
|
49
|
+
} from "./chunk-ADCAWRRX.js";
|
|
50
|
+
import {
|
|
51
|
+
capability,
|
|
52
|
+
throughWrapper
|
|
53
|
+
} from "./chunk-EMIJVLOA.js";
|
|
54
|
+
import {
|
|
55
|
+
codeOf,
|
|
56
|
+
currentOperation
|
|
57
|
+
} from "./chunk-3ZSUVFR7.js";
|
|
58
|
+
import {
|
|
59
|
+
servingProfiles
|
|
60
|
+
} from "./chunk-KWBLDSRV.js";
|
|
61
|
+
import {
|
|
62
|
+
openStore
|
|
63
|
+
} from "./chunk-VXKD533R.js";
|
|
55
64
|
import {
|
|
56
65
|
chatReferenceOf,
|
|
57
66
|
ensureAccount,
|
|
58
67
|
foldName,
|
|
59
68
|
isId,
|
|
60
|
-
openStore,
|
|
61
69
|
pickPerson
|
|
62
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-UQVUXG7H.js";
|
|
63
71
|
import {
|
|
64
72
|
isCliFailure
|
|
65
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-S5P7THM5.js";
|
|
66
74
|
import {
|
|
67
75
|
CliError
|
|
68
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-4FHKSSXQ.js";
|
|
69
77
|
import {
|
|
70
78
|
__name
|
|
71
79
|
} from "./chunk-ZVVMGPBJ.js";
|
|
72
80
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
81
|
+
// 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/ask.js
|
|
74
82
|
import { openSync } from "node:fs";
|
|
75
83
|
import { createInterface } from "node:readline";
|
|
76
84
|
import { ReadStream } from "node:tty";
|
|
@@ -125,7 +133,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
125
133
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
126
134
|
}, "terminalAsker");
|
|
127
135
|
|
|
128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// 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/permission-keys.js
|
|
129
137
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
130
138
|
"help",
|
|
131
139
|
"guide",
|
|
@@ -205,7 +213,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
205
213
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
206
214
|
}, "refuseUnknownPermissionKeys");
|
|
207
215
|
|
|
208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
216
|
+
// 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/flooded.js
|
|
209
217
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
210
218
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
211
219
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -302,7 +310,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
302
310
|
});
|
|
303
311
|
}, "flooded");
|
|
304
312
|
|
|
305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
313
|
+
// 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/observed.js
|
|
306
314
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
307
315
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
308
316
|
const write = currentOperation();
|
|
@@ -401,7 +409,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
401
409
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
402
410
|
}, "byPart");
|
|
403
411
|
|
|
404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
412
|
+
// 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/stored.js
|
|
405
413
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
406
414
|
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" }) => {
|
|
407
415
|
let warned = false;
|
|
@@ -977,7 +985,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
977
985
|
}
|
|
978
986
|
}, "keep");
|
|
979
987
|
|
|
980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
988
|
+
// 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/context.js
|
|
981
989
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
982
990
|
let opened;
|
|
983
991
|
return {
|
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
meaningFloor
|
|
8
|
-
} from "./chunk-ONZVPE24.js";
|
|
9
|
-
import {
|
|
10
|
-
MESSAGE_PARSING,
|
|
11
|
-
RRF_K,
|
|
12
|
-
plainQuery
|
|
13
|
-
} from "./chunk-QYXWRKNA.js";
|
|
4
|
+
MESSAGE_PARSING
|
|
5
|
+
} from "./chunk-FHYV4VWY.js";
|
|
14
6
|
import {
|
|
15
7
|
normalize
|
|
16
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6MQSBWWF.js";
|
|
17
9
|
import {
|
|
18
|
-
MEETING_FIELD_NAMES,
|
|
19
|
-
formatMeetingReference,
|
|
20
10
|
implicitTextTerms,
|
|
21
|
-
liftMeetingFields,
|
|
22
11
|
parseLucene,
|
|
23
|
-
parseMeetingReference,
|
|
24
|
-
refreshMeetingIndex,
|
|
25
12
|
walkQuery
|
|
26
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RXGX2CZX.js";
|
|
27
14
|
import {
|
|
28
15
|
CliError
|
|
29
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4FHKSSXQ.js";
|
|
30
17
|
import {
|
|
31
18
|
__name
|
|
32
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
33
20
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35
|
-
import { createHash } from "node:crypto";
|
|
36
|
-
|
|
37
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
21
|
+
// 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/search/question-plan.js
|
|
38
22
|
var words = /* @__PURE__ */ __name((text) => normalize(text).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
39
23
|
var joinedHyphens = /* @__PURE__ */ __name((text) => (normalize(text).match(new RegExp("(?<![:\\p{L}\\p{N}-])\\p{L}[\\p{L}\\p{N}]*(?:-\\p{L}[\\p{L}\\p{N}]*)+", "gu")) ?? []).map((word) => word.replaceAll("-", "")), "joinedHyphens");
|
|
40
24
|
var scaffolding = new Set(words("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
@@ -171,200 +155,14 @@ var questionLookup = /* @__PURE__ */ __name((text) => {
|
|
|
171
155
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
172
156
|
}, "questionLookup");
|
|
173
157
|
|
|
174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
175
|
-
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
176
|
-
const { project, tag, topic, ...input } = request;
|
|
177
|
-
input.signal?.throwIfAborted();
|
|
178
|
-
if (project !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
|
|
179
|
-
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
180
|
-
const selection = [];
|
|
181
|
-
const knowledge = store.knowledge;
|
|
182
|
-
if (!knowledge && [project, tag, topic].some((value) => value !== void 0))
|
|
183
|
-
throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
|
|
184
|
-
for (const [kind, name] of [
|
|
185
|
-
["project", project],
|
|
186
|
-
["tag", tag],
|
|
187
|
-
["topic", topic]
|
|
188
|
-
]) {
|
|
189
|
-
if (name === void 0)
|
|
190
|
-
continue;
|
|
191
|
-
if (!knowledge)
|
|
192
|
-
continue;
|
|
193
|
-
const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
|
|
194
|
-
input.signal?.throwIfAborted();
|
|
195
|
-
if (found.ambiguous || found.matches.length !== 1)
|
|
196
|
-
throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
|
|
197
|
-
candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
|
|
198
|
-
});
|
|
199
|
-
const entry = found.matches[0];
|
|
200
|
-
const id = Number(entry?.id);
|
|
201
|
-
if (!entry || entry.kind !== kind || !Number.isSafeInteger(id) || id < 1)
|
|
202
|
-
throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
|
|
203
|
-
if (kind === "project")
|
|
204
|
-
input.projectId = id;
|
|
205
|
-
else
|
|
206
|
-
input.tagId = id;
|
|
207
|
-
selection.push({ kind, id, name: entry.name, by: "explicit-link" });
|
|
208
|
-
}
|
|
209
|
-
return { input, selection };
|
|
210
|
-
}, "resolveMeetingSelection");
|
|
211
|
-
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
|
|
212
|
-
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
213
|
-
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
214
|
-
if (options.refreshIndex !== false)
|
|
215
|
-
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
216
|
-
const result = await store.meetings.searchHits(lifted.query, input);
|
|
217
|
-
input.signal?.throwIfAborted();
|
|
218
|
-
return { ...result, selection };
|
|
219
|
-
}, "searchMeetingHits");
|
|
220
|
-
|
|
221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
222
|
-
var DEPTH = 200;
|
|
223
|
-
var cursorOf = /* @__PURE__ */ __name((value, key) => {
|
|
224
|
-
if (value === void 0)
|
|
225
|
-
return 0;
|
|
226
|
-
let cursor;
|
|
227
|
-
try {
|
|
228
|
-
cursor = JSON.parse(Buffer.from(value, "base64url").toString("utf8"));
|
|
229
|
-
} catch {
|
|
230
|
-
throw new CliError("validation_error", "the cursor is not from a combined meeting search; search again");
|
|
231
|
-
}
|
|
232
|
-
if (cursor?.version !== 1 || cursor.key !== key || !Number.isSafeInteger(cursor.offset) || cursor.offset < 0)
|
|
233
|
-
throw new CliError("validation_error", "the cursor belongs to another query, filter or model; search again");
|
|
234
|
-
return cursor.offset;
|
|
235
|
-
}, "cursorOf");
|
|
236
|
-
var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
|
|
237
|
-
const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
|
|
238
|
-
const { query, request: words2 } = liftMeetingFields(typed, chosen);
|
|
239
|
-
const { input, selection } = await resolveMeetingSelection(store, words2);
|
|
240
|
-
const { after, limit = 20, maxReadBytes, ...filters } = input;
|
|
241
|
-
const terms = questionTerms(query);
|
|
242
|
-
const wordQuery = terms === null ? query : terms.join(" ");
|
|
243
|
-
const key = createHash("sha256").update(JSON.stringify([query, embedder.key, Object.entries(filters).filter(([name]) => name !== "signal")])).digest("base64url");
|
|
244
|
-
const offset = cursorOf(after, key);
|
|
245
|
-
let byWords = [];
|
|
246
|
-
let indexing = "ready";
|
|
247
|
-
let refused;
|
|
248
|
-
if (wordQuery.trim()) {
|
|
249
|
-
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
250
|
-
try {
|
|
251
|
-
const page = await store.meetings.searchHits(wordQuery, { ...filters, limit: DEPTH, maxReadBytes });
|
|
252
|
-
byWords = page.items;
|
|
253
|
-
indexing = page.coverage.indexing;
|
|
254
|
-
} catch (error) {
|
|
255
|
-
if (!(error instanceof CliError) || error.code !== "validation_error")
|
|
256
|
-
throw error;
|
|
257
|
-
refused = error.message;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
input.signal?.throwIfAborted();
|
|
261
|
-
const vectors = await embedder.embed([query], "query");
|
|
262
|
-
if (vectors.length !== 1)
|
|
263
|
-
throw new CliError("invalid_response", "Meeting query model returned another vector count");
|
|
264
|
-
const vector = vectors[0];
|
|
265
|
-
const ranked = await store.meetingVectors.ranked(embedder.key, validateVector(vector, embedder.dims), {
|
|
266
|
-
...filters,
|
|
267
|
-
limit: DEPTH,
|
|
268
|
-
...maxChunks === void 0 ? {} : { maxChunks },
|
|
269
|
-
...maxRows === void 0 ? {} : { maxRows },
|
|
270
|
-
...maxTextBytes === void 0 ? {} : { maxTextBytes }
|
|
271
|
-
});
|
|
272
|
-
const floor = meaningFloor(embedder.key);
|
|
273
|
-
const byMeaning = ranked.items.filter(({ score }) => score > floor);
|
|
274
|
-
const merged = /* @__PURE__ */ new Map();
|
|
275
|
-
byMeaning.forEach((hit, rank) => {
|
|
276
|
-
const reference = { type: "meeting", accountId: input.accountId, meetingId: hit.meetingId };
|
|
277
|
-
const first = formatMeetingReference({
|
|
278
|
-
...reference,
|
|
279
|
-
transcriptId: hit.transcriptId,
|
|
280
|
-
cuePosition: hit.firstPosition
|
|
281
|
-
});
|
|
282
|
-
merged.set(`${hit.transcriptId}:${hit.firstPosition}`, {
|
|
283
|
-
ref: first,
|
|
284
|
-
meetingId: hit.meetingId,
|
|
285
|
-
scope: "transcript",
|
|
286
|
-
text: hit.text,
|
|
287
|
-
startMs: null,
|
|
288
|
-
source: { title: hit.title, startedAt: hit.startedAt, url: null },
|
|
289
|
-
by: ["meaning"],
|
|
290
|
-
score: hit.score,
|
|
291
|
-
passage: {
|
|
292
|
-
first,
|
|
293
|
-
last: formatMeetingReference({ ...reference, transcriptId: hit.transcriptId, cuePosition: hit.lastPosition })
|
|
294
|
-
},
|
|
295
|
-
fused: 1 / (RRF_K + rank + 1)
|
|
296
|
-
});
|
|
297
|
-
});
|
|
298
|
-
byWords.forEach((hit, rank) => {
|
|
299
|
-
const share = 1 / (RRF_K + rank + 1);
|
|
300
|
-
const cue = hit.scope === "transcript" ? parseMeetingReference(hit.ref) : void 0;
|
|
301
|
-
const within = cue?.cuePosition === void 0 ? void 0 : byMeaning.find((passage) => passage.transcriptId === cue.transcriptId && passage.firstPosition <= cue.cuePosition && cue.cuePosition <= passage.lastPosition);
|
|
302
|
-
const held = within && merged.get(`${within.transcriptId}:${within.firstPosition}`);
|
|
303
|
-
const found = {
|
|
304
|
-
ref: hit.ref,
|
|
305
|
-
text: hit.text,
|
|
306
|
-
startMs: hit.startMs,
|
|
307
|
-
...hit.match === void 0 ? {} : { match: hit.match },
|
|
308
|
-
...hit.corrections === void 0 ? {} : { corrections: hit.corrections }
|
|
309
|
-
};
|
|
310
|
-
if (held && !held.by.includes("words")) {
|
|
311
|
-
Object.assign(held, found, { by: ["words", "meaning"], fused: held.fused + share });
|
|
312
|
-
if (hit.source?.url)
|
|
313
|
-
held.source.url = hit.source.url;
|
|
314
|
-
} else if (held)
|
|
315
|
-
held.fused += share;
|
|
316
|
-
else
|
|
317
|
-
merged.set(`w:${hit.ref}:${hit.scope}:${hit.id}`, {
|
|
318
|
-
...found,
|
|
319
|
-
meetingId: hit.meetingId,
|
|
320
|
-
scope: hit.scope,
|
|
321
|
-
source: {
|
|
322
|
-
title: hit.source?.title ?? null,
|
|
323
|
-
startedAt: hit.source?.startedAt ?? null,
|
|
324
|
-
url: hit.source?.url ?? null
|
|
325
|
-
},
|
|
326
|
-
by: ["words"],
|
|
327
|
-
score: null,
|
|
328
|
-
fused: share
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
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));
|
|
332
|
-
const items = ordered.slice(offset, offset + limit).map(({ fused: _, ...hit }) => hit);
|
|
333
|
-
const hasMore = ordered.length > offset + limit;
|
|
334
|
-
return {
|
|
335
|
-
items,
|
|
336
|
-
hasMore,
|
|
337
|
-
nextCursor: hasMore ? Buffer.from(JSON.stringify({ version: 1, key, offset: offset + limit })).toString("base64url") : null,
|
|
338
|
-
selection,
|
|
339
|
-
words: {
|
|
340
|
-
query: wordQuery,
|
|
341
|
-
...terms === null ? {} : { from: "question" },
|
|
342
|
-
...refused === void 0 ? {} : { refused }
|
|
343
|
-
},
|
|
344
|
-
model: { key: embedder.key, model: embedder.model, kind: embedder.kind, dims: embedder.dims },
|
|
345
|
-
coverage: {
|
|
346
|
-
archiveCompleteness: "unknown",
|
|
347
|
-
indexCompleteness: "unknown",
|
|
348
|
-
indexing,
|
|
349
|
-
/** Every vector of the selection was compared; false when `maxChunks` stopped the scan. */
|
|
350
|
-
meaningScanComplete: ranked.complete,
|
|
351
|
-
scanned: ranked.scanned,
|
|
352
|
-
/** Each side ranks this many at most; pages past them hold nothing more. */
|
|
353
|
-
depth: DEPTH
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
}, "searchMeetingsCombined");
|
|
357
|
-
|
|
358
158
|
export {
|
|
359
159
|
words,
|
|
360
160
|
joinedHyphens,
|
|
361
161
|
isFunctionWord,
|
|
162
|
+
questionTerms,
|
|
362
163
|
planQuestion,
|
|
363
164
|
questionText,
|
|
364
165
|
lookupTerms,
|
|
365
166
|
anyOfTerms,
|
|
366
|
-
questionLookup
|
|
367
|
-
resolveMeetingSelection,
|
|
368
|
-
searchMeetingHits,
|
|
369
|
-
searchMeetingsCombined
|
|
167
|
+
questionLookup
|
|
370
168
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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/ccount@2.0.1/node_modules/ccount/index.js
|
|
8
|
+
function ccount(value, character) {
|
|
9
|
+
const source = String(value);
|
|
10
|
+
if (typeof character !== "string") {
|
|
11
|
+
throw new TypeError("Expected character");
|
|
12
|
+
}
|
|
13
|
+
let count = 0;
|
|
14
|
+
let index = source.indexOf(character);
|
|
15
|
+
while (index !== -1) {
|
|
16
|
+
count++;
|
|
17
|
+
index = source.indexOf(character, index + character.length);
|
|
18
|
+
}
|
|
19
|
+
return count;
|
|
20
|
+
}
|
|
21
|
+
__name(ccount, "ccount");
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
ccount
|
|
25
|
+
};
|
|
@@ -1,66 +1,10 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CliError,
|
|
5
|
-
errorCodes
|
|
6
|
-
} from "./chunk-DB2XKHI4.js";
|
|
7
3
|
import {
|
|
8
4
|
__name
|
|
9
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
6
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12
|
-
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
13
|
-
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
14
|
-
const { code, exitCode } = value ?? {};
|
|
15
|
-
return value instanceof Error && typeof code === "string" && code.startsWith("commander.") && typeof exitCode === "number";
|
|
16
|
-
}, "isCommanderFailure");
|
|
17
|
-
var USAGE_REASONS = {
|
|
18
|
-
"commander.unknownCommand": "usage.unknown-command",
|
|
19
|
-
"commander.unknownOption": "usage.unknown-option"
|
|
20
|
-
};
|
|
21
|
-
var usageReason = /* @__PURE__ */ __name((code) => USAGE_REASONS[code], "usageReason");
|
|
22
|
-
var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
|
|
23
|
-
var SQLITE_CORRUPT = 11;
|
|
24
|
-
var SQLITE_NOTADB = 26;
|
|
25
|
-
var DAMAGED_TEXT = /database disk image is malformed|file is not a database|fts5: corruption/i;
|
|
26
|
-
var sqliteCode = /* @__PURE__ */ __name((error) => {
|
|
27
|
-
const { errcode, errno, name } = error ?? {};
|
|
28
|
-
const code = typeof errcode === "number" ? errcode : name === "SQLiteError" && typeof errno === "number" ? errno : null;
|
|
29
|
-
return code === null ? void 0 : code & 255;
|
|
30
|
-
}, "sqliteCode");
|
|
31
|
-
var damageIn = /* @__PURE__ */ __name((error) => {
|
|
32
|
-
if (isCliFailure(error) || isCommanderFailure(error))
|
|
33
|
-
return void 0;
|
|
34
|
-
let at = error;
|
|
35
|
-
for (let depth = 0; depth < 5 && at instanceof Error; depth += 1) {
|
|
36
|
-
const code = sqliteCode(at);
|
|
37
|
-
if (code !== void 0 && [SQLITE_CORRUPT, SQLITE_NOTADB].includes(code) || DAMAGED_TEXT.test(at.message))
|
|
38
|
-
return at;
|
|
39
|
-
at = at.cause;
|
|
40
|
-
}
|
|
41
|
-
return void 0;
|
|
42
|
-
}, "damageIn");
|
|
43
|
-
var wrapping = /* @__PURE__ */ __name((error, original) => {
|
|
44
|
-
Object.defineProperty(error, "cause", { value: original, configurable: true, writable: true });
|
|
45
|
-
if (original instanceof Error && original.stack)
|
|
46
|
-
error.stack = original.stack;
|
|
47
|
-
return error;
|
|
48
|
-
}, "wrapping");
|
|
49
|
-
var storeDamaged = /* @__PURE__ */ __name((error, next) => damageIn(error) ? wrapping(new CliError("configuration_error", `the store file is damaged${next ? `; \`${next}\` says what is damaged and what to do` : ""}`, { reason: "store.damaged" }), error) : error, "storeDamaged");
|
|
50
|
-
var damagedFile = /* @__PURE__ */ __name(async (files, work) => {
|
|
51
|
-
try {
|
|
52
|
-
return await work();
|
|
53
|
-
} catch (error) {
|
|
54
|
-
if (!damageIn(error))
|
|
55
|
-
throw error;
|
|
56
|
-
throw wrapping(new CliError("validation_error", `${files.join(" or ")} is damaged or not a database`, {
|
|
57
|
-
reason: "store.file-damaged"
|
|
58
|
-
}), error);
|
|
59
|
-
}
|
|
60
|
-
}, "damagedFile");
|
|
61
|
-
var isStoreDamage = /* @__PURE__ */ __name((error) => damageIn(error) !== void 0, "isStoreDamage");
|
|
62
|
-
|
|
63
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
7
|
+
// 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/runs/secrets.js
|
|
64
8
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
65
9
|
"authorization",
|
|
66
10
|
"cookie",
|
|
@@ -144,14 +88,6 @@ var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
|
144
88
|
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
145
89
|
|
|
146
90
|
export {
|
|
147
|
-
isCliFailure,
|
|
148
|
-
isCommanderFailure,
|
|
149
|
-
usageReason,
|
|
150
|
-
failureKey,
|
|
151
|
-
sqliteCode,
|
|
152
|
-
storeDamaged,
|
|
153
|
-
damagedFile,
|
|
154
|
-
isStoreDamage,
|
|
155
91
|
secretNamed,
|
|
156
92
|
holdsCredential,
|
|
157
93
|
withoutSecrets
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KBY42GKW.js";
|
|
9
9
|
import {
|
|
10
10
|
reference
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A3RJ6FD5.js";
|
|
12
12
|
import {
|
|
13
13
|
array,
|
|
14
14
|
nullable,
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
strictObject,
|
|
19
19
|
string,
|
|
20
20
|
unknown
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-S4UUN6LD.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// 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/entities/note.js
|
|
24
24
|
var link = {
|
|
25
25
|
target_text: nullable(text),
|
|
26
26
|
kind: text,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
convert
|
|
5
|
+
} from "./chunk-TRYYWV7J.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.js
|
|
8
|
+
var phrasing = (
|
|
9
|
+
/** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
|
|
10
|
+
convert([
|
|
11
|
+
"break",
|
|
12
|
+
"delete",
|
|
13
|
+
"emphasis",
|
|
14
|
+
// To do: next major: removed since footnotes were added to GFM.
|
|
15
|
+
"footnote",
|
|
16
|
+
"footnoteReference",
|
|
17
|
+
"image",
|
|
18
|
+
"imageReference",
|
|
19
|
+
"inlineCode",
|
|
20
|
+
// Enabled by `mdast-util-math`:
|
|
21
|
+
"inlineMath",
|
|
22
|
+
"link",
|
|
23
|
+
"linkReference",
|
|
24
|
+
// Enabled by `mdast-util-mdx`:
|
|
25
|
+
"mdxJsxTextElement",
|
|
26
|
+
// Enabled by `mdast-util-mdx`:
|
|
27
|
+
"mdxTextExpression",
|
|
28
|
+
"strong",
|
|
29
|
+
"text",
|
|
30
|
+
// Enabled by `mdast-util-directive`:
|
|
31
|
+
"textDirective"
|
|
32
|
+
])
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
phrasing
|
|
37
|
+
};
|