@wirecat/cli-template 0.10.0 → 0.11.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 (97) hide show
  1. package/.github/workflows/ci.yml +17 -0
  2. package/CHANGELOG.md +30 -0
  3. package/CLAUDE.md +1 -3
  4. package/contracts/help.snap +2 -0
  5. package/dist/bin/clidev.js +2 -2
  6. package/dist/bundle/{all-profiles-XHC7BG3P.js → all-profiles-MJ6XSFOO.js} +4 -4
  7. package/dist/bundle/{anthropic-N6B3ZZHQ.js → anthropic-W5UKBZUB.js} +3 -3
  8. package/dist/bundle/app-server-EZ46JAHB.js +217 -0
  9. package/dist/bundle/{bun-HUJLS7KP.js → bun-HB6O2TTT.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-OWFO2TVR.js → bun-sqlite-KBXOW2ES.js} +2 -2
  11. package/dist/bundle/{chunk-B4EED2RF.js → chunk-2B5U4Z5H.js} +5 -5
  12. package/dist/bundle/{chunk-ABP7FDMJ.js → chunk-35KYY65W.js} +2 -2
  13. package/dist/bundle/{chunk-MZVV2JZT.js → chunk-4LURWBVV.js} +17 -9
  14. package/dist/bundle/{chunk-QGNNMPUB.js → chunk-7IXL4UFK.js} +7 -7
  15. package/dist/bundle/{chunk-NE3NSB5O.js → chunk-AK257OMS.js} +55 -43
  16. package/dist/bundle/{chunk-IJ3IA7EK.js → chunk-CXQXVKUY.js} +1 -1
  17. package/dist/bundle/{chunk-7RB76E2L.js → chunk-EGRB55FF.js} +4 -4
  18. package/dist/bundle/{chunk-DMCN22H6.js → chunk-ERGB4NJA.js} +20 -2
  19. package/dist/bundle/{chunk-TJLGI3N6.js → chunk-ERKR3VJ5.js} +79 -28
  20. package/dist/bundle/{chunk-2CFBHYFA.js → chunk-FDBINRWA.js} +4 -4
  21. package/dist/bundle/{chunk-FIHDGZIB.js → chunk-FZZIU4B7.js} +2416 -2254
  22. package/dist/bundle/{chunk-BDSDQCV4.js → chunk-HDY5X3WQ.js} +4 -4
  23. package/dist/bundle/{chunk-XFXBXQBS.js → chunk-IBBN7Z3A.js} +2 -2
  24. package/dist/bundle/{chunk-4QRLPOJ7.js → chunk-IDWW4TU2.js} +1 -1
  25. package/dist/bundle/{chunk-OPPMGPFW.js → chunk-IGHEW777.js} +4 -4
  26. package/dist/bundle/{chunk-437W3Z2M.js → chunk-IN3FVRPK.js} +1 -1
  27. package/dist/bundle/{chunk-FWVKHD2L.js → chunk-JAOGZMKQ.js} +1 -1
  28. package/dist/bundle/{chunk-O3PBQVAB.js → chunk-JHO2LL2J.js} +18 -6
  29. package/dist/bundle/{chunk-MNSD5BX2.js → chunk-JRK73FOW.js} +1 -1
  30. package/dist/bundle/{chunk-MTGLJCAZ.js → chunk-KAREKBUZ.js} +1 -1
  31. package/dist/bundle/{chunk-O5LMDQTO.js → chunk-KJTNT4SW.js} +1 -1
  32. package/dist/bundle/{chunk-B4LM2B6F.js → chunk-L5WWMP5M.js} +24 -20
  33. package/dist/bundle/{chunk-NTLPDH76.js → chunk-MJRSEUKG.js} +9 -7
  34. package/dist/bundle/{chunk-AP7QKYBG.js → chunk-MUSYGFCY.js} +165 -140
  35. package/dist/bundle/{server-L5GNG7KC.js → chunk-N2Z3MCOF.js} +31 -45
  36. package/dist/bundle/{chunk-JTTW5ZKF.js → chunk-NOVLCHDV.js} +1 -1
  37. package/dist/bundle/{chunk-54AJONOM.js → chunk-O3UXNU3S.js} +2 -2
  38. package/dist/bundle/{chunk-75LVQQEK.js → chunk-OV6PHTAY.js} +2034 -1590
  39. package/dist/bundle/{chunk-W2IDKBNB.js → chunk-PBN4RBHS.js} +7 -7
  40. package/dist/bundle/{chunk-2TBVT4SZ.js → chunk-PDGXMKJS.js} +1 -1
  41. package/dist/bundle/{recognize-TTED4SE3.js → chunk-PJOVK7PG.js} +6 -5
  42. package/dist/bundle/{chunk-LY7GS2YI.js → chunk-QBP7OMN5.js} +1 -1
  43. package/dist/bundle/{chunk-VMTM46FH.js → chunk-QJ6XW4DM.js} +75 -51
  44. package/dist/bundle/{chunk-OPJ24VGH.js → chunk-QKWRL4OD.js} +5 -5
  45. package/dist/bundle/{chunk-6CBWO7OF.js → chunk-RUKDZEID.js} +2 -2
  46. package/dist/bundle/{chunk-TARN7CHN.js → chunk-SVDF6NJF.js} +10 -10
  47. package/dist/bundle/{chunk-FXS3X76A.js → chunk-TAYOKLGF.js} +4 -4
  48. package/dist/bundle/{chunk-ASMH7JWZ.js → chunk-TGB5F7NC.js} +2 -2
  49. package/dist/bundle/{chunk-222FANS2.js → chunk-V3ZTQ24B.js} +4 -4
  50. package/dist/bundle/{chunk-LSEF4QC3.js → chunk-VLNKTMV7.js} +75 -47
  51. package/dist/bundle/{chunk-7RXBN7HP.js → chunk-VYSUKHKL.js} +1 -1
  52. package/dist/bundle/{chunk-JEBSORH7.js → chunk-YJNUDHJD.js} +25 -14
  53. package/dist/bundle/{chunk-S57AMKLX.js → chunk-Z7MSIRSQ.js} +1 -1
  54. package/dist/bundle/{chunk-2KQZ24GI.js → chunk-ZLY6GUAS.js} +2 -2
  55. package/dist/bundle/clidev.js +2 -2
  56. package/dist/bundle/{command-contract-PEM3S634.js → command-contract-75VJ36U4.js} +10 -10
  57. package/dist/bundle/decode-AMXUVKNY.js +158 -0
  58. package/dist/bundle/{echarts-2QGL2JP5.js → echarts-GJDMQ2AQ.js} +2 -2
  59. package/dist/bundle/{embed-HHAAGHA6.js → embed-L4CRZ2XQ.js} +3 -3
  60. package/dist/bundle/{embedder-W2OGVVYH.js → embedder-IBGV4M2K.js} +6 -6
  61. package/dist/bundle/{first-run-WCJUDUBU.js → first-run-VTKC2IBV.js} +5 -5
  62. package/dist/bundle/{first-screen-U4DFUKUC.js → first-screen-X5IJKBSU.js} +11 -11
  63. package/dist/bundle/{instructions-OTZHT6NV.js → instructions-YJECS4KN.js} +3 -1
  64. package/dist/bundle/{mcp-VVF6J7SQ.js → mcp-G6XP2IRO.js} +33 -33
  65. package/dist/bundle/mcp-RDZGYPSY.js +78 -0
  66. package/dist/bundle/{node-SYD4GX5O.js → node-NQG4EVZR.js} +2 -2
  67. package/dist/bundle/node-sqlite-BR7F3BLB.js +61 -0
  68. package/dist/bundle/{oauth-42M34GQ5.js → oauth-J7UAWNIK.js} +4 -4
  69. package/dist/bundle/{open-SWXRCDLN.js → open-BR47R5UE.js} +1 -1
  70. package/dist/bundle/{process-KAFGXZ7Q.js → process-66I7RDPJ.js} +1 -1
  71. package/dist/bundle/{program-EHR4G7VN.js → program-K6347XBZ.js} +913 -601
  72. package/dist/bundle/{prompt-ZQTMHRGX.js → prompt-NE5JJ7UP.js} +2 -2
  73. package/dist/bundle/recognize-GC3YFVIA.js +21 -0
  74. package/dist/bundle/{remote-C37XJ4BP.js → remote-QELOMKQM.js} +4 -4
  75. package/dist/bundle/{rerank-APFZAMQL.js → rerank-BH6TZ2SP.js} +4 -4
  76. package/dist/bundle/{serve-DDPIHDVZ.js → serve-WWLRNDT2.js} +6 -6
  77. package/dist/bundle/server-DE6NLNUF.js +52 -0
  78. package/dist/bundle/server-ZPSQKOAH.js +39 -0
  79. package/dist/bundle/{state-WWPPHERF.js → state-2BEGXAMO.js} +3 -3
  80. package/dist/bundle/{store-H6UIA4PK.js → store-AH6WZMCF.js} +7 -7
  81. package/dist/bundle/store-maintenance-command-PBXX3IEV.js +40 -0
  82. package/dist/version.d.ts +1 -1
  83. package/dist/version.js +1 -1
  84. package/docs/dev/TESTING.md +2 -0
  85. package/docs/dev/skills/release/SKILL.md +7 -3
  86. package/docs/dev/test-matrix.md +1 -1
  87. package/package.json +3 -2
  88. package/scripts/audit.sh +11 -1
  89. package/scripts/smoke-bundle.ts +2 -1
  90. package/scripts/smoke.ts +18 -0
  91. package/scripts/test-matrix-untested.ts +1 -1
  92. package/src/version.ts +1 -1
  93. package/dist/bundle/mcp-Y7VCIZ2J.js +0 -78
  94. package/dist/bundle/node-sqlite-X2DGRFOZ.js +0 -45
  95. package/dist/bundle/server-LKVYA2AE.js +0 -39
  96. package/dist/bundle/store-maintenance-command-EYBT64A2.js +0 -40
  97. /package/dist/bundle/{chunk-QVJLOUQB.js → chunk-GOO67PDU.js} +0 -0
