@wirecat/cli-template 0.8.0 → 0.10.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 (125) hide show
  1. package/.github/workflows/ci.yml +3 -3
  2. package/.github/workflows/release.yml +63 -0
  3. package/.gitleaks.toml +18 -0
  4. package/AGENTS.md +9 -15
  5. package/CHANGELOG.md +87 -1
  6. package/README.md +4 -3
  7. package/bin/release +5 -3
  8. package/contracts/plan.json +2 -2
  9. package/dist/bin/clidev.js +34 -12
  10. package/dist/bundle/all-profiles-XHC7BG3P.js +24 -0
  11. package/dist/bundle/anthropic-N6B3ZZHQ.js +70 -0
  12. package/dist/bundle/bun-HUJLS7KP.js +169 -0
  13. package/dist/bundle/bun-sqlite-OWFO2TVR.js +69 -0
  14. package/dist/bundle/chunk-222FANS2.js +161 -0
  15. package/dist/bundle/chunk-2CFBHYFA.js +884 -0
  16. package/dist/bundle/chunk-2KQZ24GI.js +82 -0
  17. package/dist/bundle/chunk-2TBVT4SZ.js +31 -0
  18. package/dist/bundle/chunk-437W3Z2M.js +76 -0
  19. package/dist/bundle/chunk-4QRLPOJ7.js +18 -0
  20. package/dist/bundle/chunk-54AJONOM.js +54 -0
  21. package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
  22. package/dist/bundle/chunk-6CBWO7OF.js +73 -0
  23. package/dist/bundle/chunk-75LVQQEK.js +35782 -0
  24. package/dist/bundle/chunk-7RB76E2L.js +264 -0
  25. package/dist/bundle/chunk-7RXBN7HP.js +63 -0
  26. package/dist/bundle/chunk-ABP7FDMJ.js +122 -0
  27. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  28. package/dist/bundle/chunk-AP7QKYBG.js +3531 -0
  29. package/dist/bundle/chunk-ASMH7JWZ.js +288 -0
  30. package/dist/bundle/chunk-B4EED2RF.js +100 -0
  31. package/dist/bundle/chunk-B4LM2B6F.js +1900 -0
  32. package/dist/bundle/chunk-BDSDQCV4.js +281 -0
  33. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  34. package/dist/bundle/chunk-DMCN22H6.js +35 -0
  35. package/dist/bundle/chunk-E42W72PQ.js +151 -0
  36. package/dist/bundle/chunk-EFHLQXG6.js +5104 -0
  37. package/dist/bundle/chunk-FIHDGZIB.js +34352 -0
  38. package/dist/bundle/chunk-FWVKHD2L.js +48 -0
  39. package/dist/bundle/chunk-FXS3X76A.js +193 -0
  40. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  41. package/dist/bundle/chunk-IJ3IA7EK.js +24 -0
  42. package/dist/bundle/chunk-JEBSORH7.js +3379 -0
  43. package/dist/bundle/chunk-JTTW5ZKF.js +45 -0
  44. package/dist/bundle/chunk-LSEF4QC3.js +3075 -0
  45. package/dist/bundle/chunk-LY7GS2YI.js +58 -0
  46. package/dist/bundle/chunk-MFS52LTZ.js +570 -0
  47. package/dist/bundle/chunk-MNSD5BX2.js +78 -0
  48. package/dist/bundle/chunk-MTGLJCAZ.js +24 -0
  49. package/dist/bundle/chunk-MZVV2JZT.js +744 -0
  50. package/dist/bundle/chunk-NE3NSB5O.js +8341 -0
  51. package/dist/bundle/chunk-NTLPDH76.js +440 -0
  52. package/dist/bundle/chunk-O3PBQVAB.js +447 -0
  53. package/dist/bundle/chunk-O5EHUB2V.js +2 -0
  54. package/dist/bundle/chunk-O5LMDQTO.js +82 -0
  55. package/dist/bundle/chunk-OPJ24VGH.js +1028 -0
  56. package/dist/bundle/chunk-OPPMGPFW.js +164 -0
  57. package/dist/bundle/chunk-QGNNMPUB.js +158 -0
  58. package/dist/bundle/chunk-QVJLOUQB.js +2 -0
  59. package/dist/bundle/chunk-S57AMKLX.js +6848 -0
  60. package/dist/bundle/chunk-TARN7CHN.js +215 -0
  61. package/dist/bundle/chunk-TJLGI3N6.js +1095 -0
  62. package/dist/bundle/chunk-VMTM46FH.js +7532 -0
  63. package/dist/bundle/chunk-W2IDKBNB.js +2315 -0
  64. package/dist/bundle/chunk-XFXBXQBS.js +630 -0
  65. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  66. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  67. package/dist/bundle/clidev.js +22 -0
  68. package/dist/bundle/command-contract-PEM3S634.js +29 -0
  69. package/dist/bundle/dist-ESHIQU4M.js +7577 -0
  70. package/dist/bundle/echarts-2QGL2JP5.js +42501 -0
  71. package/dist/bundle/embed-HHAAGHA6.js +35 -0
  72. package/dist/bundle/embedder-W2OGVVYH.js +108 -0
  73. package/dist/bundle/first-run-WCJUDUBU.js +23 -0
  74. package/dist/bundle/first-screen-U4DFUKUC.js +27 -0
  75. package/dist/bundle/instructions-OTZHT6NV.js +9 -0
  76. package/dist/bundle/mcp-OQBZXELQ.js +165 -0
  77. package/dist/bundle/mcp-VVF6J7SQ.js +151 -0
  78. package/dist/bundle/mcp-Y7VCIZ2J.js +78 -0
  79. package/dist/bundle/node-P4E63KXA.js +2340 -0
  80. package/dist/bundle/node-SYD4GX5O.js +176 -0
  81. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  82. package/dist/bundle/node-sqlite-X2DGRFOZ.js +45 -0
  83. package/dist/bundle/oauth-42M34GQ5.js +17 -0
  84. package/dist/bundle/open-SWXRCDLN.js +19 -0
  85. package/dist/bundle/process-KAFGXZ7Q.js +91 -0
  86. package/dist/bundle/program-EHR4G7VN.js +16967 -0
  87. package/dist/bundle/prompt-ZQTMHRGX.js +12 -0
  88. package/dist/bundle/recognize-TTED4SE3.js +190 -0
  89. package/dist/bundle/remote-C37XJ4BP.js +26 -0
  90. package/dist/bundle/rerank-APFZAMQL.js +49 -0
  91. package/dist/bundle/serve-DDPIHDVZ.js +19 -0
  92. package/dist/bundle/server-L5GNG7KC.js +793 -0
  93. package/dist/bundle/server-LKVYA2AE.js +39 -0
  94. package/dist/bundle/state-WWPPHERF.js +33 -0
  95. package/dist/bundle/store-H6UIA4PK.js +120 -0
  96. package/dist/bundle/store-maintenance-command-EYBT64A2.js +40 -0
  97. package/dist/commands/mcp.d.ts.map +1 -1
  98. package/dist/commands/mcp.js +45 -30
  99. package/dist/commands/mcp.js.map +1 -1
  100. package/dist/version.d.ts +1 -1
  101. package/dist/version.d.ts.map +1 -1
  102. package/dist/version.js +1 -1
  103. package/dist/version.js.map +1 -1
  104. package/docs/commands.md +38 -22
  105. package/docs/dev/TESTING.md +14 -3
  106. package/docs/dev/reference-clis.md +17 -9
  107. package/docs/dev/skills/release/SKILL.md +9 -6
  108. package/docs/dev/skills/release/fresh-audit.md +4 -0
  109. package/docs/dev/test-matrix.md +10 -11
  110. package/docs/security.md +4 -0
  111. package/docs/usage.md +7 -6
  112. package/kit/dist/new.js +17 -2
  113. package/package.json +7 -5
  114. package/scripts/audit.sh +5 -3
  115. package/scripts/smoke-bundle.ts +63 -0
  116. package/scripts/test-matrix-untested.ts +4 -10
  117. package/scripts/version-level.test.ts +17 -1
  118. package/scripts/version-level.ts +35 -7
  119. package/skills/clidev-cli/SKILL.md +8 -0
  120. package/src/commands/mcp.ts +54 -33
  121. package/src/mcp-http.test.ts +20 -13
  122. package/src/mcp.test.ts +3 -3
  123. package/src/program.test.ts +8 -2
  124. package/src/roots.test.ts +2 -7
  125. package/src/version.ts +1 -1
