@wirecat/drive-cli 0.67.0 → 0.69.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.
Files changed (127) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/bundle/{all-profiles-DVZUVAPQ.js → all-profiles-B4A737YW.js} +20 -30
  3. package/dist/bundle/{anthropic-Y45C45O2.js → anthropic-RZGPDESM.js} +3 -3
  4. package/dist/bundle/{app-server-GTXUOUGD.js → app-server-OWEW7DY5.js} +51 -63
  5. package/dist/bundle/{bun-QVJV76QJ.js → bun-V5QLYBZU.js} +2 -2
  6. package/dist/bundle/{bun-sqlite-CC7PIAMH.js → bun-sqlite-KHLHXXGH.js} +4 -4
  7. package/dist/bundle/{chunk-ETAFFY3J.js → chunk-22SH77TG.js} +65 -64
  8. package/dist/bundle/{chunk-2Y3YBDZX.js → chunk-25FT44S3.js} +1482 -464
  9. package/dist/bundle/{chunk-YVUAG7RF.js → chunk-2DS2TDGW.js} +29 -28
  10. package/dist/bundle/{chunk-JJHDV32D.js → chunk-2Q4CB4EI.js} +1 -1
  11. package/dist/bundle/{chunk-HJF2QGOX.js → chunk-2VFAXC6O.js} +30 -17
  12. package/dist/bundle/{chunk-ULH3TNUP.js → chunk-376ZGVUZ.js} +4 -4
  13. package/dist/bundle/{chunk-NWYVOHIX.js → chunk-3RLRJHAI.js} +1646 -976
  14. package/dist/bundle/{chunk-SXJDCRXE.js → chunk-3URYKAJP.js} +1 -1
  15. package/dist/bundle/{chunk-7AZCAUST.js → chunk-3YKAFLXY.js} +1 -1
  16. package/dist/bundle/{chunk-MF46W7PQ.js → chunk-4J5GJJ2I.js} +1 -1
  17. package/dist/bundle/{chunk-3RG6LL25.js → chunk-4YECZ6CN.js} +11 -11
  18. package/dist/bundle/{chunk-SJE7UGOW.js → chunk-4ZFO2CVH.js} +4 -4
  19. package/dist/bundle/{chunk-UFNE57VY.js → chunk-533XOW74.js} +2 -2
  20. package/dist/bundle/{chunk-6ERQE4FS.js → chunk-5B5NOAIA.js} +100 -55
  21. package/dist/bundle/{chunk-MW46BLWH.js → chunk-5SJZDEIO.js} +2 -0
  22. package/dist/bundle/{chunk-RC72RU66.js → chunk-6D44YQ5X.js} +5 -5
  23. package/dist/bundle/{chunk-2MEVCMBW.js → chunk-6EL5AVXX.js} +3 -5
  24. package/dist/bundle/{chunk-ZU5VQYNY.js → chunk-6XNTELM5.js} +1 -1
  25. package/dist/bundle/{chunk-7J2IP3WL.js → chunk-AD7VI3XU.js} +6 -6
  26. package/dist/bundle/{chunk-Y5WSRG3F.js → chunk-AMQGKMLZ.js} +2 -2
  27. package/dist/bundle/{chunk-UOAHZV3K.js → chunk-BBJVV4E2.js} +28 -29
  28. package/dist/bundle/{chunk-XZCF5XU7.js → chunk-BVVXYZSU.js} +5 -5
  29. package/dist/bundle/{chunk-E3XA56TS.js → chunk-CAQ5GW3A.js} +1 -1
  30. package/dist/bundle/{chunk-MEQNAZ6R.js → chunk-CDSB7WVG.js} +323 -12
  31. package/dist/bundle/{chunk-P6A77LMP.js → chunk-CU6RATZH.js} +5 -7
  32. package/dist/bundle/{chunk-MEY7URZZ.js → chunk-CZ4UEXCE.js} +4 -4
  33. package/dist/bundle/{chunk-JLUQZZ26.js → chunk-E7URRFBB.js} +7 -7
  34. package/dist/bundle/{chunk-JCNEPYQZ.js → chunk-EL2E3ABX.js} +12 -12
  35. package/dist/bundle/{chunk-BHSLMJF7.js → chunk-EWUQIUTB.js} +4 -4
  36. package/dist/bundle/{chunk-4VH7M2OD.js → chunk-F5UUJU6R.js} +2 -2
  37. package/dist/bundle/{chunk-CWDC6QJM.js → chunk-GHFBT2ZM.js} +4 -4
  38. package/dist/bundle/{chunk-2PIA45FC.js → chunk-GK6KXBL6.js} +1 -1
  39. package/dist/bundle/{chunk-T2VAEDJS.js → chunk-GTDCP5OG.js} +3 -3
  40. package/dist/bundle/{chunk-IRULPE5M.js → chunk-HEBZCKMU.js} +1695 -672
  41. package/dist/bundle/{chunk-EXWOOST5.js → chunk-I55XYREN.js} +667 -230
  42. package/dist/bundle/{chunk-5TSILGTO.js → chunk-IQ2QU2X6.js} +1613 -1101
  43. package/dist/bundle/{chunk-WKIQKGOF.js → chunk-KUQDBWPU.js} +42 -32
  44. package/dist/bundle/{chunk-AJ3DFPRT.js → chunk-L342KHIZ.js} +105 -1
  45. package/dist/bundle/{chunk-JY2GZDJL.js → chunk-LRCSDAYK.js} +3 -3
  46. package/dist/bundle/{chunk-U2ERT45N.js → chunk-LUZRVBQR.js} +4 -4
  47. package/dist/bundle/{chunk-AAZPDWRD.js → chunk-MHXZ62CU.js} +1 -1
  48. package/dist/bundle/{chunk-ZK46UHDP.js → chunk-N4ACIIQB.js} +2 -2
  49. package/dist/bundle/{chunk-FS2PG2PE.js → chunk-NVDR72GP.js} +19 -19
  50. package/dist/bundle/{chunk-VZ5KETIX.js → chunk-O6PD7RZY.js} +2 -2
  51. package/dist/bundle/{chunk-PDHN4GHU.js → chunk-OOIAJRKQ.js} +1 -1
  52. package/dist/bundle/{chunk-JEMBW6IO.js → chunk-OUM4ZO53.js} +1 -1
  53. package/dist/bundle/{chunk-QOKPRFHM.js → chunk-PB6NWKH3.js} +2 -2
  54. package/dist/bundle/{chunk-C72WYRXD.js → chunk-QJGFQRTL.js} +10 -10
  55. package/dist/bundle/chunk-RLGQMMYE.js +707 -0
  56. package/dist/bundle/{chunk-4G7WQNG7.js → chunk-RWQ7T4Y5.js} +2 -2
  57. package/dist/bundle/{chunk-ZH4H5XTA.js → chunk-SEJBS7SI.js} +1 -1
  58. package/dist/bundle/{chunk-OOBSSU2G.js → chunk-SY2HLH5R.js} +33 -19
  59. package/dist/bundle/{chunk-LSAIXPAX.js → chunk-SYUXKV2E.js} +1 -1
  60. package/dist/bundle/{chunk-FOMQ4MG3.js → chunk-T4FMXDDV.js} +2 -2
  61. package/dist/bundle/{chunk-5DMPGTNR.js → chunk-T6X6EZ5N.js} +3 -3
  62. package/dist/bundle/{chunk-RLH6BOEG.js → chunk-TZ75K6R7.js} +6 -6
  63. package/dist/bundle/{chunk-D4MVEOU2.js → chunk-U3RXH6RY.js} +1 -1
  64. package/dist/bundle/{chunk-ABJQ6IDU.js → chunk-V4FMN5A6.js} +16 -16
  65. package/dist/bundle/{chunk-WBKYZZQT.js → chunk-VUPWDCYV.js} +1 -1
  66. package/dist/bundle/{chunk-V7E25BUU.js → chunk-WNMPIRRF.js} +98 -6
  67. package/dist/bundle/{chunk-DAFKV6DJ.js → chunk-WOUIHZRI.js} +13 -15
  68. package/dist/bundle/{chunk-WWW7YTFG.js → chunk-WQOGHND4.js} +1 -1
  69. package/dist/bundle/{chunk-NFIR346J.js → chunk-XUHQ7DVT.js} +1 -1
  70. package/dist/bundle/{chunk-YI4DXASF.js → chunk-XVH3WZSZ.js} +49 -55
  71. package/dist/bundle/{chunk-ZEPDEFVT.js → chunk-ZBYKCVSV.js} +1 -1
  72. package/dist/bundle/{chunk-LXRBTXCZ.js → chunk-ZUG67442.js} +2 -2
  73. package/dist/bundle/{cli-U4LSBYDV.js → cli-BS4L3HAP.js} +100 -70
  74. package/dist/bundle/{command-contract-UU5T24ZZ.js → command-contract-HYURWSD6.js} +16 -17
  75. package/dist/bundle/{command-server-entry-PK6FBUPO.js → command-server-entry-CJ2CV7ZV.js} +23 -24
  76. package/dist/bundle/{decode-3ZE6NBKV.js → decode-E2NM5SSM.js} +3 -3
  77. package/dist/bundle/drive.js +4 -4
  78. package/dist/bundle/{echarts-6FWNCNXK.js → echarts-QIXLXS3G.js} +2 -2
  79. package/dist/bundle/{embed-DGYBBZUW.js → embed-YNZW5X6M.js} +4 -4
  80. package/dist/bundle/{embedder-O7A6VMWI.js → embedder-LRC2PKTS.js} +7 -7
  81. package/dist/bundle/{entry-CDJ2QSU2.js → entry-2IMSWRJU.js} +7 -7
  82. package/dist/bundle/{first-run-UOQW7DN5.js → first-run-7CPHQDM5.js} +7 -7
  83. package/dist/bundle/first-screen-OKZ7GMFR.js +38 -0
  84. package/dist/bundle/{google-HPX52KMC.js → google-WDKDBDD4.js} +15 -15
  85. package/dist/bundle/{google-api-HIMN4XL5.js → google-api-7JDZDCWE.js} +52 -53
  86. package/dist/bundle/{grants-RO42I6E4.js → grants-AU25GWKF.js} +57 -58
  87. package/dist/bundle/{identity-NFGHDPLL.js → identity-E43WKN5F.js} +1 -1
  88. package/dist/bundle/{instructions-6JAQYCM6.js → instructions-MD2RZT5Z.js} +1 -1
  89. package/dist/bundle/{login-RZOQN63N.js → login-RBDJPQAG.js} +57 -58
  90. package/dist/bundle/{node-KSIX3GIH.js → node-IEVT2FSJ.js} +2 -2
  91. package/dist/bundle/{node-sqlite-4FJ6WJXN.js → node-sqlite-IENH4TRX.js} +5 -5
  92. package/dist/bundle/{oauth-BKZAMFKK.js → oauth-3JGSN47Z.js} +5 -5
  93. package/dist/bundle/{open-4AQJGH42.js → open-TZ5H7NYM.js} +3 -3
  94. package/dist/bundle/{openai-24F2OX55.js → openai-XF2KB7W2.js} +14 -14
  95. package/dist/bundle/{process-7NOA2T7H.js → process-6Q23D3TO.js} +1 -1
  96. package/dist/bundle/{program-7JHMLDEX.js → program-D5XWOHV5.js} +88 -88
  97. package/dist/bundle/{prompt-NM66MAZ4.js → prompt-KUC5D4GX.js} +3 -3
  98. package/dist/bundle/{recognize-DBKV2JYZ.js → recognize-DPFW7HO3.js} +2 -2
  99. package/dist/bundle/{remote-ABWUTBVB.js → remote-MODTSUNH.js} +8 -8
  100. package/dist/bundle/{rerank-FQAU4ENY.js → rerank-JK7SERLE.js} +5 -5
  101. package/dist/bundle/{serve-QLJG4QZD.js → serve-BV2WHZLW.js} +7 -7
  102. package/dist/bundle/server-6YDI4Y36.js +72 -0
  103. package/dist/bundle/{server-VGZNK5XD.js → server-N3WPEU7Z.js} +47 -44
  104. package/dist/bundle/{services-5KARVUHK.js → services-SV6CFUCS.js} +42 -27
  105. package/dist/bundle/{sqlite-runtime-ILF6EFQJ.js → sqlite-runtime-RZ5PLZVQ.js} +4 -4
  106. package/dist/bundle/{state-R2M56GPU.js → state-RAZIREVG.js} +4 -4
  107. package/dist/bundle/{store-DA4K7HWW.js → store-2DLGLYS6.js} +18 -14
  108. package/dist/bundle/{store-2OBVMUQL.js → store-DQKJKX2G.js} +12 -12
  109. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +64 -0
  110. package/dist/bundle/tokens-LY3WML55.js +110 -0
  111. package/dist/policy.d.ts +2 -0
  112. package/dist/policy.d.ts.map +1 -1
  113. package/dist/policy.js +2 -1
  114. package/dist/policy.js.map +1 -1
  115. package/dist/program.d.ts.map +1 -1
  116. package/dist/program.js +3 -2
  117. package/dist/program.js.map +1 -1
  118. package/dist/version.d.ts +1 -1
  119. package/dist/version.js +1 -1
  120. package/package.json +2 -2
  121. package/dist/bundle/chunk-AZKFZ7J7.js +0 -76
  122. package/dist/bundle/chunk-JO7BJYAP.js +0 -1235
  123. package/dist/bundle/chunk-MBLB4TQI.js +0 -1316
  124. package/dist/bundle/first-screen-SNDV4YKF.js +0 -39
  125. package/dist/bundle/server-NUBLY5SV.js +0 -74
  126. package/dist/bundle/store-maintenance-command-KSIPI5B5.js +0 -65
  127. package/dist/bundle/tokens-VQDGSHRB.js +0 -111
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  refuseLacking
5
- } from "./chunk-JO7BJYAP.js";
5
+ } from "./chunk-RLGQMMYE.js";
6
6
  import {
7
7
  FloodMemory,
8
8
  OFFLINE,
@@ -18,38 +18,37 @@ import {
18
18
  servicesFor,
19
19
  throughWrapper,
20
20
  withFileLockAsync
21
- } from "./chunk-IRULPE5M.js";
21
+ } from "./chunk-HEBZCKMU.js";
22
22
  import {
23
23
  servingProfiles
24
- } from "./chunk-5DMPGTNR.js";
25
- import {
26
- asFirstWord,
27
- baseContext,
28
- environmentOf,
29
- issueMessage,
30
- permissionIssues,
31
- publicIssue,
32
- recalledAccount,
33
- rememberAccount,
34
- rootOf2 as rootOf
35
- } from "./chunk-2Y3YBDZX.js";
36
- import {
37
- providerErrorKey
38
- } from "./chunk-7J2IP3WL.js";
24
+ } from "./chunk-T6X6EZ5N.js";
39
25
  import {
40
26
  AUTHORITY_KEY,
41
27
  CEILING_KEY,
42
28
  DEFAULT_PERMISSIONS,
43
29
  KEYED_UNDER_HOUSEKEEPING,
44
30
  WRITE_KEYS,
31
+ asFirstWord,
32
+ baseContext,
45
33
  codeOf,
46
34
  currentOperation,
35
+ environmentOf,
36
+ fetchesUnder,
37
+ issueMessage,
47
38
  keyForCommand,
48
39
  levelFor,
49
40
  limitBatch,
41
+ permissionIssues,
42
+ publicIssue,
50
43
  readKeysForCommand,
44
+ recalledAccount,
45
+ rememberAccount,
46
+ rootOf2 as rootOf,
51
47
  skipFlagFor
52
- } from "./chunk-MBLB4TQI.js";
48
+ } from "./chunk-25FT44S3.js";
49
+ import {
50
+ providerErrorKey
51
+ } from "./chunk-AD7VI3XU.js";
53
52
  import {
54
53
  chatReferenceOf,
55
54
  ensureAccount,
@@ -57,13 +56,13 @@ import {
57
56
  isId,
58
57
  openStore,
59
58
  pickPerson
60
- } from "./chunk-NWYVOHIX.js";
59
+ } from "./chunk-3RLRJHAI.js";
61
60
  import {
62
61
  isCliFailure
63
- } from "./chunk-7AZCAUST.js";
62
+ } from "./chunk-3YKAFLXY.js";
64
63
  import {
65
64
  resolvePaths
66
- } from "./chunk-MW46BLWH.js";
65
+ } from "./chunk-5SJZDEIO.js";
67
66
  import {
68
67
  CliError
69
68
  } from "./chunk-EA2OB75T.js";