@@ -2,8 +2,8 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSecret
5
- } from "./chunk-2KQZ24GI.js";
6
- import "./chunk-O5LMDQTO.js";
5
+ } from "./chunk-ZLY6GUAS.js";
6
+ import "./chunk-KJTNT4SW.js";
7
7
  import "./chunk-EFHLQXG6.js";
8
8
  import "./chunk-Y5E2WNWB.js";
9
9
  import "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,21 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ SAMPLE_RATE,
5
+ decodeOgg,
6
+ detector,
7
+ loadSherpa,
8
+ openRecognizer,
9
+ toModelRate
10
+ } from "./chunk-PJOVK7PG.js";
11
+ import "./chunk-EFHLQXG6.js";
12
+ import "./chunk-Y5E2WNWB.js";
13
+ import "./chunk-ZVVMGPBJ.js";
14
+ export {
15
+ SAMPLE_RATE,
16
+ decodeOgg,
17
+ detector,
18
+ loadSherpa,
19
+ openRecognizer,
20
+ toModelRate
21
+ };
@@ -8,10 +8,10 @@ import {
8
8
  openRemote,
9
9
  remoteKey,
10
10
  remoteModel
11
- } from "./chunk-ABP7FDMJ.js";
12
- import "./chunk-OPJ24VGH.js";
13
- import "./chunk-7RB76E2L.js";
14
- import "./chunk-4QRLPOJ7.js";
11
+ } from "./chunk-35KYY65W.js";
12
+ import "./chunk-QKWRL4OD.js";
13
+ import "./chunk-EGRB55FF.js";
14
+ import "./chunk-IDWW4TU2.js";
15
15
  import "./chunk-EFHLQXG6.js";