@@ -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-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
+ };
@@ -0,0 +1,33 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ ACCESS_SECONDS,
5
+ REFRESH_SECONDS,
6
+ httpLaunchFile,
7
+ httpLock,
8
+ httpLockFile,
9
+ httpLogFile,
10
+ mcpHttpMarker,
11
+ readHttpLaunch,
12
+ readHttpLock,
13
+ readStored,
14
+ signedInClients
15
+ } from "./chunk-222FANS2.js";
16
+ import "./chunk-6CBWO7OF.js";
17
+ import "./chunk-7RXBN7HP.js";
18
+ import "./chunk-EFHLQXG6.js";
19
+ import "./chunk-Y5E2WNWB.js";
20
+ import "./chunk-ZVVMGPBJ.js";
21
+ export {
22
+ ACCESS_SECONDS,
23
+ REFRESH_SECONDS,
24
+ httpLaunchFile,
25
+ httpLock,
26
+ httpLockFile,
27
+ httpLogFile,
28
+ mcpHttpMarker,
29
+ readHttpLaunch,
30
+ readHttpLock,
31
+ readStored,
32
+ signedInClients
33
+ };
@@ -0,0 +1,120 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ AGENDA_COLUMNS,
5
+ BACKFILL_ON_OPEN,
6
+ CHAT_COLUMNS,
7
+ CHAT_LIST_KEY,
8
+ CONVERSATION_COLUMNS,
9
+ DEFAULT_AGENT_CLOSE,
10
+ DEFAULT_FIRST_PASS_PER_CHAT,
11
+ MENTION_QUERY,
12
+ MENTION_STATUSES,
13
+ OTHER_SOURCES,
14
+ TRACKED_CHAT_COLUMNS,
15
+ accountGroupsOf,
16
+ attachmentColumns,
17
+ drainNoteIndex,
18
+ dropAllUnusedVectors,
19
+ fetchedKey,
20
+ fileFacts,
21
+ fillSearchIndex,
22
+ fillStems,
23
+ firstPassPerChatOf,
24
+ historyStartKey,
25
+ inboxKey,
26
+ involvementStoreOver,
27
+ messageOfEmail,
28
+ noteIndexState,
29
+ openSqlite,
30
+ openStore,
31
+ orphanPointers,
32
+ pendingNormalization,
33
+ queryFilter,
34
+ readStoreTables,
35
+ registerProvider,
36
+ resetAttachmentWords,
37
+ resetNoteIndex,
38
+ resetSearchIndex,
39
+ resetStems,
40
+ rowCounts,
41
+ saveStorePhoneCountries,
42
+ savedAgentClose,
43
+ savedFirstPassPerChat,
44
+ savedPhoneCountries,
45
+ savedStemmers,
46
+ savedTaskCategories,
47
+ searchIndexState,
48
+ stemmerCache,
49
+ stemmersOrigin,
50
+ stemsState,
51
+ storeClients,
52
+ storeContents,
53
+ threadConversation,
54
+ titlePart,
55
+ vectorIndexCounts
56
+ } from "./chunk-75LVQQEK.js";
57
+ import "./chunk-W2IDKBNB.js";
58
+ import "./chunk-LSEF4QC3.js";
59
+ import "./chunk-O5EHUB2V.js";
60
+ import "./chunk-2CFBHYFA.js";
61
+ import "./chunk-4QRLPOJ7.js";
62
+ import "./chunk-B4EED2RF.js";
63
+ import "./chunk-EFHLQXG6.js";
64
+ import "./chunk-Y5E2WNWB.js";
65
+ import "./chunk-S57AMKLX.js";
66
+ import "./chunk-ZVVMGPBJ.js";
67
+ export {
68
+ AGENDA_COLUMNS,
69
+ BACKFILL_ON_OPEN,
70
+ CHAT_COLUMNS,
71
+ CHAT_LIST_KEY,
72
+ CONVERSATION_COLUMNS,
73
+ DEFAULT_AGENT_CLOSE,
74
+ DEFAULT_FIRST_PASS_PER_CHAT,
75
+ MENTION_QUERY,
76
+ MENTION_STATUSES,
77
+ OTHER_SOURCES,
78
+ TRACKED_CHAT_COLUMNS,
79
+ accountGroupsOf,
80
+ attachmentColumns,
81
+ drainNoteIndex,
82
+ dropAllUnusedVectors,
83
+ fetchedKey,
84
+ fileFacts,
85
+ fillSearchIndex,
86
+ fillStems,
87
+ firstPassPerChatOf,
88
+ historyStartKey,
89
+ inboxKey,
90
+ involvementStoreOver,
91
+ messageOfEmail,
92
+ noteIndexState,
93
+ openSqlite,
94
+ openStore,
95
+ orphanPointers,
96
+ pendingNormalization,
97
+ queryFilter,
98
+ readStoreTables,
99
+ registerProvider,
100
+ resetAttachmentWords,
101
+ resetNoteIndex,
102
+ resetSearchIndex,
103
+ resetStems,
104
+ rowCounts,
105
+ saveStorePhoneCountries,
106
+ savedAgentClose,
107
+ savedFirstPassPerChat,
108
+ savedPhoneCountries,
109
+ savedStemmers,
110
+ savedTaskCategories,
111
+ searchIndexState,
112
+ stemmerCache,
113
+ stemmersOrigin,
114
+ stemsState,
115
+ storeClients,
116
+ storeContents,
117
+ threadConversation,
118
+ titlePart,
119
+ vectorIndexCounts
120
+ };
@@ -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-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
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkBnC,eAAO,MAAM,UAAU,QAAO,OAyExB,CAAA"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwFnC,eAAO,MAAM,UAAU,QAAO,OAuBzB,CAAA"}
@@ -1,59 +1,38 @@
1
1
  import { CliError } from "@wirecat/cli-base";