@@ -71,7 +70,7 @@ import {
71
70
  __name
72
71
  } from "./chunk-ZVVMGPBJ.js";
73
72
 
74
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
75
74
  import { openSync } from "node:fs";
76
75
  import { createInterface } from "node:readline";
77
76
  import { ReadStream } from "node:tty";
@@ -126,7 +125,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
126
125
  throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
127
126
  }, "terminalAsker");
128
127
 
129
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
128
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
130
129
  var HOUSEKEEPING = /* @__PURE__ */ new Set([
131
130
  "help",
132
131
  "guide",
@@ -206,7 +205,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
206
205
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
207
206
  }, "refuseUnknownPermissionKeys");
208
207
 
209
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
208
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
210
209
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
211
210
  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" }) => {
212
211
  let warned = false;
@@ -782,7 +781,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
782
781
  }
783
782
  }, "keep");
784
783
 
785
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/sends/pace.js
784
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/sends/pace.js
786
785
  import { readFileSync, renameSync, writeFileSync } from "node:fs";
787
786
  import { join } from "node:path";
788
787
  var DEFAULT_PACE = { perMinute: 60, burst: 20 };
@@ -877,7 +876,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
877
876
  await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
878
877
  }, "waitForTurn");
879
878
 
880
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
879
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
881
880
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
882
881
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
883
882
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -974,7 +973,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
974
973
  });