16
16
  import "./chunk-Y5E2WNWB.js";
17
17
  import "./chunk-ZVVMGPBJ.js";
@@ -4,16 +4,16 @@ import {
4
4
  defaultThreads,
5
5
  loadModel,
6
6
  truncated
7
- } from "./chunk-OPJ24VGH.js";
8
- import "./chunk-7RB76E2L.js";
9
- import "./chunk-4QRLPOJ7.js";
7
+ } from "./chunk-QKWRL4OD.js";
8
+ import "./chunk-EGRB55FF.js";
9
+ import "./chunk-IDWW4TU2.js";
10
10
  import "./chunk-EFHLQXG6.js";
11
11
  import "./chunk-Y5E2WNWB.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
17
17
  var openReranker = /* @__PURE__ */ __name(async (model, directory, { threads = defaultThreads() } = {}) => {
18
18
  const { ort, tokenizer, session } = await loadModel(model, directory, threads);
19
19
  const typeIds = session.inputNames.includes("token_type_ids");
@@ -3,13 +3,13 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  MCP_PATH,
5
5
  serveOverHttp
6
- } from "./chunk-FXS3X76A.js";
7
- import "./chunk-MNSD5BX2.js";
8
- import "./chunk-ASMH7JWZ.js";
6
+ } from "./chunk-TAYOKLGF.js";
7
+ import "./chunk-JRK73FOW.js";
8
+ import "./chunk-TGB5F7NC.js";
9
9
  import "./chunk-5D4AEUVA.js";
10
- import "./chunk-222FANS2.js";
11
- import "./chunk-6CBWO7OF.js";
12
- import "./chunk-7RXBN7HP.js";
10
+ import "./chunk-V3ZTQ24B.js";
11
+ import "./chunk-RUKDZEID.js";
12
+ import "./chunk-VYSUKHKL.js";
13
13
  import "./chunk-EFHLQXG6.js";
14
14
  import "./chunk-Y5E2WNWB.js";
15
15
  import "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,52 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ PER_RUN,