2
2
  import { annotate, describeProgram } from "@wirecat/cli-base/commands";
3
- import { changesAuthorityAt, environmentOf, httpTokenFile, itemOf, MCP_HTTP_DEFAULT_PORT, mcpServerCommand, outputFor, REMOTE_WRITE, refuseUnderReadOnly, renderAnswer, rootOf, } from "@wirecat/cli-core/cli";
4
- import { portOf, publicUrlOf } from "@wirecat/cli-core/mcp";
3
+ import { changesAuthorityAt, environmentOf, httpTokenFile, itemOf, LOCAL_READ, LOCAL_WRITE, MCP_HTTP_DEFAULT_PORT, mcpServerCommand, outputFor, REMOTE_WRITE, refuseUnderReadOnly, renderAnswer, rootOf, } from "@wirecat/cli-core/cli";
5
4
  import { Command } from "commander";
6
5
  import { configuration } from "../config.js";
7
6
  import { IDENTITY } from "../identity.js";
7
+ const SETUP = `claude mcp add ${IDENTITY.command} -- ${IDENTITY.command} personal mcp serve`;
8
8
  const settingsOf = (command) => {
9
9
  const flags = command.optsWithGlobals();
10
10
  const env = environmentOf(command).env ?? process.env;
11
11
  const { profile } = configuration.resolveSettings(flags, { env });
12
12
  return { flags, env, profile, tokenFile: httpTokenFile(IDENTITY, profile, env) };
13
13
  };