975
974
  }, "flooded");
976
975
 
977
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
976
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
978
977
  var observed = /* @__PURE__ */ __name((messenger, events) => {
979
978
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
980
979
  const write = currentOperation();
@@ -1073,7 +1072,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
1073
1072
  counts[part] = (counts[part] ?? 0) + items.length;
1074
1073
  }, "byPart");
1075
1074
 
1076
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
1075
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
1077
1076
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
1078
1077
  let opened;
1079
1078
  return {
@@ -1351,6 +1350,8 @@ var refuseLocalWrite = /* @__PURE__ */ __name((context, command, permission) =>
1351
1350
  const { level, key } = levelFor(settings.permissions, permission);
1352
1351
  if (level === "allow" || level === "ask" && context.agent)
1353
1352
  return;
1353
+ if (fetchesUnder(level, permission))
1354
+ return;
1354
1355
  if (key === CEILING_KEY)
1355
1356
  throw ceilingRefusal(permission, command);
1356
1357
  throw new CliError(level === "ask" ? "confirmation_required" : "permission_error", `profile ${settings.profile} does not let ${permission} write (permissions.${key} is ${level}, from the ${settings.permissionSources[key ?? ""] ?? "default"}); to allow it: ${command} ${settings.profile} config set permissions.${permission} allow`, { permission });
@@ -7,7 +7,7 @@ import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
11
11
  var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
12
12
  var MAX_SECRET_INPUT = 64 * 1024;
13
13
  var policies = /* @__PURE__ */ new WeakMap();
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  activeProfile,
5
5
  paths
6
- } from "./chunk-DAFKV6DJ.js";
6
+ } from "./chunk-WOUIHZRI.js";
7
7
  import {
8
8
  READ_SCOPE,
9
9
  WRITE_SCOPE
@@ -13,25 +13,25 @@ import {
13
13
  } from "./chunk-Y2QVNVHK.js";
14
14
  import {
15
15
  providerRequest
16
- } from "./chunk-5TSILGTO.js";
16
+ } from "./chunk-IQ2QU2X6.js";
17
17
  import {
18
18
  withTimeLimit
19
- } from "./chunk-6ERQE4FS.js";
19
+ } from "./chunk-5B5NOAIA.js";
20
20
  import {
21
21
  acquireLock
22
- } from "./chunk-JCNEPYQZ.js";
22
+ } from "./chunk-EL2E3ABX.js";
23
23
  import {
24
24
  hostFetch
25
- } from "./chunk-AJ3DFPRT.js";
25
+ } from "./chunk-L342KHIZ.js";
26
26
  import {
27
27
  DESKTOP
28
- } from "./chunk-LSAIXPAX.js";
28
+ } from "./chunk-SYUXKV2E.js";
29
29
  import {
30
30
  Credentials,
31
31
  isMovedRun,
32
32
  keyringService,
33
33
  systemKeyring
34
- } from "./chunk-MW46BLWH.js";
34
+ } from "./chunk-5SJZDEIO.js";
35
35
  import {
36
36
  minLength,
37
37
  nullable,
@@ -50,7 +50,7 @@ import {
50
50
  __name
51
51
  } from "./chunk-ZVVMGPBJ.js";
52
52
 
53
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
53
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
54
54
  import { createHash, randomBytes } from "node:crypto";
55
55
  import { createServer } from "node:http";
56
56
  var DEFAULT_TIMEOUT_MS = 3e5;
@@ -186,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
186
186
  }