5
+ createServer,
6
+ envelope,
7
+ serveOverHttpUntilStopped,
8
+ serveOverStdio
9
+ } from "./chunk-N2Z3MCOF.js";
10
+ import "./chunk-ERKR3VJ5.js";
11
+ import "./chunk-JAOGZMKQ.js";
12
+ import "./chunk-IN3FVRPK.js";
13
+ import "./chunk-YJNUDHJD.js";
14
+ import "./chunk-4LURWBVV.js";
15
+ import "./chunk-IBBN7Z3A.js";
16
+ import "./chunk-L5WWMP5M.js";
17
+ import "./chunk-FZZIU4B7.js";
18
+ import "./chunk-KJTNT4SW.js";
19
+ import "./chunk-E42W72PQ.js";
20
+ import "./chunk-MFS52LTZ.js";
21
+ import "./chunk-ERGB4NJA.js";
22
+ import "./chunk-5D4AEUVA.js";
23
+ import "./chunk-V3ZTQ24B.js";
24
+ import "./chunk-RUKDZEID.js";
25
+ import "./chunk-OV6PHTAY.js";
26
+ import "./chunk-PBN4RBHS.js";
27
+ import "./chunk-35KYY65W.js";
28
+ import "./chunk-NOVLCHDV.js";
29
+ import "./chunk-IGHEW777.js";
30
+ import "./chunk-MUSYGFCY.js";
31
+ import "./chunk-QJ6XW4DM.js";
32
+ import "./chunk-MJRSEUKG.js";
33
+ import "./chunk-O3UXNU3S.js";
34
+ import "./chunk-VYSUKHKL.js";
35
+ import "./chunk-VLNKTMV7.js";
36
+ import "./chunk-O5EHUB2V.js";
37
+ import "./chunk-FDBINRWA.js";
38
+ import "./chunk-QKWRL4OD.js";
39
+ import "./chunk-EGRB55FF.js";
40
+ import "./chunk-IDWW4TU2.js";
41
+ import "./chunk-2B5U4Z5H.js";
42
+ import "./chunk-EFHLQXG6.js";
43
+ import "./chunk-Y5E2WNWB.js";
44
+ import "./chunk-Z7MSIRSQ.js";
45
+ import "./chunk-ZVVMGPBJ.js";
46
+ export {
47
+ PER_RUN,
48
+ createServer,
49
+ envelope,
50
+ serveOverHttpUntilStopped,
51
+ serveOverStdio
52
+ };
@@ -0,0 +1,39 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ createBotServer,
5
+ serveBotOverStdio
6
+ } from "./chunk-7IXL4UFK.js";
7
+ import "./chunk-CXQXVKUY.js";
8
+ import "./chunk-YJNUDHJD.js";
9
+ import "./chunk-4LURWBVV.js";
10
+ import "./chunk-IBBN7Z3A.js";
11
+ import "./chunk-FZZIU4B7.js";
12
+ import "./chunk-KJTNT4SW.js";
13
+ import "./chunk-E42W72PQ.js";
14
+ import "./chunk-MFS52LTZ.js";
15
+ import "./chunk-5D4AEUVA.js";
16
+ import "./chunk-OV6PHTAY.js";
17
+ import "./chunk-PBN4RBHS.js";
18
+ import "./chunk-35KYY65W.js";
19
+ import "./chunk-NOVLCHDV.js";
20
+ import "./chunk-MUSYGFCY.js";
21
+ import "./chunk-QJ6XW4DM.js";
22
+ import "./chunk-MJRSEUKG.js";
23
+ import "./chunk-O3UXNU3S.js";
24
+ import "./chunk-VYSUKHKL.js";
25
+ import "./chunk-VLNKTMV7.js";
26
+ import "./chunk-O5EHUB2V.js";
27
+ import "./chunk-FDBINRWA.js";
28
+ import "./chunk-QKWRL4OD.js";
29
+ import "./chunk-EGRB55FF.js";
30
+ import "./chunk-IDWW4TU2.js";
31
+ import "./chunk-2B5U4Z5H.js";
32
+ import "./chunk-EFHLQXG6.js";
33
+ import "./chunk-Y5E2WNWB.js";
34
+ import "./chunk-Z7MSIRSQ.js";
35
+ import "./chunk-ZVVMGPBJ.js";
36
+ export {
37
+ createBotServer,
38
+ serveBotOverStdio
39
+ };
@@ -12,9 +12,9 @@ import {
12
12
  readHttpLock,
13
13
  readStored,
14
14
  signedInClients
15
- } from "./chunk-222FANS2.js";
16
- import "./chunk-6CBWO7OF.js";
17
- import "./chunk-7RXBN7HP.js";
15
+ } from "./chunk-V3ZTQ24B.js";
16
+ import "./chunk-RUKDZEID.js";
17
+ import "./chunk-VYSUKHKL.js";
18
18
  import "./chunk-EFHLQXG6.js";
19
19
  import "./chunk-Y5E2WNWB.js";
20
20
  import "./chunk-ZVVMGPBJ.js";
@@ -53,16 +53,16 @@ import {
53
53
  threadConversation,
54
54
  titlePart,
55
55
  vectorIndexCounts
56
- } from "./chunk-75LVQQEK.js";
57
- import "./chunk-W2IDKBNB.js";
58
- import "./chunk-LSEF4QC3.js";
56
+ } from "./chunk-OV6PHTAY.js";
57
+ import "./chunk-PBN4RBHS.js";
58
+ import "./chunk-VLNKTMV7.js";
59
59
  import "./chunk-O5EHUB2V.js";
60
- import "./chunk-2CFBHYFA.js";
61
- import "./chunk-4QRLPOJ7.js";
62
- import "./chunk-B4EED2RF.js";
60
+ import "./chunk-FDBINRWA.js";
61
+ import "./chunk-IDWW4TU2.js";
62
+ import "./chunk-2B5U4Z5H.js";
63
63
  import "./chunk-EFHLQXG6.js";
64
64
  import "./chunk-Y5E2WNWB.js";
65
- import "./chunk-S57AMKLX.js";
65
+ import "./chunk-Z7MSIRSQ.js";
66
66
  import "./chunk-ZVVMGPBJ.js";
67
67
  export {
68
68
  AGENDA_COLUMNS,
@@ -0,0 +1,40 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ buildStems,
5
+ storeMaintenanceCommands,
6
+ storeSummary
7
+ } from "./chunk-AK257OMS.js";
8
+ import "./chunk-L5WWMP5M.js";
9
+ import "./chunk-FZZIU4B7.js";
10
+ import "./chunk-ZLY6GUAS.js";
11
+ import "./chunk-KJTNT4SW.js";
12
+ import "./chunk-HTQTIKWP.js";
13
+ import "./chunk-E42W72PQ.js";
14
+ import "./chunk-MFS52LTZ.js";
15
+ import "./chunk-RUKDZEID.js";
16
+ import "./chunk-OV6PHTAY.js";
17
+ import "./chunk-PBN4RBHS.js";
18
+ import "./chunk-35KYY65W.js";
19
+ import "./chunk-PDGXMKJS.js";
20
+ import "./chunk-NOVLCHDV.js";
21
+ import "./chunk-QJ6XW4DM.js";
22
+ import "./chunk-MJRSEUKG.js";
23
+ import "./chunk-O3UXNU3S.js";
24
+ import "./chunk-VYSUKHKL.js";
25
+ import "./chunk-VLNKTMV7.js";
26
+ import "./chunk-O5EHUB2V.js";
27
+ import "./chunk-FDBINRWA.js";
28
+ import "./chunk-QKWRL4OD.js";
29
+ import "./chunk-EGRB55FF.js";
30
+ import "./chunk-IDWW4TU2.js";
31
+ import "./chunk-2B5U4Z5H.js";
32
+ import "./chunk-EFHLQXG6.js";
33
+ import "./chunk-Y5E2WNWB.js";
34
+ import "./chunk-Z7MSIRSQ.js";
35
+ import "./chunk-ZVVMGPBJ.js";
36
+ export {
37
+ buildStems,
38
+ storeMaintenanceCommands,
39
+ storeSummary
40
+ };
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.10.0";
1
+ export declare const VERSION = "0.11.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.10.0";
1
+ export const VERSION = "0.11.0";
2
2
  //# sourceMappingURL=version.js.map