14
- export const mcpCommand = () => annotate(new Command("mcp"), {
14
+ const serveCommand = () => annotate(new Command("serve"), {
15
15
  effects: REMOTE_WRITE,
16
16
  lifetime: "persistent",
17
17
  mcp: false,
18
- examples: [`${IDENTITY.command} personal mcp`],
18
+ examples: [
19
+ `${IDENTITY.command} personal mcp serve`,
20
+ `${IDENTITY.command} personal mcp serve --http --public-url https://laptop.example.ts.net`,
21
+ ],
19
22
  })
20
23
  .summary("serve this profile's commands to an AI agent")
21
- .description(`serve this profile's commands to an agent over MCP, on stdin and stdout, writes included; the profile's permissions decide — \`claude mcp add ${IDENTITY.command} -- ${IDENTITY.command} personal mcp\``)
24
+ .description(`serve this profile's commands to an agent over MCP, on stdin and stdout, writes included; the profile's permissions decide — \`${SETUP}\``)
22
25
  .option("--http", "serve over HTTP on 127.0.0.1 for ChatGPT and Claude in the browser, behind your tunnel; the profile's permissions decide")
23
26
  .option("--port <port>", `the local port for --http (default ${MCP_HTTP_DEFAULT_PORT})`)
24
27
  .option("--public-url <url>", "the tunnel's https address the browser apps use, e.g. https://<name>.ts.net")
25
- .option("--revoke", "forget every login given to a browser app; each must log in again")
26
- .addCommand(mcpServerCommand({
27
- example: `${IDENTITY.command} personal`,
28
- target: (self) => {
29
- const { env, profile, tokenFile } = settingsOf(self);
30
- return {
31
- invocation: `${IDENTITY.command} ${profile}`,
32
- profile,
33
- envPrefix: IDENTITY.envPrefix,
34
- env,
35
- tokenFile,
36
- argv: [profile, "mcp", "--http"],
37
- version: IDENTITY.version,
38
- };
39
- },
40
- answer: (self, item, lines) => renderAnswer(self, outputFor(self), itemOf(item), () => lines.join("\n")),
41
- }))
42
28
  .action(async function () {
43
29
  const { flags, env, profile, tokenFile } = settingsOf(this);
44
- if (flags.revoke) {
45
- refuseUnderReadOnly(this, "mcp --revoke");
46
- const { revokeAll } = await import("@wirecat/cli-core/mcp");
47
- revokeAll(tokenFile);
48
- renderAnswer(this, outputFor(this), itemOf({ revoked: true, profile }));
49
- return;
50
- }
51
30
  if (!flags.http && (flags.json || flags.jsonl))
52
31
  throw new CliError("validation_error", "MCP over stdio controls its own output; leave out --json and --jsonl");
53
32
  const environment = environmentOf(this);
54
33
  const run = environment.runCommand;
55
34
  if (!run)
56
- throw new Error("mcp runs inside the program's run(), which provides runCommand");
35
+ throw new Error("mcp serve runs inside the program's run(), which provides runCommand");
57
36
  const program = rootOf(this);
58
37
  const options = {
59
38
  profile,
@@ -67,6 +46,7 @@ export const mcpCommand = () => annotate(new Command("mcp"), {
67
46
  const { serveMcp, serveMcpOverHttp } = await import("../mcp.js");
68
47
  if (!flags.http)
69
48
  return serveMcp(options);
49
+ const { portOf, publicUrlOf } = await import("@wirecat/cli-core/mcp");
70
50
  const { renderer } = outputFor(this);
71
51
  await serveMcpOverHttp(options, {
72
52
  publicUrl: publicUrlOf(flags.publicUrl, {
@@ -79,4 +59,39 @@ export const mcpCommand = () => annotate(new Command("mcp"), {
79
59
  note: (line) => renderer.note(line),
80
60
  });
81
61
  });
62
+ const revokeCommand = () => annotate(new Command("revoke"), {
63
+ effects: LOCAL_WRITE,
64
+ mcp: false,
65
+ examples: [`${IDENTITY.command} personal mcp revoke`],
66
+ })
67
+ .summary("forget every login given to a browser app")
68
+ .description("forget every login `mcp serve --http` gave a browser app; each must log in again")
69
+ .action(async function () {
70
+ refuseUnderReadOnly(this, "mcp revoke");
71
+ const { profile, tokenFile } = settingsOf(this);
72
+ const { revokeAll } = await import("@wirecat/cli-core/mcp");
73
+ revokeAll(tokenFile);
74
+ renderAnswer(this, outputFor(this), itemOf({ revoked: true, profile }));
75
+ });
76
+ export const mcpCommand = () => annotate(new Command("mcp"), { effects: LOCAL_READ, mcp: false })
77
+ .summary("serve this profile's commands to an AI agent")
78
+ .description(`serve this profile's commands to an agent over MCP — \`${SETUP}\``)
79
+ .addCommand(serveCommand())
80
+ .addCommand(revokeCommand())
81
+ .addCommand(mcpServerCommand({
82
+ example: `${IDENTITY.command} personal`,
83
+ target: (self) => {
84
+ const { env, profile, tokenFile } = settingsOf(self);
85
+ return {
86
+ invocation: `${IDENTITY.command} ${profile}`,
87
+ profile,
88
+ envPrefix: IDENTITY.envPrefix,
89
+ env,
90
+ tokenFile,
91
+ argv: [profile, "mcp", "serve", "--http"],
92
+ version: IDENTITY.version,
93
+ };
94
+ },
95
+ answer: (self, item, lines) => renderAnswer(self, outputFor(self), itemOf(item), () => lines.join("\n")),
96
+ }));
82
97
  //# sourceMappingURL=mcp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,kBAAkB,EAClB,aAAa,EAEb,aAAa,EACb,MAAM,EACN,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,MAAM,GACP,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC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EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACzG,CAAC,CACH,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.8.0";
1
+ export declare const VERSION = "0.10.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAA"}
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.8.0";
1
+ export const VERSION = "0.10.0";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA"}
package/docs/commands.md CHANGED
@@ -29,8 +29,8 @@ lists the profiles on this computer.
29
29
  | `--full` | found items with their whole text and every provider field. |
30
30
  | `--dry-run` | preview parsed arguments and permissions before running the action. |
31
31
  | `--yes` | go ahead without the question an ask level puts before a write. |
32
- | `--record` | keep this run, with the command as typed and secrets hidden; record_input false leaves the typed words out. |
33
- | `--no-record` | do not keep it, whatever the configuration says. |
32
+ | `--record` | keep this run even where the config says record false; record_input false leaves the typed words out. |
33
+ | `--no-record` | do not keep this run, even if it fails. |
34
34
 
35
35
  ## `clidev commands`
36
36
 
@@ -70,23 +70,19 @@ the instructions an agent is given for this tool
70
70
 
71
71
  ### `clidev skill show`
72
72
 
73
- print SKILL.md — `clidev skill install` puts it where Claude Code, Codex and Gemini CLI look for it; --for prints the copy already there
73
+ print SKILL.md — `clidev skill install` puts it where Claude Code, Codex, Gemini CLI and OpenClaw look for it, and where Hermes does on request; --for prints the copy already there
74
74
 
75
75
  ```sh
76
- clidev skill show [name] [options]
76
+ clidev skill show [options]
77
77
  ```
78
78
 
79
- | Argument | | What it is |
80
- |---|---|---|
81
- | `name` | optional | one of the skills shipped for a task: follow-ups, link-conversations. |
82
-
83
79
  | Option | What it does |
84
80
  |---|---|
85
81
  | `--for <agents>` | print the copy installed for these agents instead of this version's. One of: `claude`, `agents`. |
86
82
 
87
83
  **Returns:** print the tool's instructions for AI agents
88
84
 
89
- **Example:** `clidev skill show`, `clidev skill show follow-ups`
85
+ **Example:** `clidev skill show`
90
86
 
91
87
  ### `clidev skill install`
92
88
 
@@ -120,12 +116,16 @@ clidev skill status
120
116
 
121
117
  ## `clidev mcp`
122
118
 
123
- serve this profile's commands to an agent over MCP, on stdin and stdout, writes included; the profile's permissions decide — `claude mcp add clidev -- clidev personal mcp`
119
+ serve this profile's commands to an agent over MCP — `claude mcp add clidev -- clidev personal mcp serve`
120
+
121
+ ### `clidev mcp serve`
122
+
123
+ serve this profile's commands to an agent over MCP, on stdin and stdout, writes included; the profile's permissions decide — `claude mcp add clidev -- clidev personal mcp serve`
124
124
 
125
125
  **Changes something in the service.**
126
126
 
127
127
  ```sh
128
- clidev mcp [options]
128
+ clidev mcp serve [options]
129
129
  ```
130
130
 
131
131
  | Option | What it does |
@@ -133,15 +133,32 @@ clidev mcp [options]
133
133
  | `--http` | serve over HTTP on 127.0.0.1 for ChatGPT and Claude in the browser, behind your tunnel; the profile's permissions decide. |
134
134
  | `--port <port>` | the local port for --http (default 8765). |
135
135
  | `--public-url <url>` | the tunnel's https address the browser apps use, e.g. https://<name>.ts.net. |
136
- | `--revoke` | forget every login given to a browser app; each must log in again. |
136
+
137
+ **Returns:** serve this profile's commands to an AI agent
138
+
139
+ **Example:** `clidev personal mcp serve`, `clidev personal mcp serve --http --public-url https://laptop.example.ts.net`
140
+
141
+ ### `clidev mcp revoke`
142
+
143
+ forget every login `mcp serve --http` gave a browser app; each must log in again
144
+
145
+ **Changes something on this computer only.**
146
+
147
+ ```sh
148
+ clidev mcp revoke
149
+ ```
150
+
151
+ **Returns:** forget every login given to a browser app
152
+
153
+ **Example:** `clidev personal mcp revoke`
137
154
 
138
155
  ### `clidev mcp server`
139
156
 
140
- start, stop and check `mcp --http` in the background; status shows the login code for a browser app
157
+ start, stop and check `mcp serve --http` in the background; status shows the login code for a browser app
141
158
 
142
159
  #### `clidev mcp server start`
143
160
 
144
- start `mcp --http` apart from this shell and answer once it listens, with its login code
161
+ start `mcp serve --http` apart from this shell and answer once it listens, with its login code
145
162
 
146
163
  **Changes something on this computer only.**
147
164
 
@@ -152,8 +169,7 @@ clidev mcp server start [options]
152
169
  | Option | What it does |
153
170
  |---|---|
154
171
  | `--port <port>` | the local port (default 8765). |
155
- | `--public-url <url>` | the tunnel's https address the browser apps use, e.g. https://<name>.ts.net. |
156
- | `--permission <key=level>` | make a permission stricter for this server only; repeat for more keys. |
172
+ | `--public-url <url>` | the tunnel's https address the browser apps use, e.g. https://<name>.ts.net or https://<name>.ts.net/tg. |
157
173
 
158
174
  **Returns:** start the HTTP MCP server in the background
159
175
 
@@ -161,7 +177,7 @@ clidev mcp server start [options]
161
177
 
162
178
  #### `clidev mcp server stop`
163
179
 
164
- stop `mcp --http` — only one that `mcp server start` started
180
+ stop `mcp serve --http` — only one that `mcp server start` started
165
181
 
166
182
  **Changes something on this computer only.**
167
183
 
@@ -175,7 +191,7 @@ clidev mcp server stop
175
191
 
176
192
  #### `clidev mcp server status`
177
193
 
178
- whether `mcp --http` runs, on which port and address, the login code for a new browser app, and the apps logged in
194
+ whether `mcp serve --http` runs, on which port and address, the login code for a new browser app, and the apps logged in
179
195
 
180
196
  ```sh
181
197
  clidev mcp server status
@@ -235,7 +251,7 @@ clidev config set <setting> <value> [options]
235
251
 
236
252
  | Argument | | What it is |
237
253
  |---|---|---|
238
- | `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, permissions, sends_per_hour, requests_per_minute, transcribe_with, speech_model, search_catch_up, picture_search, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, read_other_bots, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, phone_countries, task_categories.<name>, task_agent_close, task_agent_close_min, task_first_pass_per_chat, account_groups.<name>. |
254
+ | `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, speech_model, picture_search, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin. |
239
255
  | `value` | required | a number, true or false; for a group tg:work,max:Alice,email:me@x. |
240
256
 
241
257
  | Option | What it does |
@@ -260,7 +276,7 @@ clidev config unset <setting> [options]
260
276
 
261
277
  | Argument | | What it is |
262
278
  |---|---|---|
263
- | `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, permissions, sends_per_hour, requests_per_minute, transcribe_with, speech_model, search_catch_up, picture_search, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, read_other_bots, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, phone_countries, task_categories.<name>, task_agent_close, task_agent_close_min, task_first_pass_per_chat, account_groups.<name>. |
279
+ | `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, speech_model, picture_search, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin. |
264
280
 
265
281
  | Option | What it does |
266
282
  |---|---|
@@ -293,7 +309,7 @@ clidev runs list [query] [options]
293
309
  | `--limit <n>` | how many to show. Default: `20`. |
294
310
  | `--page <n>` | which page, starting at 1. Default: `1`. |
295
311
 
296
- **Returns:** run — run_id, command, started_at, status, cli_version, profile, completed_at, requests, and 20 more; every field: clidev commands info runs list
312
+ **Returns:** run — run_id, command, started_at, status, cli_version, profile, completed_at, requests, and 23 more; every field: clidev commands info runs list
297
313
 
298
314
  **Example:** `clidev personal runs list --limit 10`
299
315
 
@@ -313,7 +329,7 @@ clidev runs show <run-id> [options]
313
329
  |---|---|
314
330
  | `--problems` | only failed responses, warnings and crashes. |
315
331
 
316
- **Returns:** run details — run_id, command, started_at, status, cli_version, directory, event_count, events, and 19 more; every field: clidev commands info runs show
332
+ **Returns:** run details — run_id, command, started_at, status, cli_version, directory, event_count, events, and 22 more; every field: clidev commands info runs show
317
333
 
318
334
  **Example:** `clidev personal runs show run-101`
319
335
 
@@ -12,8 +12,19 @@ How the tests run, and what they never touch. The rules are the handbook's
12
12
  `scripts/test-matrix-untested.ts`.
13
13
  - `pnpm contracts:check` runs the built CLI against `contracts/plan.json`: help, discovery, errors and the MCP tool
14
14
  list. `pnpm exec cli-contract contracts/plan.json --update` rewrites the snapshots; review the diff.
15
- - `pnpm contracts:upgrade` does not exist yet: the skeleton keeps no local state of its own (its config file and run
16
- records are cli-core's), and `.github/workflows/ci.yml` skips the step. Add it, and remove the skip, as soon as the
17
- CLI writes state of its own: a store, a sync cursor or any other file.
15
+ - `pnpm contracts:upgrade` does not exist yet, and `.github/workflows/ci.yml` skips the step. It needs both local
16
+ state of the CLI's own (a store, a sync cursor, any other file its code writes and reads back) and a published
17
+ version to upgrade from; the skeleton has neither, and the config file and run records are cli-core's
18
+ ([WC-TEST-14](../../node_modules/@wirecat/cli-base/docs/standards/testing.md)). Once the CLI keeps such state and its
19
+ first version is on npm, add the script, as
20
+ [drive-cli does](https://github.com/WireCatLabs/drive-cli/blob/150b105569a98fbd0d4b66349305ad84128adfda/package.json#L37), and remove the skip.
18
21
  - `pnpm smoke` installs the packed package into a temporary folder and runs it offline.
19
22
  - `pnpm audit:commands` audits the command tree beside the latest published WireCat CLIs.
23
+
24
+ ## The bundle a user installs
25
+
26
+ `pnpm build` compiles `src/` with `tsc`, then cli-base's `cli-dev bundle`
27
+ ([WC-LAY-10](https://github.com/WireCatLabs/cli-base/blob/main/docs/standards/layout.md))
28
+ bundles `dist/bin/clidev.js` into `dist/bundle/` and makes the bin a loader. The vitest suite runs
29
+ against `src/`, so `scripts/smoke-bundle.ts` is the proof the bundle works: `pnpm smoke:node` runs it
30
+ under Node and `pnpm smoke:bun` under Bun, both in CI.
@@ -7,18 +7,26 @@ the first question of the [design interview](skills/design-interview/SKILL.md):
7
7
  | --- | --- |
8
8
  | messenger | [whatsapp-cli](https://github.com/WireCatLabs/whatsapp-cli), then [tg-cli](https://github.com/WireCatLabs/tg-cli) and [max-cli](https://github.com/WireCatLabs/max-cli) |
9
9
  | files and documents | [drive-cli](https://github.com/WireCatLabs/drive-cli) |
10
+ | calendar | [gcal-cli](https://github.com/WireCatLabs/gcal-cli) |
10
11
  | meetings | [zoom-cli](https://github.com/WireCatLabs/zoom-cli) |
11
12
  | notes | [cli-memo](https://github.com/WireCatLabs/cli-memo) |
12
- | mail, calendar, other | none of its own yet: pick the nearest one with the owner. cli-memo [imports mail](https://github.com/WireCatLabs/cli-memo/blob/c2d21254ab360aed7149a3250d17e879283aa603/docs/mail.md) |
13
+ | mail, other | none of its own yet: pick the nearest one with the owner. cli-memo [imports mail](https://github.com/WireCatLabs/cli-memo/blob/c2d21254ab360aed7149a3250d17e879283aa603/docs/mail.md) |
13
14
 
14
15
  A messenger CLI sets `messenger: true` in `src/identity.ts`, and `new --category messenger` writes it. Every other
15
16
  category keeps the template's `messenger: false`, so the shared help and `commands` do not speak of chats, messages
16
- and senders. `config` still lists cli-core's messenger settings, such as `sends_per_hour` and `read_other_bots`.
17
+ and senders, and `config` lists none of cli-core's messenger settings.
17
18
 
18
- cli-core keeps a provider registry (WC-ARCH-21). A CLI whose provider is not built into cli-core calls
19
- `registerProvider(store, { name, kind, aliases, command })` from `@wirecat/cli-core/store` on every run that opens
20
- the shared store. `kind` is one of `messages`, `mail`, `notes`, `documents`, `meetings` or `events`. Until the CLI
21
- has run once on a computer, `search` there leaves its accounts out and lists them under `skipped`. The reference CLIs
22
- do not show this call: cli-core already knows their providers, from its [seed list](https://github.com/WireCatLabs/cli-core/blob/6d8f415a6ba3124679741f57d3c22ee0f236e8bf/src/domain/providers.ts#L17-L29) and, for Drive, its
23
- [document providers](https://github.com/WireCatLabs/cli-core/blob/6d8f415a6ba3124679741f57d3c22ee0f236e8bf/src/domain/providers.ts#L50) (cli-core 0.439.0). `grep -rl registerProvider` over a clone of each of the six finds no call. The skeleton opens no store and has no provider, so it registers nothing; the call comes with
24
- the CLI's first store code.
19
+ cli-core keeps a provider registry (WC-ARCH-21). A CLI whose provider is not built into cli-core writes its entry on
20
+ every run that opens the shared store: `await store.accounts.registerProvider({ name, kind, aliases, command })`, on the
21
+ store that `openStore` from `@wirecat/cli-core/store` returns
22
+ ([`AccountsStore`](https://github.com/WireCatLabs/cli-core/blob/185718d3212cda9bb026e09809760979fe31a1e6/src/store/accounts.ts#L40-L41),
23
+ cli-core 0.459.0). `@wirecat/cli-core/store` does not export a `registerProvider` function. `kind` is one of
24
+ `messages`, `mail`, `notes`, `documents`, `meetings` or `events`. Until the CLI has run once on a computer, `search`
25
+ there leaves its accounts out and lists them under `skipped`. Of the reference CLIs, only gcal-cli makes this call: cli-core
26
+ already knows the others' providers, from its
27
+ [seed list](https://github.com/WireCatLabs/cli-core/blob/185718d3212cda9bb026e09809760979fe31a1e6/src/domain/providers.ts#L17-L29)
28
+ and, for Drive, its
29
+ [document providers](https://github.com/WireCatLabs/cli-core/blob/185718d3212cda9bb026e09809760979fe31a1e6/src/domain/providers.ts#L50).
30
+ [gcal-cli](https://github.com/WireCatLabs/gcal-cli/blob/14e27c45e6dc204cde8adcd9e4fa6aa069745335/src/store.ts) registers
31
+ its own. The skeleton opens no store and
32
+ has no provider, so it registers nothing; the call comes with the CLI's first store code.