187
187
  }, "authorize");
188
188
 
189
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
189
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
190
190
  import { createHash as createHash2 } from "node:crypto";
191
191
  import { join } from "node:path";
192
192
  import { setTimeout as delay } from "node:timers/promises";
193
193
 
194
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/requests.js
194
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/requests.js
195
195
  var REQUEST_LIMIT_MS = 3e4;
196
196
  var TOKEN_LOG_EVENT = "oauth.token";
197
197
  var object2 = /* @__PURE__ */ __name((value) => {
@@ -288,6 +288,15 @@ var exchangeTokens = /* @__PURE__ */ __name(async (provider, params, context, de
288
288
  ...tokenType ? { tokenType } : {}
289
289
  };
290
290
  }, "exchangeTokens");
291
+ var alreadyRevoked = /* @__PURE__ */ __name(async (response) => {
292
+ if (response.status !== 400)
293
+ return false;
294
+ try {
295
+ return object2(JSON.parse(await response.text())).error === "invalid_token";
296
+ } catch {
297
+ return false;
298
+ }
299
+ }, "alreadyRevoked");
291
300
  var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
292
301
  if (provider.revoke)
293
302
  return provider.revoke(tokens, context);
@@ -295,23 +304,27 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
295
304
  throw new CliError("validation_error", `${provider.name} declares no way to revoke a sign-in`);
296
305
  const { revokeUrl } = provider;
297
306
  const form = new URLSearchParams({ token: tokens.refreshToken, ...clientFields(context) });
298
- const response = await withTimeLimit(REQUEST_LIMIT_MS, (deadline) => post(revokeUrl, form, context, deadline));
299
- context.log?.[response?.ok ? "info" : "warn"]({
307
+ const { response, gone } = await withTimeLimit(REQUEST_LIMIT_MS, async (deadline) => {
308
+ const response2 = await post(revokeUrl, form, context, deadline);
309
+ return { response: response2, gone: response2 ? await alreadyRevoked(response2) : false };
310
+ });
311
+ const done = response?.ok || gone;
312
+ context.log?.[done ? "info" : "warn"]({
300
313
  event: TOKEN_LOG_EVENT,
301
314
  provider: provider.id,
302
315
  operation: "revoke",
303
316
  pid: process.pid,
304
- outcome: response?.ok ? "revoked" : response ? "rejected" : "no_response",
317
+ outcome: response?.ok ? "revoked" : gone ? "already_revoked" : response ? "rejected" : "no_response",
305
318
  ...response ? { status: response.status } : {}
306
319
  });
307
- if (!response?.ok)
320
+ if (!done)
308
321
  throw new CliError("outcome_unknown", `${provider.name} did not confirm the revoke`, {
309
322
  reason: "oauth.revoke-failed",
310
323
  ...response ? { status: response.status } : {}
311
324
  });
312
325
  }, "revokeToken");
313
326
 
314
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
327
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
315
328
  var inFlight = /* @__PURE__ */ new Map();
316
329
  var refreshedInMemory = /* @__PURE__ */ new Map();
317
330
  var tokenKeeper = /* @__PURE__ */ __name((options) => {
@@ -473,7 +486,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
473
486
  };
474
487
  }, "tokenKeeper");
475
488
 
476
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/provider.js
489
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/provider.js
477
490
  var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
478
491
  id: "google",
479
492
  name: "Google",
@@ -490,7 +503,7 @@ var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
490
503
  }
491
504
  }), "googleProvider");
492
505
 
493
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/storage.js
506
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/storage.js
494
507
  var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
495
508
  var parse = /* @__PURE__ */ __name((raw) => {
496
509
  let value;
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-5DMPGTNR.js";
8
+ } from "./chunk-T6X6EZ5N.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");