@wirecat/amo-cli 0.2.0 → 0.4.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 +19 -14
- package/contracts/wirecat.json +58 -19
- package/dist/amo/button.d.ts +53 -0
- package/dist/amo/button.d.ts.map +1 -0
- package/dist/amo/button.js +234 -0
- package/dist/amo/button.js.map +1 -0
- package/dist/amo/oauth.d.ts +12 -3
- package/dist/amo/oauth.d.ts.map +1 -1
- package/dist/amo/oauth.js +19 -6
- package/dist/amo/oauth.js.map +1 -1
- package/dist/bin/amo.js +2 -2
- package/dist/bundle/agent-43BMVBX2.js +40 -0
- package/dist/bundle/{all-profiles-3KQVWDV4.js → all-profiles-PRNXEZRH.js} +63 -21
- package/dist/bundle/amo.js +28 -26
- package/dist/bundle/{anthropic-N5NOX7K7.js → anthropic-FDI24DU2.js} +5 -5
- package/dist/bundle/{app-server-2MST5EZ5.js → app-server-WAKJVDLN.js} +79 -68
- package/dist/bundle/{bun-4NHWOFX2.js → bun-YPXUXMBI.js} +2 -2
- package/dist/bundle/{bun-sqlite-DRSXPWPR.js → bun-sqlite-UBQ5M47X.js} +6 -6
- package/dist/bundle/chunk-23AQD7JU.js +559 -0
- package/dist/bundle/{chunk-2I5UVMLW.js → chunk-2AIG2SSJ.js} +1733 -1160
- package/dist/bundle/{chunk-DQV2IKCF.js → chunk-2UJ7ZZZC.js} +10 -3
- package/dist/bundle/{chunk-ODNQU7DH.js → chunk-3K6T2G52.js} +43 -64
- package/dist/bundle/chunk-3PCVQCCV.js +108 -0
- package/dist/bundle/{chunk-UMVRT7VQ.js → chunk-3WG4MTQI.js} +1 -1
- package/dist/bundle/chunk-4PQECIU2.js +30 -0
- package/dist/bundle/{chunk-T2UDLX76.js → chunk-5HZMXHRH.js} +6 -6
- package/dist/bundle/{chunk-P3WQRTYZ.js → chunk-5II6TAJE.js} +1 -1
- package/dist/bundle/{chunk-RPWAJYI6.js → chunk-5SJEJYQZ.js} +3 -3
- package/dist/bundle/{chunk-5QFHNBGB.js → chunk-6PILR4AX.js} +2 -2
- package/dist/bundle/{chunk-TNUFLULO.js → chunk-6QMSKJB4.js} +8 -8
- package/dist/bundle/{chunk-5RLUHTK6.js → chunk-745FMNI5.js} +1 -1
- package/dist/bundle/{chunk-AUBB72VF.js → chunk-7OVTUADG.js} +41 -10
- package/dist/bundle/{chunk-7U5HJEPZ.js → chunk-A4W7J6VN.js} +34 -22
- package/dist/bundle/chunk-ABMPZL2P.js +734 -0
- package/dist/bundle/{chunk-EROSAUNP.js → chunk-AN6IJYH3.js} +5 -5
- package/dist/bundle/{chunk-SZ2V62HB.js → chunk-AP3CWDRK.js} +2 -2
- package/dist/bundle/{chunk-ESZSMZKT.js → chunk-ASU63X5C.js} +2 -2
- package/dist/bundle/{chunk-EPOV5UIO.js → chunk-BCIZAUDV.js} +11 -11
- package/dist/bundle/{chunk-7PKFYX7V.js → chunk-CEBX63XY.js} +8 -8
- package/dist/bundle/{chunk-7GTUZY7M.js → chunk-CYHIM5SL.js} +3 -3
- package/dist/bundle/chunk-DWA5TZMP.js +209 -0
- package/dist/bundle/{chunk-LDEBZ3IX.js → chunk-DWD3KDJA.js} +1 -1
- package/dist/bundle/{chunk-GQ7VFIYM.js → chunk-E3EWS6DF.js} +23 -7
- package/dist/bundle/{chunk-NJYAL3UW.js → chunk-EAX5RO7S.js} +1 -1
- package/dist/bundle/{chunk-LJQUYECN.js → chunk-EBNCUQLV.js} +1 -1
- package/dist/bundle/{chunk-UBRREVLJ.js → chunk-ELAKOEIO.js} +2 -2
- package/dist/bundle/{chunk-DAY6TSPF.js → chunk-FEUNZG7U.js} +62 -50
- package/dist/bundle/{chunk-63F65DHU.js → chunk-FQRP6JWX.js} +2 -2
- package/dist/bundle/{chunk-SMSTGO2G.js → chunk-G3LAYJJJ.js} +4 -4
- package/dist/bundle/{chunk-LGQXGOPJ.js → chunk-GBQ76X6T.js} +2 -2
- package/dist/bundle/{chunk-CHUKWON6.js → chunk-GJBOZAUD.js} +3 -3
- package/dist/bundle/{chunk-A33TIM5D.js → chunk-GMHRPX5M.js} +225 -225
- package/dist/bundle/{chunk-O2UCU52O.js → chunk-GQKEMBM6.js} +171 -569
- package/dist/bundle/{chunk-EQUKVVHX.js → chunk-HDZNSOV5.js} +7 -7
- package/dist/bundle/{chunk-ZM7I52EP.js → chunk-HZZ56JO7.js} +3 -4
- package/dist/bundle/{chunk-XQL7FEF4.js → chunk-IBEHYGG6.js} +9 -9
- package/dist/bundle/{chunk-U7RLVJ34.js → chunk-IPNIF5JE.js} +4 -4
- package/dist/bundle/{chunk-QDMXZZG4.js → chunk-KBAOJISR.js} +18 -8
- package/dist/bundle/{chunk-ADEWU4P4.js → chunk-KORZEYZN.js} +1 -1
- package/dist/bundle/{chunk-JMDLPBXK.js → chunk-KQZTX4LM.js} +17 -17
- package/dist/bundle/{chunk-NHXJYS4R.js → chunk-KRD375P7.js} +32 -28
- package/dist/bundle/{chunk-ULXQ5MJM.js → chunk-LAR2DLTI.js} +4 -4
- package/dist/bundle/{chunk-NC76INB2.js → chunk-LZ4IWN43.js} +3088 -2266
- package/dist/bundle/{chunk-BVMNXI53.js → chunk-M33XHJTM.js} +25 -25
- package/dist/bundle/{chunk-WCYCUTSK.js → chunk-M54YKD3I.js} +7 -7
- package/dist/bundle/{chunk-LSND5QYI.js → chunk-MW7HUD6R.js} +9 -9
- package/dist/bundle/{chunk-AHJ4W2IL.js → chunk-NFWD4QX3.js} +2 -2
- package/dist/bundle/{chunk-PM77PRB6.js → chunk-NKYWQTS2.js} +189 -163
- package/dist/bundle/{chunk-LRBPT7LQ.js → chunk-NXNUCGGO.js} +6 -6
- package/dist/bundle/{chunk-5D4Z2B5B.js → chunk-O3WE5IGP.js} +9 -9
- package/dist/bundle/chunk-OYMHPQF7.js +52 -0
- package/dist/bundle/{chunk-VVHRQ46X.js → chunk-PIOR6PIO.js} +2 -2
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-XEFAMLSD.js → chunk-PL7TNKAY.js} +3 -3
- package/dist/bundle/chunk-PLU2IQXC.js +80 -0
- package/dist/bundle/{chunk-73CXFE36.js → chunk-QGFURWEP.js} +29 -1
- package/dist/bundle/{chunk-CDY2NJFE.js → chunk-RQPB2BSH.js} +2 -2
- package/dist/bundle/{chunk-QRQYUHCZ.js → chunk-S6DTLAOB.js} +12 -12
- package/dist/bundle/{chunk-DJD7TBYG.js → chunk-SCMB4LI6.js} +76 -74
- package/dist/bundle/{chunk-TGEQNS6G.js → chunk-SFZVMKB6.js} +1 -1
- package/dist/bundle/{chunk-PFO76YFP.js → chunk-SHOSFYI7.js} +18 -18
- package/dist/bundle/{chunk-5SBLU7D7.js → chunk-SMM7GS4Q.js} +1 -1
- package/dist/bundle/{chunk-EQ7A6NA6.js → chunk-SNBYFQHT.js} +1 -1
- package/dist/bundle/{chunk-GNTJMB6X.js → chunk-SZX7EPPY.js} +4 -4
- package/dist/bundle/{chunk-VX37MPTJ.js → chunk-TCSVW7BA.js} +1 -1
- package/dist/bundle/{chunk-P5LYZRKW.js → chunk-TEGQVVCZ.js} +1992 -885
- package/dist/bundle/{chunk-Q2VNBY4Y.js → chunk-TIR3AB35.js} +758 -1205
- package/dist/bundle/{chunk-5HGGG3QO.js → chunk-U46RNOEQ.js} +16 -3
- package/dist/bundle/{chunk-Y37A3232.js → chunk-UCM7C773.js} +130 -8
- package/dist/bundle/{chunk-L6AFE73L.js → chunk-UEN5NWNW.js} +1 -1
- package/dist/bundle/{chunk-6RS7OYTD.js → chunk-V2QWX6B3.js} +3 -3
- package/dist/bundle/{chunk-3IRJDH2U.js → chunk-V5SETIQK.js} +2 -100
- package/dist/bundle/{chunk-JR6TSMFX.js → chunk-VEFAYLKX.js} +103 -70
- package/dist/bundle/{chunk-CUZRHF34.js → chunk-VG26HDKH.js} +4 -4
- package/dist/bundle/{chunk-4ZAK773N.js → chunk-VG2ERHFJ.js} +3 -3
- package/dist/bundle/{chunk-CHH42KI4.js → chunk-WAFB3IWJ.js} +8 -8
- package/dist/bundle/{chunk-5Z5PEEKP.js → chunk-WASBOYI2.js} +4 -4
- package/dist/bundle/{chunk-DXGGCGRP.js → chunk-WEWJA42Q.js} +14 -14
- package/dist/bundle/chunk-WR2FPZTE.js +353 -0
- package/dist/bundle/chunk-XEYT2EQT.js +338 -0
- package/dist/bundle/{chunk-DOSJONCX.js → chunk-YFRTEJ6V.js} +7 -7
- package/dist/bundle/{chunk-XRTD2GCU.js → chunk-YHVHDRED.js} +19 -258
- package/dist/bundle/{chunk-JH3UOHRE.js → chunk-YREKMP24.js} +4 -4
- package/dist/bundle/{chunk-V77XNPXG.js → chunk-Z2B3VNRI.js} +11 -11
- package/dist/bundle/{chunk-FKR3M62D.js → chunk-ZJC2XJQC.js} +13 -13
- package/dist/bundle/{chunk-5E5R65CA.js → chunk-ZKRWNL4T.js} +2 -2
- package/dist/bundle/{cli-QVWTXADI.js → cli-QDPKC2HJ.js} +150 -103
- package/dist/bundle/command-contract-KWNCP3MQ.js +39 -0
- package/dist/bundle/{command-server-entry-5VL5U5EE.js → command-server-entry-TX7WNN7G.js} +28 -28
- package/dist/bundle/{decode-SQ5WGNDX.js → decode-BLPC7OYE.js} +5 -5
- package/dist/bundle/{dispatch-LA4DFXJD.js → dispatch-5JUT55CS.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-25Z3RINX.js → echarts-54D3FOCL.js} +2 -2
- package/dist/bundle/{embed-BNOTNXMA.js → embed-O7KMDYM7.js} +6 -6
- package/dist/bundle/{embedder-BCUT7KKV.js → embedder-4PE67CLX.js} +9 -9
- package/dist/bundle/{failure-PKAC6XCT.js → failure-NNQYTB3Z.js} +2 -2
- package/dist/bundle/{first-run-EO5K5GME.js → first-run-EAU5SHBI.js} +12 -12
- package/dist/bundle/first-screen-APSNGZYZ.js +39 -0
- package/dist/bundle/{instructions-VLM3QAYB.js → instructions-ONXP5DZQ.js} +1 -1
- package/dist/bundle/{mcp-7ILNMJH5.js → mcp-ZNULRPZ4.js} +2 -2
- package/dist/bundle/meeting-combined-W2XIYXFU.js +24 -0
- package/dist/bundle/{meeting-model-GHMMUQ34.js → meeting-model-FWIZRKVN.js} +11 -11
- package/dist/bundle/{meeting-semantic-BMP6323L.js → meeting-semantic-M4YVJ57W.js} +6 -6
- package/dist/bundle/{node-CT3N3TNL.js → node-UTQCYQF5.js} +2 -2
- package/dist/bundle/{node-sqlite-MELD2SBX.js → node-sqlite-APJG6MGL.js} +7 -7
- package/dist/bundle/{oauth-YBH5OKC2.js → oauth-TY7RMIBL.js} +8 -8
- package/dist/bundle/{open-WNSBWTAG.js → open-WDVEQL75.js} +5 -5
- package/dist/bundle/{openai-XSNMNLW6.js → openai-H5UJHSEZ.js} +15 -15
- package/dist/bundle/{process-I2QKOMM7.js → process-MGMXXPMY.js} +1 -1
- package/dist/bundle/{program-G6O3IJR2.js → program-IF36C6VR.js} +969 -1127
- package/dist/bundle/{prompt-SOG4AKPM.js → prompt-4RLIWLMF.js} +5 -5
- package/dist/bundle/{recognize-WMQLWMXH.js → recognize-UIRTMWM4.js} +4 -4
- package/dist/bundle/{remote-4BTFOLFY.js → remote-L3MNWZQK.js} +9 -9
- package/dist/bundle/{rerank-LJ3TWRNV.js → rerank-F4KZQTY6.js} +7 -7
- package/dist/bundle/{serve-B6UANKXN.js → serve-37AUYTWS.js} +10 -10
- package/dist/bundle/server-CRF4QSZR.js +86 -0
- package/dist/bundle/{server-YRH6GJ5Z.js → server-UBG676ZJ.js} +73 -61
- package/dist/bundle/source-Z7GH7T4B.js +44 -0
- package/dist/bundle/{sqlite-runtime-R7QFWFE7.js → sqlite-runtime-CI3RW7VA.js} +6 -6
- package/dist/bundle/{state-DIJ5YUOE.js → state-JOHLSLUO.js} +6 -6
- package/dist/bundle/{store-MYTYDV6A.js → store-2MBG4IUS.js} +28 -21
- package/dist/bundle/{store-6WFWW7EC.js → store-OSOUXBYL.js} +28 -23
- package/dist/bundle/store-SNW6U32Y.js +34 -0
- package/dist/bundle/store-maintenance-command-W7V54SLT.js +73 -0
- package/dist/bundle/surface-ESJS2FUI.js +72 -0
- package/dist/bundle/writer-BJDQMKUV.js +46 -0
- package/dist/commands/account.d.ts +3 -2
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +38 -77
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/crm-shared.d.ts.map +1 -1
- package/dist/commands/crm-shared.js +2 -0
- package/dist/commands/crm-shared.js.map +1 -1
- package/dist/commands/session.d.ts +23 -6
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +122 -77
- package/dist/commands/session.js.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +0 -2
- package/dist/program.js.map +1 -1
- package/dist/reasons.js +2 -2
- package/dist/reasons.js.map +1 -1
- package/dist/setup/flow.d.ts.map +1 -1
- package/dist/setup/flow.js +74 -4
- package/dist/setup/flow.js.map +1 -1
- package/dist/setup/texts.en.json +22 -1
- package/dist/setup/texts.es.json +22 -1
- package/dist/setup/texts.ru.json +22 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/amo-cli/references/setup.md +8 -2
- package/dist/bundle/command-contract-QBUQBXH7.js +0 -39
- package/dist/bundle/first-screen-GMN3T6RW.js +0 -39
- package/dist/bundle/meeting-combined-LAMF7S2B.js +0 -24
- package/dist/bundle/server-S6XD6V6E.js +0 -77
- package/dist/bundle/source-DGFTA2TN.js +0 -42
- package/dist/bundle/store-CHWY2USQ.js +0 -32
- package/dist/bundle/store-maintenance-command-B5TMKFMG.js +0 -68
- package/dist/bundle/writer-GP7VIMAU.js +0 -44
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KORZEYZN.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AP3CWDRK.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-UBQ5M47X.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-APJG6MGL.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
filesPresent,
|
|
5
|
+
sharedModelsDirectory
|
|
6
|
+
} from "./chunk-IPNIF5JE.js";
|
|
3
7
|
import {
|
|
4
8
|
readSharedSection,
|
|
5
9
|
sharedConfigPath,
|
|
6
10
|
writeSharedSection
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
filesPresent,
|
|
10
|
-
sharedModelsDirectory
|
|
11
|
-
} from "./chunk-U7RLVJ34.js";
|
|
11
|
+
} from "./chunk-YFRTEJ6V.js";
|
|
12
12
|
import {
|
|
13
13
|
storePath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZKRWNL4T.js";
|
|
15
15
|
import {
|
|
16
16
|
array,
|
|
17
17
|
check,
|
|
@@ -32,15 +32,15 @@ import {
|
|
|
32
32
|
string,
|
|
33
33
|
trim,
|
|
34
34
|
url
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7OVTUADG.js";
|
|
36
36
|
import {
|
|
37
37
|
CliError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AP3CWDRK.js";
|
|
39
39
|
import {
|
|
40
40
|
__name
|
|
41
41
|
} from "./chunk-ZVVMGPBJ.js";
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
44
44
|
import { existsSync } from "node:fs";
|
|
45
45
|
import { join } from "node:path";
|
|
46
46
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
changesMessenger
|
|
5
|
+
} from "./chunk-NKYWQTS2.js";
|
|
6
|
+
import {
|
|
7
|
+
AUTHORITY_KEY,
|
|
8
|
+
BOT_API_KEY,
|
|
9
|
+
authorityAllowed,
|
|
10
|
+
botApiAllowed,
|
|
11
|
+
isBotApi,
|
|
12
|
+
keyForCommand,
|
|
13
|
+
levelFor,
|
|
14
|
+
readKeysForCommand
|
|
15
|
+
} from "./chunk-KBAOJISR.js";
|
|
16
|
+
import {
|
|
17
|
+
writes
|
|
18
|
+
} from "./chunk-7OVTUADG.js";
|
|
19
|
+
import {
|
|
20
|
+
__name
|
|
21
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/command-availability.js
|
|
24
|
+
var commandAvailability = /* @__PURE__ */ __name((info, levels, keyOf, authority, readOnly = false, mcp = true, declared, fetches) => {
|
|
25
|
+
const declaredKey = declared?.keyOf(info.path);
|
|
26
|
+
const key = declared ? declaredKey : keyOf?.(info.path) ?? keyForCommand(info.path);
|
|
27
|
+
const { level } = key ? levelFor(levels, key, declared?.defaults) : { level: "allow" };
|
|
28
|
+
const judged = { ...key ? { permission: key } : {}, level };
|
|
29
|
+
const blocked = /* @__PURE__ */ __name((reason, permission) => ({
|
|
30
|
+
available: false,
|
|
31
|
+
reason,
|
|
32
|
+
...judged,
|
|
33
|
+
...permission && permission !== judged.permission ? { permission, level: levelFor(levels, permission).level } : {}
|
|
34
|
+
}), "blocked");
|
|
35
|
+
const declaredChange = Boolean(declaredKey) && (info.effects === void 0 || info.effects.remote === "write");
|
|
36
|
+
if (readOnly && (changesMessenger(info) || declaredChange || authority?.(info.path)))
|
|
37
|
+
return blocked("the read-only lock blocks this change");
|
|
38
|
+
if (mcp && authority?.(info.path) && !authorityAllowed(levels))
|
|
39
|
+
return blocked(`the profile keeps ${AUTHORITY_KEY} off`, AUTHORITY_KEY);
|
|
40
|
+
if (mcp && isBotApi(info.path) && !botApiAllowed(levels))
|
|
41
|
+
return blocked(`the profile requires ${BOT_API_KEY}: allow`, BOT_API_KEY);
|
|
42
|
+
if (level === "deny")
|
|
43
|
+
return blocked(`the profile denies ${key}`);
|
|
44
|
+
if (level === "readonly" && writes(info.effects) && fetches?.(info.path) !== true)
|
|
45
|
+
return blocked(`${key} is readonly in this profile`);
|
|
46
|
+
const denied = (declared ? [] : readKeysForCommand(info.path)).find((read) => levelFor(levels, read).level === "deny");
|
|
47
|
+
return denied ? blocked(`the profile denies ${denied}`, denied) : { available: true, ...judged };
|
|
48
|
+
}, "commandAvailability");
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
commandAvailability
|
|
52
|
+
};
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
singleLine,
|
|
9
9
|
visibleControls
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AP3CWDRK.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
16
16
|
import { styleText } from "node:util";
|
|
17
17
|
var TIME_WIDTH = 8;
|
|
18
18
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|