@@ -7,6 +7,8 @@ How the tests run, and what they never touch. The rules are the handbook's
7
7
  keyring that throws and no network, and points this CLI's config, state, cache and the shared store into that
8
8
  folder. `src/testing/sandbox.ts` names the config folder, which tests write into by name.
9
9
  - `pnpm test:coverage` adds the coverage floor in `vitest.config.ts`.
10
+ - `pnpm test:slow` lists the 20 slowest tests and the 10 slowest files. No test waits for real time (`WC-TEST-5`):
11
+ waits go through an injected sleep, and `fakeClock()` from `@wirecat/cli-base/testing` records them.
10
12
  - Each run logs the command lines the tests drove (`coverage/argv.jsonl`). `pnpm test:matrix` turns that log into
11
13
  [test-matrix.md](test-matrix.md); a command or option no test drives needs a reason in
12
14
  `scripts/test-matrix-untested.ts`.
@@ -17,10 +17,14 @@ The rules are the handbook's [Releases page](../../../../node_modules/@wirecat/c
17
17
  `Changed — may break callers`, `Fixed`, `Security`, `Removed` (`WC-DOC-14` to `WC-DOC-18`). No internal ids.
18
18
  4. **The docs.** `README.md`, `docs/*.md` and `skills/clidev-cli/SKILL.md` state what the code does now (`WC-DOC-3`).
19
19
  `pnpm generate` and `pnpm test:matrix` rewrite the generated pages (`WC-DOC-4`).
20
- 5. **The fresh audit.** Start a new subagent that has none of your context, and give it the prompt in
20
+ 5. **The comparison page.** Re-prove each ✅, 🟡 and ❌ this CLI has on its comparison page against the release build
21
+ (`WC-CMP-11`): the site copy in cli-docs, `translations/pages/clidev/compare.en.md` and its `.ru.md` and `.es.md`,
22
+ or this repository's `docs/compare.md` where it keeps one. Update the check date and version in the intro, in the
23
+ site repository, and name the page in the release pull request.
24
+ 6. **The fresh audit.** Start a new subagent that has none of your context, and give it the prompt in
21
25
  [fresh-audit.md](fresh-audit.md) as written. Put its report in the release pull request. Fix each gap in this
22
26
  repository there, or list it as a follow-up; take a gap in the handbook to cli-base.
23
- 6. **The version.** `npm view @wirecat/clidev-cli version` is what is published. The changelog picks the level, and
27
+ 7. **The version.** `npm view @wirecat/clidev-cli version` is what is published. The changelog picks the level, and
24
28
  before `1.0.0` this narrows `WC-REL-7`: a section with `Changed — may break callers` or `Removed` raises the minor
25
29
  (`0.1.8` to `0.2.0`), and so does one with `Added`; only a section of `Fixed`, `Security` or docs raises the patch.
26
30
  From `1.0.0`, a breaking change raises the major. `pnpm version:check` refuses a dated section whose number is
@@ -28,7 +32,7 @@ The rules are the handbook's [Releases page](../../../../node_modules/@wirecat/c
28
32
  number to the level the headings need. Set the next version in `package.json`, run `pnpm version:sync`, date the
29
33
  section as `## <version> — DD.MM.YYYY`, run `pnpm release:check` again, and open the pull request
30
34
  `chore(release): <version>`.
31
- 7. **The publish.** Merge it when its checks pass, then run `bin/release` on a clean `main`: it starts
35
+ 8. **The publish.** Merge it when its checks pass, then run `bin/release` on a clean `main`: it starts
32
36
  `release.yml` and follows it (`WC-REL-11`). A messenger CLI also needs the owner's signed release report
33
37
  (`WC-REL-10`). Never `bin/release --local`: that is the owner's, for the first release before npm trusts
34
38
  `release.yml`, with `NPM_TOKEN`, the npm token in the keyring, or the owner's own npm login.
@@ -27,7 +27,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see
27
27
  | `mcp server start` | | ⛔ | starts a detached `mcp serve --http` from the built entry; cli-core tests mcpServerCommand, and the background run was checked by hand against dist/ |
28
28
  | `mcp server start` | `--port` | ⛔ | starts a detached `mcp serve --http` from the built entry; cli-core tests mcpServerCommand, and the background run was checked by hand against dist/ |
29
29
  | `mcp server start` | `--public-url` | ⛔ | starts a detached `mcp serve --http` from the built entry; cli-core tests mcpServerCommand, and the background run was checked by hand against dist/ |
30
- | `mcp server stop` | | ⛔ | starts a detached `mcp serve --http` from the built entry; cli-core tests mcpServerCommand, and the background run was checked by hand against dist/ |
30
+ | `mcp server stop` | | ⛔ | stops the detached server that `mcp server start` wrote a pid file for; cli-core tests mcpServerCommand, and no live scenario starts a server to stop |
31
31
  | `mcp server status` | | ✅ | |
