@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.
- package/.github/workflows/ci.yml +3 -3
- package/.github/workflows/release.yml +63 -0
- package/.gitleaks.toml +18 -0
- package/AGENTS.md +9 -15
- package/CHANGELOG.md +87 -1
- package/README.md +4 -3
- package/bin/release +5 -3
- package/contracts/plan.json +2 -2
- package/dist/bin/clidev.js +34 -12
- package/dist/bundle/all-profiles-XHC7BG3P.js +24 -0
- package/dist/bundle/anthropic-N6B3ZZHQ.js +70 -0
- package/dist/bundle/bun-HUJLS7KP.js +169 -0
- package/dist/bundle/bun-sqlite-OWFO2TVR.js +69 -0
- package/dist/bundle/chunk-222FANS2.js +161 -0
- package/dist/bundle/chunk-2CFBHYFA.js +884 -0
- package/dist/bundle/chunk-2KQZ24GI.js +82 -0
- package/dist/bundle/chunk-2TBVT4SZ.js +31 -0
- package/dist/bundle/chunk-437W3Z2M.js +76 -0
- package/dist/bundle/chunk-4QRLPOJ7.js +18 -0
- package/dist/bundle/chunk-54AJONOM.js +54 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-6CBWO7OF.js +73 -0
- package/dist/bundle/chunk-75LVQQEK.js +35782 -0
- package/dist/bundle/chunk-7RB76E2L.js +264 -0
- package/dist/bundle/chunk-7RXBN7HP.js +63 -0
- package/dist/bundle/chunk-ABP7FDMJ.js +122 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-AP7QKYBG.js +3531 -0
- package/dist/bundle/chunk-ASMH7JWZ.js +288 -0
- package/dist/bundle/chunk-B4EED2RF.js +100 -0
- package/dist/bundle/chunk-B4LM2B6F.js +1900 -0
- package/dist/bundle/chunk-BDSDQCV4.js +281 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DMCN22H6.js +35 -0
- package/dist/bundle/chunk-E42W72PQ.js +151 -0
- package/dist/bundle/chunk-EFHLQXG6.js +5104 -0
- package/dist/bundle/chunk-FIHDGZIB.js +34352 -0
- package/dist/bundle/chunk-FWVKHD2L.js +48 -0
- package/dist/bundle/chunk-FXS3X76A.js +193 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-IJ3IA7EK.js +24 -0
- package/dist/bundle/chunk-JEBSORH7.js +3379 -0
- package/dist/bundle/chunk-JTTW5ZKF.js +45 -0
- package/dist/bundle/chunk-LSEF4QC3.js +3075 -0
- package/dist/bundle/chunk-LY7GS2YI.js +58 -0
- package/dist/bundle/chunk-MFS52LTZ.js +570 -0
- package/dist/bundle/chunk-MNSD5BX2.js +78 -0
- package/dist/bundle/chunk-MTGLJCAZ.js +24 -0
- package/dist/bundle/chunk-MZVV2JZT.js +744 -0
- package/dist/bundle/chunk-NE3NSB5O.js +8341 -0
- package/dist/bundle/chunk-NTLPDH76.js +440 -0
- package/dist/bundle/chunk-O3PBQVAB.js +447 -0
- package/dist/bundle/chunk-O5EHUB2V.js +2 -0
- package/dist/bundle/chunk-O5LMDQTO.js +82 -0
- package/dist/bundle/chunk-OPJ24VGH.js +1028 -0
- package/dist/bundle/chunk-OPPMGPFW.js +164 -0
- package/dist/bundle/chunk-QGNNMPUB.js +158 -0
- package/dist/bundle/chunk-QVJLOUQB.js +2 -0
- package/dist/bundle/chunk-S57AMKLX.js +6848 -0
- package/dist/bundle/chunk-TARN7CHN.js +215 -0
- package/dist/bundle/chunk-TJLGI3N6.js +1095 -0
- package/dist/bundle/chunk-VMTM46FH.js +7532 -0
- package/dist/bundle/chunk-W2IDKBNB.js +2315 -0
- package/dist/bundle/chunk-XFXBXQBS.js +630 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/clidev.js +22 -0
- package/dist/bundle/command-contract-PEM3S634.js +29 -0
- package/dist/bundle/dist-ESHIQU4M.js +7577 -0
- package/dist/bundle/echarts-2QGL2JP5.js +42501 -0
- package/dist/bundle/embed-HHAAGHA6.js +35 -0
- package/dist/bundle/embedder-W2OGVVYH.js +108 -0
- package/dist/bundle/first-run-WCJUDUBU.js +23 -0
- package/dist/bundle/first-screen-U4DFUKUC.js +27 -0
- package/dist/bundle/instructions-OTZHT6NV.js +9 -0
- package/dist/bundle/mcp-OQBZXELQ.js +165 -0
- package/dist/bundle/mcp-VVF6J7SQ.js +151 -0
- package/dist/bundle/mcp-Y7VCIZ2J.js +78 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-SYD4GX5O.js +176 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-X2DGRFOZ.js +45 -0
- package/dist/bundle/oauth-42M34GQ5.js +17 -0
- package/dist/bundle/open-SWXRCDLN.js +19 -0
- package/dist/bundle/process-KAFGXZ7Q.js +91 -0
- package/dist/bundle/program-EHR4G7VN.js +16967 -0
- package/dist/bundle/prompt-ZQTMHRGX.js +12 -0
- package/dist/bundle/recognize-TTED4SE3.js +190 -0
- package/dist/bundle/remote-C37XJ4BP.js +26 -0
- package/dist/bundle/rerank-APFZAMQL.js +49 -0
- package/dist/bundle/serve-DDPIHDVZ.js +19 -0
- package/dist/bundle/server-L5GNG7KC.js +793 -0
- package/dist/bundle/server-LKVYA2AE.js +39 -0
- package/dist/bundle/state-WWPPHERF.js +33 -0
- package/dist/bundle/store-H6UIA4PK.js +120 -0
- package/dist/bundle/store-maintenance-command-EYBT64A2.js +40 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +45 -30
- package/dist/commands/mcp.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/commands.md +38 -22
- package/docs/dev/TESTING.md +14 -3
- package/docs/dev/reference-clis.md +17 -9
- package/docs/dev/skills/release/SKILL.md +9 -6
- package/docs/dev/skills/release/fresh-audit.md +4 -0
- package/docs/dev/test-matrix.md +10 -11
- package/docs/security.md +4 -0
- package/docs/usage.md +7 -6
- package/kit/dist/new.js +17 -2
- package/package.json +7 -5
- package/scripts/audit.sh +5 -3
- package/scripts/smoke-bundle.ts +63 -0
- package/scripts/test-matrix-untested.ts +4 -10
- package/scripts/version-level.test.ts +17 -1
- package/scripts/version-level.ts +35 -7
- package/skills/clidev-cli/SKILL.md +8 -0
- package/src/commands/mcp.ts +54 -33
- package/src/mcp-http.test.ts +20 -13
- package/src/mcp.test.ts +3 -3
- package/src/program.test.ts +8 -2
- package/src/roots.test.ts +2 -7
- 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":"
|
|
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"}
|
package/dist/commands/mcp.js
CHANGED
|
@@ -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
|
-
|
|
14
|
+
const serveCommand = () => annotate(new Command("serve"), {
|
|
15
15
|
effects: REMOTE_WRITE,
|
|
16
16
|
lifetime: "persistent",
|
|
17
17
|
mcp: false,
|
|
18
|
-
examples: [
|
|
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 —
|
|
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
|
package/dist/commands/mcp.js.map
CHANGED
|
@@ -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,
|
|
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,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,MAAM,GACP,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAA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AE,CAAC;KAC9D,OAAO,CAAC,8CAA8C,CAAC;KACvD,WAAW,CAAC,0DAA0D,KAAK,IAAI,CAAC;KAChF,UAAU,CAAC,YAAY,EAAE,CAAC;KAC1B,UAAU,CAAC,aAAa,EAAE,CAAC;KAC3B,UAAU,CACT,gBAAgB,CAAC;IACf,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,WAAW;IACvC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;QACpD,OAAO;YACL,UAAU,EAAE,GAAG,QAAQ,CAAC,OAAO,IAAI,OAAO,EAAE;YAC5C,OAAO;YACP,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,GAAG;YACH,SAAS;YACT,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;YACzC,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAA;IACH,CAAC;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,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.
|
|
1
|
+
export declare const VERSION = "0.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
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.
|
|
1
|
+
export const VERSION = "0.10.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
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
|
|
33
|
-
| `--no-record` | do not keep
|
|
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
|
|
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 [
|
|
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
|
|
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
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
package/docs/dev/TESTING.md
CHANGED
|
@@ -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
|
|
16
|
-
|
|
17
|
-
|
|
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,
|
|
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
|
|
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
|
|
19
|
-
`registerProvider(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
the
|
|
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.
|