@wirecat/bitrix24-cli 0.3.0 → 0.5.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 +130 -0
- package/README.md +84 -9
- package/dist/api-keys.d.ts +36 -9
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +139 -19
- package/dist/api-keys.js.map +1 -1
- package/dist/bin/b24.js +2 -2
- package/dist/bitrix/errors.js +1 -1
- package/dist/bitrix/errors.js.map +1 -1
- package/dist/bitrix/methods.d.ts.map +1 -1
- package/dist/bitrix/methods.js +7 -3
- package/dist/bitrix/methods.js.map +1 -1
- package/dist/bitrix/transport.d.ts +4 -7
- package/dist/bitrix/transport.d.ts.map +1 -1
- package/dist/bitrix/transport.js +29 -19
- package/dist/bitrix/transport.js.map +1 -1
- package/dist/body.d.ts +14 -0
- package/dist/body.d.ts.map +1 -0
- package/dist/body.js +44 -0
- package/dist/body.js.map +1 -0
- package/dist/bundle/{chunk-QIPTIUMJ.js → all-profiles-CANIDIDS.js} +12 -7
- package/dist/bundle/{anthropic-RHRAVHC2.js → anthropic-JUJB4DCF.js} +5 -5
- package/dist/bundle/{app-server-QIT6S7AZ.js → app-server-3V5Z4PTK.js} +68 -54
- package/dist/bundle/b24.js +18 -12
- package/dist/bundle/{bun-H6RSODZ3.js → bun-LKMV5TY7.js} +2 -2
- package/dist/bundle/{bun-sqlite-BO4LTQHX.js → bun-sqlite-S56EF74S.js} +3 -3
- package/dist/bundle/{chunk-D5S6QV6R.js → chunk-2I4KWS3H.js} +6 -6
- package/dist/bundle/chunk-36PO5NWY.js +147 -0
- package/dist/bundle/{chunk-ZIAQPTUS.js → chunk-42F7Q7V6.js} +3 -3
- package/dist/bundle/{chunk-6WY72XVQ.js → chunk-4D3K6GZW.js} +18 -4
- package/dist/bundle/chunk-5D4MJQ6X.js +22 -0
- package/dist/bundle/chunk-5JOPERVF.js +84 -0
- package/dist/bundle/chunk-6A4UPWDC.js +15 -0
- package/dist/bundle/{chunk-P33NDCDI.js → chunk-6MGWIZG4.js} +1 -1
- package/dist/bundle/{chunk-ZDQQCXFG.js → chunk-6YJTNZ7U.js} +13 -13
- package/dist/bundle/{chunk-MBDK4YXG.js → chunk-7FBFJ6B4.js} +4 -2
- package/dist/bundle/chunk-7VCMOTQP.js +55 -0
- package/dist/bundle/{chunk-P364PLIK.js → chunk-A5IMMGYU.js} +36 -34
- package/dist/bundle/{chunk-45AKJVKV.js → chunk-ASEHTBNK.js} +1 -1
- package/dist/bundle/{chunk-HGL63O5V.js → chunk-B6LPJYPQ.js} +2 -2
- package/dist/bundle/{chunk-LSPIOT6Z.js → chunk-BHEE2K6C.js} +7 -7
- package/dist/bundle/chunk-BYZQBE63.js +971 -0
- package/dist/bundle/{program-H3TGGRQ6.js → chunk-COKGNTDQ.js} +15761 -16685
- package/dist/bundle/{chunk-XJXONOB5.js → chunk-DVFYRQGE.js} +1 -1
- package/dist/bundle/{chunk-FLUEXJ4X.js → chunk-DVSIBZ3G.js} +1 -1
- package/dist/bundle/chunk-EJEIXC6Y.js +273 -0
- package/dist/bundle/chunk-EYTGCM44.js +130 -0
- package/dist/bundle/{chunk-IRV2PCQ2.js → chunk-EYYOKT23.js} +26 -26
- package/dist/bundle/{chunk-PH5FZX6E.js → chunk-FCWPIWSR.js} +2 -2
- package/dist/bundle/{chunk-YZ5LHE5Q.js → chunk-FSWRMQWX.js} +2 -2
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/chunk-G5MW6RCM.js +723 -0
- package/dist/bundle/{chunk-VEWWAGTD.js → chunk-GLTKRLFT.js} +8 -8
- package/dist/bundle/chunk-GUUZQ7NE.js +581 -0
- package/dist/bundle/{chunk-QSNROIJL.js → chunk-H6RIPOOI.js} +42 -9
- package/dist/bundle/{chunk-H2ADPPSH.js → chunk-HGFNC4CR.js} +1819 -597
- package/dist/bundle/{chunk-7GRZAKBB.js → chunk-IERYD2N2.js} +6 -6
- package/dist/bundle/{chunk-N6FLBXZS.js → chunk-IGCLMEMB.js} +3 -3
- package/dist/bundle/{chunk-U5ACMCAQ.js → chunk-J7WCSZ2Q.js} +411 -919
- package/dist/bundle/{chunk-W5YAO5G5.js → chunk-JZYHQ4HB.js} +9 -4
- package/dist/bundle/{chunk-EVYSBZ3I.js → chunk-K4QM3X5F.js} +4 -4
- package/dist/bundle/{chunk-DTXERR44.js → chunk-KFSMY7SZ.js} +2 -2
- package/dist/bundle/{chunk-LRGYKOCP.js → chunk-KPEDH5T4.js} +1 -1
- package/dist/bundle/{chunk-XRFJWHY5.js → chunk-KUY7LII2.js} +4 -4
- package/dist/bundle/{chunk-QC53QBNC.js → chunk-LFXDHLFR.js} +3 -3
- package/dist/bundle/{chunk-CNNEA2M4.js → chunk-LGLT4JB6.js} +3 -3
- package/dist/bundle/{chunk-QGMDQ2PM.js → chunk-LM4OOBAW.js} +3 -3
- package/dist/bundle/chunk-M74BSKMA.js +234 -0
- package/dist/bundle/{chunk-2KCZ7BKW.js → chunk-MMMT6ORT.js} +11 -11
- package/dist/bundle/{chunk-WII44RXN.js → chunk-NGYD6QTE.js} +2 -2
- package/dist/bundle/{chunk-FOTREPNS.js → chunk-NO6QOPVT.js} +10 -19
- package/dist/bundle/chunk-O6XC7DZI.js +804 -0
- package/dist/bundle/chunk-OE3NFB53.js +64 -0
- package/dist/bundle/{chunk-XD4FRDSL.js → chunk-OUMFNB34.js} +13 -149
- package/dist/bundle/{chunk-ZGZT5S6B.js → chunk-P2RQTNVJ.js} +806 -850
- package/dist/bundle/{chunk-RRJNNPR4.js → chunk-PBIBGIZ7.js} +1 -1
- package/dist/bundle/{chunk-EXOOKUEA.js → chunk-Q6VQHTRW.js} +2 -2
- package/dist/bundle/{chunk-TE3FR6MI.js → chunk-QHBCNVUG.js} +5 -5
- package/dist/bundle/{chunk-SGRYYE4X.js → chunk-QNOXAQ6Y.js} +4 -4
- package/dist/bundle/{chunk-QQXH2OPB.js → chunk-R5F2O5GX.js} +15 -272
- package/dist/bundle/{chunk-SFRNX2TI.js → chunk-R5PBSKJL.js} +1 -1
- package/dist/bundle/{chunk-OTD2ZRXD.js → chunk-RS2BARUU.js} +4 -4
- package/dist/bundle/chunk-TG3DSPT5.js +14 -0
- package/dist/bundle/{chunk-BCF7P4FZ.js → chunk-U22JMKUO.js} +6 -125
- package/dist/bundle/chunk-U66Q5TVK.js +106 -0
- package/dist/bundle/{chunk-QMPN6WKD.js → chunk-UCHMQWON.js} +211 -89
- package/dist/bundle/{chunk-POC3V3AO.js → chunk-VMJS7FJZ.js} +526 -467
- package/dist/bundle/{chunk-FZL7F5NR.js → chunk-VMVAQHDC.js} +77 -615
- package/dist/bundle/{chunk-K3UIB6ZF.js → chunk-WWMCJFMT.js} +2 -2
- package/dist/bundle/{chunk-CXL33BFL.js → chunk-XTA5TN3H.js} +1 -1
- package/dist/bundle/{chunk-WTPMJYMD.js → chunk-XUHHBEA7.js} +652 -131
- package/dist/bundle/{chunk-WKRQ44EH.js → chunk-YDZHO4LT.js} +13 -13
- package/dist/bundle/{chunk-2SNUMZ7S.js → chunk-ZKINZFIT.js} +6 -6
- package/dist/bundle/{chunk-HAXNUIGQ.js → chunk-ZSQXSIFQ.js} +89 -39
- package/dist/bundle/{chunk-YYO7D2MO.js → chunk-ZZEHDIEG.js} +58 -54
- package/dist/bundle/command-contract-OQV6H7SR.js +36 -0
- package/dist/bundle/{decode-5ZPLTYV6.js → decode-QSTBX4MG.js} +3 -3
- package/dist/bundle/{echarts-J6LAPIX7.js → echarts-JZELFH2N.js} +2 -2
- package/dist/bundle/{embed-YG5LDHME.js → embed-4RIW2LVH.js} +4 -4
- package/dist/bundle/{embedder-7FNUA5OZ.js → embedder-SW7DTWSL.js} +7 -7
- package/dist/bundle/{first-run-JPZNWIJN.js → first-run-7AISOSOM.js} +8 -8
- package/dist/bundle/first-screen-NMHNFZ2B.js +34 -0
- package/dist/bundle/{instructions-AXWTQHMR.js → instructions-BZE5YUGG.js} +1 -1
- package/dist/bundle/{mcp-7F46P6AM.js → mcp-SDWHDJTY.js} +2 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-CWKAIOEM.js → node-LTKZIO4U.js} +2 -2
- package/dist/bundle/{node-sqlite-LSEKVRDA.js → node-sqlite-HQ5PN2RH.js} +4 -4
- package/dist/bundle/{oauth-THYNLRLD.js → oauth-UH6FOZQL.js} +5 -5
- package/dist/bundle/{open-E47QYKFC.js → open-TSUP3XGL.js} +3 -3
- package/dist/bundle/{openai-EWSGC3BC.js → openai-GVEE52E3.js} +14 -14
- package/dist/bundle/{process-WKTEA3WE.js → process-AGXY76ZE.js} +1 -1
- package/dist/bundle/program-BI4A4HFJ.js +2247 -0
- package/dist/bundle/{prompt-CAQ7QR3U.js → prompt-NRSUY7FA.js} +3 -3
- package/dist/bundle/{recognize-6KGHNZC3.js → recognize-NPDPQ6PJ.js} +2 -2
- package/dist/bundle/{remote-3UO2WDC3.js → remote-HFASMVLB.js} +5 -5
- package/dist/bundle/{rerank-2JVDPZBX.js → rerank-TL6Z6F7K.js} +5 -5
- package/dist/bundle/{chunk-VL6SPMZV.js → serve-VB4DHDZQ.js} +8 -6
- package/dist/bundle/server-T5EDRPJI.js +68 -0
- package/dist/bundle/{chunk-ZEW4P6AH.js → server-Z6MW6C37.js} +50 -14
- package/dist/bundle/source-4IGO5J7E.js +237 -0
- package/dist/bundle/sqlite-runtime-YS4POY3W.js +17 -0
- package/dist/bundle/{state-7NH5G4XJ.js → state-ISZVVZGR.js} +4 -4
- package/dist/bundle/store-IZJBAKJV.js +58 -0
- package/dist/bundle/{store-7O4JQD2Z.js → store-L76MSQC3.js} +17 -12
- package/dist/bundle/store-PBTIB7BD.js +207 -0
- package/dist/bundle/store-maintenance-command-YFKII7TF.js +58 -0
- package/dist/bundle/writer-3O5EYMFE.js +214 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +81 -30
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/crm-shared.d.ts +4 -0
- package/dist/commands/crm-shared.d.ts.map +1 -0
- package/dist/commands/crm-shared.js +94 -0
- package/dist/commands/crm-shared.js.map +1 -0
- package/dist/commands/crm-writes.d.ts +0 -1
- package/dist/commands/crm-writes.d.ts.map +1 -1
- package/dist/commands/crm-writes.js +43 -88
- package/dist/commands/crm-writes.js.map +1 -1
- package/dist/commands/crm.d.ts.map +1 -1
- package/dist/commands/crm.js +30 -48
- package/dist/commands/crm.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +1 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/write.d.ts +6 -6
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +11 -18
- package/dist/commands/write.js.map +1 -1
- package/dist/config.d.ts +0 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -8
- package/dist/config.js.map +1 -1
- package/dist/crm/capabilities.d.ts +7 -0
- package/dist/crm/capabilities.d.ts.map +1 -0
- package/dist/crm/capabilities.js +7 -0
- package/dist/crm/capabilities.js.map +1 -0
- package/dist/crm/conditions.d.ts +1 -1
- package/dist/crm/conditions.d.ts.map +1 -1
- package/dist/crm/conditions.js +4 -6
- package/dist/crm/conditions.js.map +1 -1
- package/dist/crm/custom-query.d.ts +19 -0
- package/dist/crm/custom-query.d.ts.map +1 -0
- package/dist/crm/custom-query.js +79 -0
- package/dist/crm/custom-query.js.map +1 -0
- package/dist/crm/deal.d.ts +4 -27
- package/dist/crm/deal.d.ts.map +1 -1
- package/dist/crm/deal.js +15 -48
- package/dist/crm/deal.js.map +1 -1
- package/dist/crm/fields.d.ts +20 -0
- package/dist/crm/fields.d.ts.map +1 -0
- package/dist/crm/fields.js +78 -0
- package/dist/crm/fields.js.map +1 -0
- package/dist/crm/items.d.ts +7 -1
- package/dist/crm/items.d.ts.map +1 -1
- package/dist/crm/items.js +21 -18
- package/dist/crm/items.js.map +1 -1
- package/dist/crm/lead.d.ts +5 -36
- package/dist/crm/lead.d.ts.map +1 -1
- package/dist/crm/lead.js +15 -61
- package/dist/crm/lead.js.map +1 -1
- package/dist/crm/organization.d.ts +1 -0
- package/dist/crm/organization.d.ts.map +1 -1
- package/dist/crm/person.d.ts +1 -0
- package/dist/crm/person.d.ts.map +1 -1
- package/dist/crm/pipelines.d.ts +5 -0
- package/dist/crm/pipelines.d.ts.map +1 -0
- package/dist/crm/pipelines.js +54 -0
- package/dist/crm/pipelines.js.map +1 -0
- package/dist/crm/product.d.ts.map +1 -1
- package/dist/crm/product.js +2 -2
- package/dist/crm/product.js.map +1 -1
- package/dist/crm/rest3-fields.d.ts +3 -0
- package/dist/crm/rest3-fields.d.ts.map +1 -0
- package/dist/crm/rest3-fields.js +38 -0
- package/dist/crm/rest3-fields.js.map +1 -0
- package/dist/crm/source.d.ts +15 -0
- package/dist/crm/source.d.ts.map +1 -0
- package/dist/crm/source.js +122 -0
- package/dist/crm/source.js.map +1 -0
- package/dist/crm/user.d.ts.map +1 -1
- package/dist/crm/user.js +2 -2
- package/dist/crm/user.js.map +1 -1
- package/dist/crm/values.d.ts +26 -5
- package/dist/crm/values.d.ts.map +1 -1
- package/dist/crm/values.js +40 -5
- package/dist/crm/values.js.map +1 -1
- package/dist/crm/writer.d.ts +9 -0
- package/dist/crm/writer.d.ts.map +1 -0
- package/dist/crm/writer.js +119 -0
- package/dist/crm/writer.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +53 -5
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -1
- package/dist/reasons.js.map +1 -1
- package/dist/store.d.ts +15 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +33 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -6
- package/skills/bitrix24-cli/SKILL.md +16 -10
- package/dist/bundle/all-profiles-QJ444GSX.js +0 -24
- package/dist/bundle/chunk-XNHSPHUN.js +0 -48
- package/dist/bundle/command-contract-OKQOE6G4.js +0 -30
- package/dist/bundle/first-screen-VQM4MTS7.js +0 -28
- package/dist/bundle/mcp-5RSWNTHS.js +0 -160
- package/dist/bundle/mcp-J5R5A65I.js +0 -87
- package/dist/bundle/serve-ES7AG5IK.js +0 -19
- package/dist/bundle/server-5LE5LNUQ.js +0 -45
- package/dist/bundle/server-BU4VBM6S.js +0 -58
- package/dist/bundle/store-maintenance-command-UDVGEY2D.js +0 -47
- package/dist/commands/doctor.d.ts +0 -77
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -74
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -3
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -97
- package/dist/commands/mcp.js.map +0 -1
- package/dist/crm/pipeline.d.ts +0 -17
- package/dist/crm/pipeline.d.ts.map +0 -1
- package/dist/crm/pipeline.js +0 -42
- package/dist/crm/pipeline.js.map +0 -1
- package/dist/crm/stage.d.ts +0 -20
- package/dist/crm/stage.d.ts.map +0 -1
- package/dist/crm/stage.js +0 -65
- package/dist/crm/stage.js.map +0 -1
- package/dist/mcp.d.ts +0 -29
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -99
- package/dist/mcp.js.map +0 -1
- /package/dist/bundle/{chunk-4PDYYS5K.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
count,
|
|
5
|
+
id,
|
|
6
|
+
text,
|
|
7
|
+
time
|
|
8
|
+
} from "./chunk-A5IMMGYU.js";
|
|
9
|
+
import {
|
|
10
|
+
array,
|
|
11
|
+
nullable,
|
|
12
|
+
optional,
|
|
13
|
+
picklist,
|
|
14
|
+
record,
|
|
15
|
+
reference,
|
|
16
|
+
strictObject,
|
|
17
|
+
string,
|
|
18
|
+
unknown
|
|
19
|
+
} from "./chunk-EYYOKT23.js";
|
|
20
|
+
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
22
|
+
var link = {
|
|
23
|
+
target_text: nullable(text),
|
|
24
|
+
kind: text,
|
|
25
|
+
anchor: nullable(text)
|
|
26
|
+
};
|
|
27
|
+
var note = strictObject({
|
|
28
|
+
ref: reference,
|
|
29
|
+
kind: optional(picklist(["note", "document"])),
|
|
30
|
+
provider: optional(text),
|
|
31
|
+
account: optional(text),
|
|
32
|
+
url: optional(text),
|
|
33
|
+
id,
|
|
34
|
+
source: picklist(["file", "internal"]),
|
|
35
|
+
folder_id: nullable(id),
|
|
36
|
+
path: nullable(text),
|
|
37
|
+
title: nullable(text),
|
|
38
|
+
text,
|
|
39
|
+
/** Raises on every edit; `notes edit --revision` takes it, so an edit made meanwhile is refused, not lost. */
|
|
40
|
+
revision: count,
|
|
41
|
+
/** A file's front matter as parsed, keys as the file writes them; null for a note without it. */
|
|
42
|
+
front_matter: nullable(record(string(), unknown())),
|
|
43
|
+
/** The hash of a file's bytes when last imported; null for a note written here. */
|
|
44
|
+
content_hash: nullable(text),
|
|
45
|
+
/** The file the note was exported to, where that is known; null otherwise. */
|
|
46
|
+
export_path: nullable(text),
|
|
47
|
+
created_at: time,
|
|
48
|
+
/** When the store's copy last changed. */
|
|
49
|
+
updated_at: time,
|
|
50
|
+
deleted_at: optional(nullable(time)),
|
|
51
|
+
tags: optional(array(text)),
|
|
52
|
+
/** The first line holding a word of a search. */
|
|
53
|
+
excerpt: optional(text),
|
|
54
|
+
/** Which halves of a search found it. */
|
|
55
|
+
found_by: optional(array(picklist(["title", "words", "meaning"]))),
|
|
56
|
+
/** What the note links to; `to` is null while the name written matches nothing stored. */
|
|
57
|
+
links: optional(array(strictObject({ to: nullable(reference), ...link }))),
|
|
58
|
+
/** The notes and messages that link to it. */
|
|
59
|
+
backlinks: optional(array(strictObject({ from: reference, ...link })))
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
note
|
|
64
|
+
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
createRenderer,
|
|
7
|
-
fieldsOf,
|
|
8
|
-
processStreams,
|
|
9
|
-
projectFields,
|
|
10
|
-
singleLine
|
|
11
|
-
} from "./chunk-IRV2PCQ2.js";
|
|
4
|
+
CliError
|
|
5
|
+
} from "./chunk-EYYOKT23.js";
|
|
12
6
|
import {
|
|
13
7
|
__name
|
|
14
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
9
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
17
11
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
18
12
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
19
13
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -93,7 +87,7 @@ var layerPermissions = /* @__PURE__ */ __name((layers) => {
|
|
|
93
87
|
for (const [from, layer] of layers) {
|
|
94
88
|
const nearer = Object.keys(levels);
|
|
95
89
|
for (const [key, level] of Object.entries(layer ?? {})) {
|
|
96
|
-
if (nearer.some((
|
|
90
|
+
if (nearer.some((named) => key === named || key.startsWith(`${named}.`)))
|
|
97
91
|
continue;
|
|
98
92
|
levels[key] = level;
|
|
99
93
|
sources[key] = from;
|
|
@@ -106,10 +100,10 @@ var ALLOWED = { level: "allow", key: null };
|
|
|
106
100
|
var ORDER = { deny: 0, readonly: 1, ask: 2, allow: 3 };
|
|
107
101
|
var nearest = /* @__PURE__ */ __name((levels, key) => {
|
|
108
102
|
for (let parts = key.split("."); parts.length > 0; parts = parts.slice(0, -1)) {
|
|
109
|
-
const
|
|
110
|
-
const level = levels[
|
|
103
|
+
const named = parts.join(".");
|
|
104
|
+
const level = levels[named];
|
|
111
105
|
if (level)
|
|
112
|
-
return { level, key:
|
|
106
|
+
return { level, key: named, depth: parts.length };
|
|
113
107
|
}
|
|
114
108
|
return void 0;
|
|
115
109
|
}, "nearest");
|
|
@@ -188,16 +182,16 @@ var keyForWrite = /* @__PURE__ */ __name((kind, action) => {
|
|
|
188
182
|
return KIND_KEYS[kind];
|
|
189
183
|
}, "keyForWrite");
|
|
190
184
|
var writeOfKey = /* @__PURE__ */ __name((key) => {
|
|
191
|
-
const account = Object.entries(ACCOUNT_KEYS).find(([,
|
|
185
|
+
const account = Object.entries(ACCOUNT_KEYS).find(([, named]) => named === key)?.[0];
|
|
192
186
|
if (account)
|
|
193
187
|
return { kind: "account", action: account };
|
|
194
|
-
const kind = Object.entries(KIND_KEYS).find(([,
|
|
188
|
+
const kind = Object.entries(KIND_KEYS).find(([, named]) => named === key || key.startsWith(`${named}.`))?.[0];
|
|
195
189
|
if (kind)
|
|
196
190
|
return { kind };
|
|
197
191
|
if (key === "messages.unpin")
|
|
198
192
|
return { kind: "pin" };
|
|
199
193
|
if (key.startsWith("chats.")) {
|
|
200
|
-
const action = Object.entries(CHAT_KEYS).find(([,
|
|
194
|
+
const action = Object.entries(CHAT_KEYS).find(([, named]) => named === key)?.[0] ?? key.slice("chats.".length);
|
|
201
195
|
return { kind: "chat", action };
|
|
202
196
|
}
|
|
203
197
|
return {};
|
|
@@ -396,8 +390,8 @@ var permissionOverrides = /* @__PURE__ */ __name((entries = [], shape = RESOURCE
|
|
|
396
390
|
}, "permissionOverrides");
|
|
397
391
|
var assertOverridesTighten = /* @__PURE__ */ __name((overrides, profile, defaults = DEFAULT_PERMISSIONS) => {
|
|
398
392
|
for (const [key, level] of Object.entries(overrides)) {
|
|
399
|
-
const under = Object.keys(profile).filter((
|
|
400
|
-
const lifted = [key, ...under].find((
|
|
393
|
+
const under = Object.keys(profile).filter((named) => named.startsWith(`${key}.`));
|
|
394
|
+
const lifted = [key, ...under].find((named) => ORDER[level] > ORDER[levelFor(profile, named, defaults).level]);
|
|
401
395
|
if (lifted !== void 0)
|
|
402
396
|
throw new CliError("validation_error", `--permission ${key}=${level} would loosen ${lifted} from ${levelFor(profile, lifted, defaults).level}; it only tightens \u2014 change the profile's permissions to loosen it`, { key, lifted });
|
|
403
397
|
}
|
|
@@ -409,133 +403,6 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
409
403
|
}
|
|
410
404
|
}, "assertRetentionEvidenceRead");
|
|
411
405
|
|
|
412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
413
|
-
var named = /* @__PURE__ */ __name((work) => {
|
|
414
|
-
try {
|
|
415
|
-
return work();
|
|
416
|
-
} catch (error) {
|
|
417
|
-
if (error instanceof CliError && error.code === "validation_error")
|
|
418
|
-
throw new CliError("validation_error", "--json takes comma-separated field paths, for example --json=id,text", {
|
|
419
|
-
param: "--json"
|
|
420
|
-
});
|
|
421
|
-
throw error;
|
|
422
|
-
}
|
|
423
|
-
}, "named");
|
|
424
|
-
var fieldsOf2 = /* @__PURE__ */ __name((value) => named(() => fieldsOf(value)), "fieldsOf");
|
|
425
|
-
var projectCommands = /* @__PURE__ */ __name((commands, fields) => commands.map((command) => ({
|
|
426
|
-
...projectFields(command, fields),
|
|
427
|
-
path: command.path,
|
|
428
|
-
name: command.name,
|
|
429
|
-
origin: command.origin,
|
|
430
|
-
effects: command.effects,
|
|
431
|
-
commands: projectCommands(command.commands, fields)
|
|
432
|
-
})), "projectCommands");
|
|
433
|
-
var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
434
|
-
if (value && typeof value === "object" && "cli" in value && typeof value.cli === "string" && "contract" in value && "commands" in value && Array.isArray(value.commands))
|
|
435
|
-
return { ...value, commands: projectCommands(value.commands, fields) };
|
|
436
|
-
return projectFields(value, fields);
|
|
437
|
-
}), "projectFields");
|
|
438
|
-
|
|
439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
440
|
-
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
441
|
-
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
442
|
-
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
443
|
-
var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null, "isRecord");
|
|
444
|
-
var isSnakeHit = /* @__PURE__ */ __name((value) => isRecord(value) && typeof value.ref === "string" && typeof value.excerpt === "string", "isSnakeHit");
|
|
445
|
-
var isHit = /* @__PURE__ */ __name((value) => isSnakeHit(value) || isRecord(value) && typeof value.locator === "string" && typeof value.text === "string", "isHit");
|
|
446
|
-
var picked = /* @__PURE__ */ __name((hit, keys) => Object.fromEntries(keys.flatMap((key) => hit[key] === void 0 || hit[key] === null ? [] : [[key, hit[key]]])), "picked");
|
|
447
|
-
var shaped = /* @__PURE__ */ __name((hit, detail) => {
|
|
448
|
-
if (isSnakeHit(hit))
|
|
449
|
-
return detail === "brief" ? picked(hit, SNAKE_BRIEF) : hit;
|
|
450
|
-
if (detail === "brief")
|
|
451
|
-
return picked(hit, BRIEF);
|
|
452
|
-
const { text, providerMetadata, ...rest } = hit;
|
|
453
|
-
for (const key of RARELY_SET)
|
|
454
|
-
if (rest[key] === null)
|
|
455
|
-
delete rest[key];
|
|
456
|
-
const metadata = rest.email ? void 0 : providerMetadata;
|
|
457
|
-
return {
|
|
458
|
-
...rest,
|
|
459
|
-
...typeof rest.excerpt === "string" ? {} : { text },
|
|
460
|
-
...metadata === void 0 ? {} : { providerMetadata: metadata }
|
|
461
|
-
};
|
|
462
|
-
}, "shaped");
|
|
463
|
-
var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
464
|
-
if (detail === "full")
|
|
465
|
-
return value;
|
|
466
|
-
if (Array.isArray(value))
|
|
467
|
-
return value.map((item) => isHit(item) ? shaped(item, detail) : item);
|
|
468
|
-
if (isHit(value))
|
|
469
|
-
return shaped(value, detail);
|
|
470
|
-
if (typeof value === "object" && value !== null && Array.isArray(value.items))
|
|
471
|
-
return { ...value, items: atDetail(value.items, detail) };
|
|
472
|
-
return value;
|
|
473
|
-
}, "atDetail");
|
|
474
|
-
|
|
475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/output.js
|
|
476
|
-
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
477
|
-
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
478
|
-
if (other)
|
|
479
|
-
throw new CliError("validation_error", `${COMPACT_FLAG} and ${other} ask for different output \u2014 pick one`, {
|
|
480
|
-
reason: "output.conflict",
|
|
481
|
-
param: COMPACT_FLAG
|
|
482
|
-
});
|
|
483
|
-
}, "refuseCompact");
|
|
484
|
-
var resolveOutput = /* @__PURE__ */ __name(({ json, jsonl, quiet, streams = processStreams, tty, color, fields, hitDetail, env = process.env, capture, compact } = {}) => {
|
|
485
|
-
if (compact)
|
|
486
|
-
refuseCompact({ json, jsonl, fields, hitDetail });
|
|
487
|
-
const interactive = tty ?? process.stdout.isTTY === true;
|
|
488
|
-
const format = jsonl ? "jsonl" : json || compact || !interactive ? "json" : "pretty";
|
|
489
|
-
const painted = format === "pretty" && (color ?? (env.NO_COLOR === void 0 && env.TERM !== "dumb" && !env.CI));
|
|
490
|
-
const printing = createRenderer({ format, color: painted, streams });
|
|
491
|
-
const rendered = capture ? { ...printing, result: capture, stream: /* @__PURE__ */ __name((items) => capture([...items]), "stream") } : printing;
|
|
492
|
-
const level = hitDetail ?? (fields === void 0 ? "default" : "full");
|
|
493
|
-
const standard = format === "pretty" ? rendered : {
|
|
494
|
-
...rendered,
|
|
495
|
-
result: /* @__PURE__ */ __name((value) => rendered.result(atDetail(value, level)), "result"),
|
|
496
|
-
stream: /* @__PURE__ */ __name((items) => rendered.stream(atDetail([...items], level)), "stream")
|
|
497
|
-
};
|
|
498
|
-
const created = standard;
|
|
499
|
-
const paths = fields === void 0 ? void 0 : fieldsOf2(fields);
|
|
500
|
-
const renderer = format === "pretty" ? oneLineFields(created) : paths ? {
|
|
501
|
-
...created,
|
|
502
|
-
result: /* @__PURE__ */ __name((value) => created.result(projectFields2(value, paths)), "result"),
|
|
503
|
-
stream: /* @__PURE__ */ __name((items) => created.stream([...items].map((item) => projectFields2(item, paths))), "stream")
|
|
504
|
-
} : created;
|
|
505
|
-
return {
|
|
506
|
-
format,
|
|
507
|
-
color: painted,
|
|
508
|
-
streams,
|
|
509
|
-
renderer: quiet ? silence(renderer) : renderer,
|
|
510
|
-
...compact ? { compact: true, full: hitDetail === "full" } : {}
|
|
511
|
-
};
|
|
512
|
-
}, "resolveOutput");
|
|
513
|
-
var MULTI_LINE = /* @__PURE__ */ new Set(["text", "description"]);
|
|
514
|
-
var oneLineFields = /* @__PURE__ */ __name((renderer) => ({
|
|
515
|
-
...renderer,
|
|
516
|
-
result: /* @__PURE__ */ __name((value) => renderer.result(oneLine(value)), "result"),
|
|
517
|
-
stream: /* @__PURE__ */ __name((items) => renderer.stream([...items].map((item) => oneLine(item))), "stream")
|
|
518
|
-
}), "oneLineFields");
|
|
519
|
-
var oneLine = /* @__PURE__ */ __name((value, key) => {
|
|
520
|
-
if (typeof value === "string")
|
|
521
|
-
return key !== void 0 && MULTI_LINE.has(key) ? value : singleLine(value);
|
|
522
|
-
if (Array.isArray(value))
|
|
523
|
-
return value.map((item) => oneLine(item, key));
|
|
524
|
-
if (value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
|
|
525
|
-
return Object.fromEntries(Object.entries(value).map(([field, item]) => [field, oneLine(item, field)]));
|
|
526
|
-
}
|
|
527
|
-
return value;
|
|
528
|
-
}, "oneLine");
|
|
529
|
-
var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
530
|
-
...renderer,
|
|
531
|
-
note: /* @__PURE__ */ __name(() => {
|
|
532
|
-
}, "note"),
|
|
533
|
-
success: /* @__PURE__ */ __name(() => {
|
|
534
|
-
}, "success"),
|
|
535
|
-
warn: /* @__PURE__ */ __name(() => {
|
|
536
|
-
}, "warn")
|
|
537
|
-
}), "silence");
|
|
538
|
-
|
|
539
406
|
export {
|
|
540
407
|
LEVELS,
|
|
541
408
|
skipFlagFor,
|
|
@@ -558,8 +425,5 @@ export {
|
|
|
558
425
|
COMMAND_PATH_KEY,
|
|
559
426
|
permissionOverrides,
|
|
560
427
|
assertOverridesTighten,
|
|
561
|
-
assertRetentionEvidenceRead
|
|
562
|
-
fieldsOf2 as fieldsOf,
|
|
563
|
-
projectFields2 as projectFields,
|
|
564
|
-
resolveOutput
|
|
428
|
+
assertRetentionEvidenceRead
|
|
565
429
|
};
|