32
32
  | `upgrade` | | ✅ | |
33
33
  | `upgrade` | `--check` | ✅ | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-template",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Start a new WireCat CLI: a working skeleton on cli-base and cli-core, copied by new and kept current by upgrade",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
@@ -56,6 +56,7 @@
56
56
  "lint:fix": "biome check --write .",
57
57
  "test": "vitest run",
58
58
  "test:coverage": "vitest run --coverage",
59
+ "test:slow": "vitest run --reporter=json --outputFile=coverage/tests.json >/dev/null; cli-dev slow-tests",
59
60
  "test:matrix": "vitest run >/dev/null && pnpm build >/dev/null && pnpm test:matrix:check",
60
61
  "test:matrix:check": "cli-dev test-matrix --program scripts/command-program.ts --untested scripts/test-matrix-untested.ts --name clidev --check && git diff --exit-code -- docs/dev/test-matrix.md",
61
62
  "generate": "pnpm build && node --experimental-strip-types scripts/commands.ts",
@@ -86,7 +87,7 @@
86
87
  "dependencies": {
87
88
  "@modelcontextprotocol/server": "2.4.0",
88
89
  "@wirecat/cli-base": "0.65.0",
89
- "@wirecat/cli-core": "0.469.0",
90
+ "@wirecat/cli-core": "0.495.0",
90
91
  "commander": "15.0.0"
91
92
  },
92
93
  "devDependencies": {
package/scripts/audit.sh CHANGED
@@ -8,7 +8,9 @@ command=$(node --input-type=module -e "import('$root/dist/identity.js').then((m)
8
8
  scratch=$(mktemp -d)
9
9
  trap 'rm -rf "$scratch"' EXIT
10
10
  # A CLI that starts may move the store under HOME; every CLI run here gets a throwaway one.
11
+ # Moved folders do not hide the keyring: it is reached over D-Bus.
11
12
  export HOME="$scratch/home" MESSAGING_STORE="$scratch/store" WIRECAT_STATE_DIR="$scratch/state"
13
+ export DBUS_SESSION_BUS_ADDRESS=disabled:
12
14
  mkdir -p "$HOME"
13
15
  npm install -g --prefix "$scratch/prefix" --ignore-scripts --no-audit --no-fund --loglevel error \
14
16
  @wirecat/tg-cli @wirecat/max-cli @wirecat/whatsapp-cli @wirecat/cli-memo @wirecat/drive-cli @wirecat/zoom-cli \
@@ -20,7 +22,15 @@ others=()
20
22
  for cli in tg max wa memo drive zm gcal; do
21
23
  [ "$cli" = "$command" ] || others+=(--cli "$bin/$cli")
22
24
  done
25
+ # This CLI's entity schemas and error reasons, from its own `commands info`, so same-entity-schema and
26
+ # same-error-reason measure it. shared-command-contract needs `--complete`, which wants cli-core's doctor contract.
27
+ node "$root/dist/bin/$command.js" commands info --json >"$scratch/info.json"
28
+ node -e 'const info = JSON.parse(require("fs").readFileSync(process.argv[1], "utf8"))
29
+ require("fs").writeFileSync(process.argv[2], JSON.stringify(info.schemas))
30
+ require("fs").writeFileSync(process.argv[3], JSON.stringify(info.reasons))' \
31
+ "$scratch/info.json" "$scratch/schemas.json" "$scratch/reasons.json"
23
32
  "$root/node_modules/.bin/cli-dev" audit --cli "$root/dist/bin/$command.js" "${others[@]}" --for "$command" \
24
- --lint "$command=$root/lint" >"$scratch/scorecard.txt" || { cat "$scratch/scorecard.txt"; exit 1; }
33
+ --lint "$command=$root/lint" --schemas "$command=$scratch/schemas.json" --reasons "$command=$scratch/reasons.json" \
34
+ >"$scratch/scorecard.txt" || { cat "$scratch/scorecard.txt"; exit 1; }
25
35
  awk -v cli="$command" 'NR == 1 || $1 == cli' "$scratch/scorecard.txt"
26
36
  grep -q "^$command *total " "$scratch/scorecard.txt" || { echo "audit: no scorecard row for $command" >&2; exit 1; }
@@ -13,7 +13,7 @@ import { join } from "node:path"
13
13
  const COMMAND = "clidev"
14
14
  const PREFIX = "CLIDEV"
15
15
 
16
- const runtime = typeof (globalThis as { Bun?: unknown }).Bun === "undefined" ? "node" : "bun"
16
+ const runtime = "Bun" in globalThis ? "bun" : "node"
17
17
  const failures: string[] = []
18
18
  const check = (what: string, condition: boolean) => {
19
19
  if (!condition) failures.push(what)
@@ -31,6 +31,7 @@ const run = (args: string[], env: Record<string, string> = {}) =>
31
31
  [`${PREFIX}_CACHE_DIR`]: join(isolated, "cache"),
32
32
  [`${PREFIX}_NO_UPDATE_CHECK`]: "1",
33
33
  MESSAGING_STORE: join(isolated, "store.db"),
34
+ DBUS_SESSION_BUS_ADDRESS: "disabled:",
34
35
  ...env,
35
36
  },
36
37
  })
package/scripts/smoke.ts CHANGED
@@ -24,6 +24,23 @@ const shipped = files
24
24
  .map((entry) => entry.replace(/^\//, ""))
25
25
  .map((entry) => (statSync(join(root, entry), { throwIfNoEntry: false })?.isDirectory() ? `${entry}/` : entry))
26
26
  assert.deepEqual(packContents(root, ["package.json", ...shipped], "package.json and the paths in its files list")(), [])
27
+ // WC-REL-16. The template's own package ships the skeleton's sources, since `new` copies them.
28
+ const FORBIDDEN = [
29
+ "src",
30
+ "scripts",
31
+ ".github",
32
+ "bin/release",
33
+ "config",
34
+ "lint",
35
+ "contracts",
36
+ "docs/dev",
37
+ "template.json",
38
+ ]
39
+ const overlaps = (entry: string, path: string) =>
40
+ entry === path || entry.startsWith(`${path}/`) || path.startsWith(`${entry}/`)
41
+ const forbidden = shipped.flatMap((entry) => FORBIDDEN.filter((path) => overlaps(entry.replace(/\/$/, ""), path)))
42
+ if (name !== "@wirecat/cli-template")
43
+ assert.deepEqual(forbidden, [], "package.json's files ships paths WC-REL-16 forbids")
27
44
  const temp = mkdtempSync(join(tmpdir(), "clidev-package-"))
28
45
  try {
29
46
  const userConfig = join(temp, "npm-user-config")
@@ -48,6 +65,7 @@ try {
48
65
  ...process.env,
49
66
  NODE_OPTIONS: "",
50
67
  HOME: temp,
68
+ DBUS_SESSION_BUS_ADDRESS: "disabled:",
51
69
  CLIDEV_CONFIG_DIR: join(temp, "config"),
52
70
  CLIDEV_STATE_DIR: join(temp, "state"),
53
71
  CLIDEV_CACHE_DIR: join(temp, "cache"),
@@ -29,6 +29,6 @@ export const UNTESTED: { command: string; option?: string; reason: string }[] =
29
29
  {
30
30
  command: "mcp server stop",
31
31
  reason:
32
- "starts a detached `mcp serve --http` from the built entry; cli-core tests mcpServerCommand, and the background run was checked by hand against dist/",
32
+ "stops the detached server that `mcp server start` wrote a pid file for; cli-core tests mcpServerCommand, and no live scenario starts a server to stop",
33
33
  },
34
34
  ]
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.10.0"
1
+ export const VERSION = "0.11.0"
@@ -1,78 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import "./chunk-QVJLOUQB.js";
4
- import {
5
- MCP_PATH,
6
- serveOverHttp
7
- } from "./chunk-FXS3X76A.js";
8
- import "./chunk-MNSD5BX2.js";
9
- import {
10
- mcpUrlOf,
11
- portOf,
12
- publicUrlOf
13
- } from "./chunk-FWVKHD2L.js";
14
- import {
15
- allProfilesServer,
16
- serveAllProfilesOverHttp,
17
- serveAllProfilesOverStdio
18
- } from "./chunk-BDSDQCV4.js";
19
- import "./chunk-437W3Z2M.js";
20
- import {
21
- createBotServer
22
- } from "./chunk-QGNNMPUB.js";
23
- import "./chunk-IJ3IA7EK.js";
24
- import {
25
- registerCommands,
26
- runCommandForAgent,
27
- toolsFromCommands
28
- } from "./chunk-JEBSORH7.js";
29
- import "./chunk-MZVV2JZT.js";
30
- import "./chunk-XFXBXQBS.js";
31
- import "./chunk-FIHDGZIB.js";
32
- import "./chunk-O5LMDQTO.js";
33
- import "./chunk-E42W72PQ.js";
34
- import "./chunk-MFS52LTZ.js";
35
- import {
36
- revokeAll
37
- } from "./chunk-ASMH7JWZ.js";
38
- import "./chunk-5D4AEUVA.js";
39
- import {
40
- httpLockFile
41
- } from "./chunk-222FANS2.js";
42
- import "./chunk-6CBWO7OF.js";
43
- import "./chunk-75LVQQEK.js";
44
- import "./chunk-W2IDKBNB.js";
45
- import "./chunk-ABP7FDMJ.js";
46
- import "./chunk-JTTW5ZKF.js";
47
- import "./chunk-AP7QKYBG.js";
48
- import "./chunk-VMTM46FH.js";
49
- import "./chunk-NTLPDH76.js";
50
- import "./chunk-54AJONOM.js";
51
- import "./chunk-7RXBN7HP.js";
52
- import "./chunk-LSEF4QC3.js";
53
- import "./chunk-O5EHUB2V.js";
54
- import "./chunk-2CFBHYFA.js";
55
- import "./chunk-OPJ24VGH.js";
56
- import "./chunk-7RB76E2L.js";
57
- import "./chunk-4QRLPOJ7.js";
58
- import "./chunk-B4EED2RF.js";
59
- import "./chunk-EFHLQXG6.js";
60
- import "./chunk-Y5E2WNWB.js";
61
- import "./chunk-S57AMKLX.js";
62
- import "./chunk-ZVVMGPBJ.js";
63
- export {
64
- MCP_PATH,
65
- allProfilesServer,
66
- createBotServer,
67
- httpLockFile,
68
- mcpUrlOf,
69
- portOf,
70
- publicUrlOf,
71
- registerCommands,
72
- revokeAll,
73
- runCommandForAgent,
74
- serveAllProfilesOverHttp,
75
- serveAllProfilesOverStdio,
76
- serveOverHttp,
77
- toolsFromCommands
78
- };
@@ -1,45 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- loadVectorExtension,
5
- vectorExtension
6
- } from "./chunk-LY7GS2YI.js";
7
- import "./chunk-EFHLQXG6.js";
8
- import "./chunk-Y5E2WNWB.js";
9
- import {
10
- __name
11
- } from "./chunk-ZVVMGPBJ.js";
12
-
13
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
14
- import { DatabaseSync } from "node:sqlite";
15
- var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
16
- var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
17
- const extension = await vectorExtension();
18
- const client = new DatabaseSync(path, { readOnly, allowExtension: true });
19
- try {
20
- loadVectorExtension(client, extension);
21
- return client;
22
- } catch (error) {
23
- client.close();
24
- throw error;
25
- }
26
- }, "nodeClient");
27
- var cacheOverNodeSqlite = /* @__PURE__ */ __name((database) => {
28
- return {
29
- exec: /* @__PURE__ */ __name((sql) => database.exec(sql), "exec"),
30
- prepare: /* @__PURE__ */ __name((sql) => {
31
- const statement = database.prepare(sql);
32
- return {
33
- run: /* @__PURE__ */ __name((...parameters) => ({ changes: Number(statement.run(...parameters).changes) }), "run"),
34
- get: /* @__PURE__ */ __name((...parameters) => statement.get(...parameters), "get"),
35
- all: /* @__PURE__ */ __name((...parameters) => statement.all(...parameters), "all")
36
- };
37
- }, "prepare"),
38
- close: /* @__PURE__ */ __name(() => database.close(), "close")
39
- };
40
- }, "cacheOverNodeSqlite");
41
- export {
42
- cacheOverNodeSqlite,
43
- nodeClient,
44
- openWithNodeSqlite
45
- };
@@ -1,39 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- createBotServer,
5
- serveBotOverStdio
6
- } from "./chunk-QGNNMPUB.js";
7
- import "./chunk-IJ3IA7EK.js";
8
- import "./chunk-JEBSORH7.js";
9
- import "./chunk-MZVV2JZT.js";
10
- import "./chunk-XFXBXQBS.js";
11
- import "./chunk-FIHDGZIB.js";
12
- import "./chunk-O5LMDQTO.js";
13
- import "./chunk-E42W72PQ.js";
14
- import "./chunk-MFS52LTZ.js";
15
- import "./chunk-5D4AEUVA.js";
16
- import "./chunk-75LVQQEK.js";
17
- import "./chunk-W2IDKBNB.js";
18
- import "./chunk-ABP7FDMJ.js";
19
- import "./chunk-JTTW5ZKF.js";
20
- import "./chunk-AP7QKYBG.js";
21
- import "./chunk-VMTM46FH.js";
22
- import "./chunk-NTLPDH76.js";
23
- import "./chunk-54AJONOM.js";
24
- import "./chunk-7RXBN7HP.js";
25
- import "./chunk-LSEF4QC3.js";
26
- import "./chunk-O5EHUB2V.js";
27
- import "./chunk-2CFBHYFA.js";
28
- import "./chunk-OPJ24VGH.js";
29
- import "./chunk-7RB76E2L.js";
30
- import "./chunk-4QRLPOJ7.js";
31
- import "./chunk-B4EED2RF.js";
32
- import "./chunk-EFHLQXG6.js";
33
- import "./chunk-Y5E2WNWB.js";
34
- import "./chunk-S57AMKLX.js";
35
- import "./chunk-ZVVMGPBJ.js";
36
- export {
37
- createBotServer,
38
- serveBotOverStdio
39
- };
@@ -1,40 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- buildStems,
5
- storeMaintenanceCommands,
6
- storeSummary
7
- } from "./chunk-NE3NSB5O.js";
8
- import "./chunk-B4LM2B6F.js";
9
- import "./chunk-FIHDGZIB.js";
10
- import "./chunk-2KQZ24GI.js";
11
- import "./chunk-O5LMDQTO.js";
12
- import "./chunk-HTQTIKWP.js";
13
- import "./chunk-E42W72PQ.js";
14
- import "./chunk-MFS52LTZ.js";
15
- import "./chunk-6CBWO7OF.js";
16
- import "./chunk-75LVQQEK.js";
17
- import "./chunk-W2IDKBNB.js";
18
- import "./chunk-ABP7FDMJ.js";
19
- import "./chunk-2TBVT4SZ.js";
20
- import "./chunk-JTTW5ZKF.js";
21
- import "./chunk-VMTM46FH.js";
22
- import "./chunk-NTLPDH76.js";
23
- import "./chunk-54AJONOM.js";
24
- import "./chunk-7RXBN7HP.js";
25
- import "./chunk-LSEF4QC3.js";
26
- import "./chunk-O5EHUB2V.js";
27
- import "./chunk-2CFBHYFA.js";
28
- import "./chunk-OPJ24VGH.js";
29
- import "./chunk-7RB76E2L.js";
30
- import "./chunk-4QRLPOJ7.js";
31
- import "./chunk-B4EED2RF.js";
32
- import "./chunk-EFHLQXG6.js";
33
- import "./chunk-Y5E2WNWB.js";
34
- import "./chunk-S57AMKLX.js";
35
- import "./chunk-ZVVMGPBJ.js";
36
- export {
37
- buildStems,
38
- storeMaintenanceCommands,
39
- storeSummary
40
- };