@wirecat/cli-template 0.10.0 → 0.12.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 +17 -0
- package/.github/workflows/release.yml +62 -0
- package/CHANGELOG.md +46 -0
- package/CLAUDE.md +1 -3
- package/contracts/help.snap +2 -0
- package/dist/bin/clidev.js +2 -2
- package/dist/bundle/{all-profiles-XHC7BG3P.js → all-profiles-MJ6XSFOO.js} +4 -4
- package/dist/bundle/{anthropic-N6B3ZZHQ.js → anthropic-W5UKBZUB.js} +3 -3
- package/dist/bundle/app-server-EZ46JAHB.js +217 -0
- package/dist/bundle/{bun-HUJLS7KP.js → bun-HB6O2TTT.js} +2 -2
- package/dist/bundle/{bun-sqlite-OWFO2TVR.js → bun-sqlite-KBXOW2ES.js} +2 -2
- package/dist/bundle/{chunk-B4EED2RF.js → chunk-2B5U4Z5H.js} +5 -5
- package/dist/bundle/{chunk-ABP7FDMJ.js → chunk-35KYY65W.js} +2 -2
- package/dist/bundle/{chunk-MZVV2JZT.js → chunk-4LURWBVV.js} +17 -9
- package/dist/bundle/{chunk-QGNNMPUB.js → chunk-7IXL4UFK.js} +7 -7
- package/dist/bundle/{chunk-NE3NSB5O.js → chunk-AK257OMS.js} +55 -43
- package/dist/bundle/{chunk-IJ3IA7EK.js → chunk-CXQXVKUY.js} +1 -1
- package/dist/bundle/{chunk-7RB76E2L.js → chunk-EGRB55FF.js} +4 -4
- package/dist/bundle/{chunk-DMCN22H6.js → chunk-ERGB4NJA.js} +20 -2
- package/dist/bundle/{chunk-TJLGI3N6.js → chunk-ERKR3VJ5.js} +79 -28
- package/dist/bundle/{chunk-2CFBHYFA.js → chunk-FDBINRWA.js} +4 -4
- package/dist/bundle/{chunk-FIHDGZIB.js → chunk-FZZIU4B7.js} +2416 -2254
- package/dist/bundle/{chunk-BDSDQCV4.js → chunk-HDY5X3WQ.js} +4 -4
- package/dist/bundle/{chunk-XFXBXQBS.js → chunk-IBBN7Z3A.js} +2 -2
- package/dist/bundle/{chunk-4QRLPOJ7.js → chunk-IDWW4TU2.js} +1 -1
- package/dist/bundle/{chunk-OPPMGPFW.js → chunk-IGHEW777.js} +4 -4
- package/dist/bundle/{chunk-437W3Z2M.js → chunk-IN3FVRPK.js} +1 -1
- package/dist/bundle/{chunk-FWVKHD2L.js → chunk-JAOGZMKQ.js} +1 -1
- package/dist/bundle/{chunk-O3PBQVAB.js → chunk-JHO2LL2J.js} +18 -6
- package/dist/bundle/{chunk-MNSD5BX2.js → chunk-JRK73FOW.js} +1 -1
- package/dist/bundle/{chunk-O5LMDQTO.js → chunk-KJTNT4SW.js} +1 -1
- package/dist/bundle/{chunk-B4LM2B6F.js → chunk-L5WWMP5M.js} +24 -20
- package/dist/bundle/{chunk-NTLPDH76.js → chunk-MJRSEUKG.js} +9 -7
- package/dist/bundle/{chunk-AP7QKYBG.js → chunk-MUSYGFCY.js} +165 -140
- package/dist/bundle/{server-L5GNG7KC.js → chunk-N2Z3MCOF.js} +31 -45
- package/dist/bundle/{chunk-JTTW5ZKF.js → chunk-NOVLCHDV.js} +1 -1
- package/dist/bundle/{chunk-54AJONOM.js → chunk-O3UXNU3S.js} +2 -2
- package/dist/bundle/{chunk-75LVQQEK.js → chunk-OV6PHTAY.js} +2034 -1590
- package/dist/bundle/{chunk-W2IDKBNB.js → chunk-PBN4RBHS.js} +7 -7
- package/dist/bundle/{chunk-2TBVT4SZ.js → chunk-PDGXMKJS.js} +1 -1
- package/dist/bundle/{recognize-TTED4SE3.js → chunk-PJOVK7PG.js} +6 -5
- package/dist/bundle/{chunk-LY7GS2YI.js → chunk-QBP7OMN5.js} +1 -1
- package/dist/bundle/{chunk-VMTM46FH.js → chunk-QJ6XW4DM.js} +75 -51
- package/dist/bundle/{chunk-OPJ24VGH.js → chunk-QKWRL4OD.js} +5 -5
- package/dist/bundle/{chunk-MTGLJCAZ.js → chunk-QQUFZLFP.js} +1 -1
- package/dist/bundle/{chunk-6CBWO7OF.js → chunk-RUKDZEID.js} +2 -2
- package/dist/bundle/{chunk-TARN7CHN.js → chunk-SVDF6NJF.js} +10 -10
- package/dist/bundle/{chunk-FXS3X76A.js → chunk-TAYOKLGF.js} +4 -4
- package/dist/bundle/{chunk-ASMH7JWZ.js → chunk-TGB5F7NC.js} +2 -2
- package/dist/bundle/{chunk-222FANS2.js → chunk-V3ZTQ24B.js} +4 -4
- package/dist/bundle/{chunk-LSEF4QC3.js → chunk-VLNKTMV7.js} +75 -47
- package/dist/bundle/{chunk-7RXBN7HP.js → chunk-VYSUKHKL.js} +1 -1
- package/dist/bundle/{chunk-JEBSORH7.js → chunk-YJNUDHJD.js} +25 -14
- package/dist/bundle/{chunk-S57AMKLX.js → chunk-Z7MSIRSQ.js} +1 -1
- package/dist/bundle/{chunk-2KQZ24GI.js → chunk-ZLY6GUAS.js} +2 -2
- package/dist/bundle/clidev.js +2 -2
- package/dist/bundle/{command-contract-PEM3S634.js → command-contract-75VJ36U4.js} +10 -10
- package/dist/bundle/decode-AMXUVKNY.js +158 -0
- package/dist/bundle/{echarts-2QGL2JP5.js → echarts-GJDMQ2AQ.js} +2 -2
- package/dist/bundle/{embed-HHAAGHA6.js → embed-L4CRZ2XQ.js} +3 -3
- package/dist/bundle/{embedder-W2OGVVYH.js → embedder-IBGV4M2K.js} +6 -6
- package/dist/bundle/{first-run-WCJUDUBU.js → first-run-VTKC2IBV.js} +5 -5
- package/dist/bundle/{first-screen-U4DFUKUC.js → first-screen-X5IJKBSU.js} +11 -11
- package/dist/bundle/{instructions-OTZHT6NV.js → instructions-YJECS4KN.js} +3 -1
- package/dist/bundle/mcp-RDZGYPSY.js +78 -0
- package/dist/bundle/{mcp-VVF6J7SQ.js → mcp-TEMCENVV.js} +33 -33
- package/dist/bundle/{node-SYD4GX5O.js → node-NQG4EVZR.js} +2 -2
- package/dist/bundle/node-sqlite-BR7F3BLB.js +61 -0
- package/dist/bundle/{oauth-42M34GQ5.js → oauth-J7UAWNIK.js} +4 -4
- package/dist/bundle/{open-SWXRCDLN.js → open-BR47R5UE.js} +1 -1
- package/dist/bundle/{process-KAFGXZ7Q.js → process-66I7RDPJ.js} +1 -1
- package/dist/bundle/{program-EHR4G7VN.js → program-RNGI562F.js} +913 -601
- package/dist/bundle/{prompt-ZQTMHRGX.js → prompt-NE5JJ7UP.js} +2 -2
- package/dist/bundle/recognize-GC3YFVIA.js +21 -0
- package/dist/bundle/{remote-C37XJ4BP.js → remote-QELOMKQM.js} +4 -4
- package/dist/bundle/{rerank-APFZAMQL.js → rerank-BH6TZ2SP.js} +4 -4
- package/dist/bundle/{serve-DDPIHDVZ.js → serve-WWLRNDT2.js} +6 -6
- package/dist/bundle/server-DE6NLNUF.js +52 -0
- package/dist/bundle/server-ZPSQKOAH.js +39 -0
- package/dist/bundle/{state-WWPPHERF.js → state-2BEGXAMO.js} +3 -3
- package/dist/bundle/{store-H6UIA4PK.js → store-AH6WZMCF.js} +7 -7
- package/dist/bundle/store-maintenance-command-PBXX3IEV.js +40 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/configuration.md +3 -1
- package/docs/dev/TESTING.md +2 -0
- package/docs/dev/skills/release/SKILL.md +9 -5
- package/docs/dev/test-matrix.md +1 -1
- package/kit/dist/new.js +3 -0
- package/package.json +4 -2
- package/scripts/audit.sh +11 -1
- package/scripts/smoke-bundle.ts +2 -1
- package/scripts/smoke.ts +18 -0
- package/scripts/test-matrix-untested.ts +1 -1
- package/server.json +38 -0
- package/src/version.ts +1 -1
- package/template.json +1 -0
- package/dist/bundle/mcp-Y7VCIZ2J.js +0 -78
- package/dist/bundle/node-sqlite-X2DGRFOZ.js +0 -45
- package/dist/bundle/server-LKVYA2AE.js +0 -39
- package/dist/bundle/store-maintenance-command-EYBT64A2.js +0 -40
- /package/dist/bundle/{chunk-QVJLOUQB.js → chunk-GOO67PDU.js} +0 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -37,6 +37,23 @@ jobs:
|
|
|
37
37
|
bash scripts/audit.sh
|
|
38
38
|
pnpm smoke:node
|
|
39
39
|
|
|
40
|
+
# WC-TOOL-6: engines allows ^22.16.0; node-ci.yml runs Node 24 only.
|
|
41
|
+
node-22:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
45
|
+
with:
|
|
46
|
+
persist-credentials: false
|
|
47
|
+
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
48
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
49
|
+
with:
|
|
50
|
+
node-version: 22.16.0
|
|
51
|
+
cache: pnpm
|
|
52
|
+
- run: pnpm install --frozen-lockfile --ignore-scripts
|
|
53
|
+
- run: pnpm build
|
|
54
|
+
- run: pnpm test
|
|
55
|
+
- run: pnpm smoke:node
|
|
56
|
+
|
|
40
57
|
version:
|
|
41
58
|
if: github.event_name == 'pull_request'
|
|
42
59
|
runs-on: ubuntu-latest
|
|
@@ -252,3 +252,65 @@ jobs:
|
|
|
252
252
|
exit 0
|
|
253
253
|
fi
|
|
254
254
|
exit "$status"
|
|
255
|
+
|
|
256
|
+
mcp-registry-dry-run:
|
|
257
|
+
needs: build
|
|
258
|
+
if: inputs.dry_run && github.repository != 'WireCatLabs/cli-template'
|
|
259
|
+
runs-on: ubuntu-latest
|
|
260
|
+
permissions:
|
|
261
|
+
contents: read
|
|
262
|
+
env:
|
|
263
|
+
VERSION: ${{ needs.build.outputs.version }}
|
|
264
|
+
MCP_PUBLISHER_VERSION: 1.8.5
|
|
265
|
+
MCP_PUBLISHER_SHA256: 2d151ac57275c9a6684d9d22b1cba81058bab195ea0a162e8fce3c6a5ec32812
|
|
266
|
+
steps:
|
|
267
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
268
|
+
with:
|
|
269
|
+
persist-credentials: false
|
|
270
|
+
- name: mcp-publisher
|
|
271
|
+
if: hashFiles('server.json') != ''
|
|
272
|
+
run: |
|
|
273
|
+
curl -sSfLo mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/v${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz"
|
|
274
|
+
echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c -
|
|
275
|
+
tar -xzf mcp-publisher.tar.gz mcp-publisher
|
|
276
|
+
- name: validate server.json
|
|
277
|
+
if: hashFiles('server.json') != ''
|
|
278
|
+
run: |
|
|
279
|
+
jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.tmp && mv server.tmp server.json
|
|
280
|
+
./mcp-publisher validate
|
|
281
|
+
|
|
282
|
+
# After the tag, so a registry failure never holds back the npm release. A CLI without server.json, or without the
|
|
283
|
+
# key, publishes nothing and says so: the key proves wirecat.dev's DNS record (bin/setup-mcp-registry-key in
|
|
284
|
+
# wirecat-desktop), and the registry checks package.json's mcpName in the version npm already has.
|
|
285
|
+
mcp-registry:
|
|
286
|
+
needs: [build, tag]
|
|
287
|
+
if: ${{ !inputs.dry_run && github.repository != 'WireCatLabs/cli-template' }}
|
|
288
|
+
runs-on: ubuntu-latest
|
|
289
|
+
permissions:
|
|
290
|
+
contents: read
|
|
291
|
+
env:
|
|
292
|
+
VERSION: ${{ needs.build.outputs.version }}
|
|
293
|
+
MCP_PUBLISHER_VERSION: 1.8.5
|
|
294
|
+
MCP_PUBLISHER_SHA256: 2d151ac57275c9a6684d9d22b1cba81058bab195ea0a162e8fce3c6a5ec32812
|
|
295
|
+
steps:
|
|
296
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
297
|
+
with:
|
|
298
|
+
persist-credentials: false
|
|
299
|
+
- name: publish to the MCP Registry
|
|
300
|
+
env:
|
|
301
|
+
MCP_REGISTRY_PRIVATE_KEY: ${{ secrets.MCP_REGISTRY_PRIVATE_KEY }}
|
|
302
|
+
run: |
|
|
303
|
+
if [ ! -f server.json ]; then
|
|
304
|
+
echo "::notice::no server.json — $VERSION is not published to the MCP Registry"
|
|
305
|
+
exit 0
|
|
306
|
+
fi
|
|
307
|
+
if [ -z "$MCP_REGISTRY_PRIVATE_KEY" ]; then
|
|
308
|
+
echo "::notice::MCP_REGISTRY_PRIVATE_KEY is not set — $VERSION is not published to the MCP Registry"
|
|
309
|
+
exit 0
|
|
310
|
+
fi
|
|
311
|
+
curl -sSfLo mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/v${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz"
|
|
312
|
+
echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c -
|
|
313
|
+
tar -xzf mcp-publisher.tar.gz mcp-publisher
|
|
314
|
+
jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.tmp && mv server.tmp server.json
|
|
315
|
+
./mcp-publisher login dns --domain wirecat.dev --private-key "$MCP_REGISTRY_PRIVATE_KEY"
|
|
316
|
+
./mcp-publisher publish
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,52 @@ Notable changes to `@wirecat/cli-template`. One section per version, newest firs
|
|
|
5
5
|
|
|
6
6
|
<!-- cspell:words clawhub gcal katex openclaw smol whatsapp -->
|
|
7
7
|
|
|
8
|
+
## 0.12.0 — 01.11.2026
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **A new CLI is published to the official MCP Registry as `dev.wirecat/<name>`.** `server.json` is a new seed (run
|
|
13
|
+
with `npx`, `mcp serve --profiles all`), `new` sets `mcpName` in `package.json` for a WireCatLabs CLI, and
|
|
14
|
+
`release.yml` gets `mcp-registry-dry-run` and `mcp-registry`, copied from tg-cli. A CLI without `server.json`, or a
|
|
15
|
+
repository without `MCP_REGISTRY_PRIVATE_KEY`, publishes nothing and says so. An existing CLI gets the jobs from
|
|
16
|
+
`upgrade`; it adds `server.json` and `mcpName` itself, since both are its own files.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **0.11.0's note on run records gave the wrong reason.** A built skeleton keeps only a failed run because its own
|
|
21
|
+
commands only read local files and open no run. A command you add that does its work in `context.run` is kept on
|
|
22
|
+
success by default; [Configuration](docs/configuration.md#run-records) says so now.
|
|
23
|
+
|
|
24
|
+
## 0.11.0 — 31.10.2026
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **`pnpm test:slow`** lists the 20 slowest tests and the 10 slowest files (WC-TEST-5).
|
|
29
|
+
- **A Node 22.16.0 job in `ci.yml`** builds, runs the tests and runs the built bin, since `engines` allows Node 22 and
|
|
30
|
+
full validation runs only on Node 24 (WC-TOOL-6).
|
|
31
|
+
- **The release skill re-checks the comparison page** at each release: each mark against the release build, and the
|
|
32
|
+
check date and version in the intro (WC-CMP-11).
|
|
33
|
+
|
|
34
|
+
### Changed — may break callers
|
|
35
|
+
|
|
36
|
+
- **The skeleton runs on cli-core 0.495.0** (from 0.469.0); cli-base stays at 0.65.0. The root help's "Works with"
|
|
37
|
+
list now names gcal and mail.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **`scripts/audit.sh` passes the CLI's own entity schemas and error reasons** (`--schemas`, `--reasons`) from
|
|
42
|
+
`commands info`, so the audit measures same-entity-schema and same-error-reason for it, as gcal-cli's does.
|
|
43
|
+
- **The scripts that run the CLI in throwaway folders hide the keyring** with `DBUS_SESSION_BUS_ADDRESS=disabled:`:
|
|
44
|
+
`scripts/audit.sh`, `scripts/smoke.ts` and `scripts/smoke-bundle.ts`. Moved folders alone do not hide it, since it
|
|
45
|
+
is reached over D-Bus. `scripts/` is not updated by `upgrade`, so an existing CLI copies these by hand;
|
|
46
|
+
`scripts/audit.sh` is updated.
|
|
47
|
+
- **`pnpm package:check` refuses a `files` list that ships `src`, `scripts`, `.github`, `bin/release`, `config`, `lint`,
|
|
48
|
+
`contracts`, `docs/dev` or `template.json`** (WC-REL-16); it only checked that npm packs what `files` names. The
|
|
49
|
+
template's own package still ships them, since `new` copies them. `scripts/` is not updated by `upgrade`, so an
|
|
50
|
+
existing CLI copies the check from `scripts/smoke.ts` by hand.
|
|
51
|
+
- **0.10.0's note that runs record successes too was wrong for the skeleton.** A built skeleton keeps only a failed
|
|
52
|
+
run, from a terminal or an agent, and also with `--record`, as the README and the settings page say.
|
|
53
|
+
|
|
8
54
|
## 0.10.0 — 31.10.2026
|
|
9
55
|
|
|
10
56
|
### Changed — may break callers
|
package/CLAUDE.md
CHANGED
|
@@ -8,9 +8,7 @@ permissions. A gap in cli-core is fixed in cli-core.
|
|
|
8
8
|
|
|
9
9
|
## Local rules
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
[WC-REL-7](node_modules/@wirecat/cli-base/docs/standards/releases.md): the levels are in step 6 of the
|
|
13
|
-
[release skill](docs/dev/skills/release/SKILL.md), and `pnpm version:check` refuses a version raised too little.
|
|
11
|
+
None yet.
|
|
14
12
|
|
|
15
13
|
Add a rule here only when it holds for `clidev` alone, and link the handbook rule it narrows.
|
|
16
14
|
|
package/contracts/help.snap
CHANGED
|
@@ -9,7 +9,9 @@ Works with:
|
|
|
9
9
|
wa WhatsApp in the same local store: search, review and tasks offline
|
|
10
10
|
zm Zoom meetings: transcripts and summaries, searchable with your other WireCat data
|
|
11
11
|
drive Google Drive and Docs as local text, searchable with your other WireCat data
|
|
12
|
+
gcal Google Calendar events, searchable with your other WireCat data
|
|
12
13
|
memo context <person> one person across messengers, mail, notes and meetings
|
|
14
|
+
mail IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data
|
|
13
15
|
|
|
14
16
|
Next: clidev commands every command, by section
|
|
15
17
|
clidev help options output, offline, timeouts, dry run
|
package/dist/bin/clidev.js
CHANGED
|
@@ -9,7 +9,7 @@ if (
|
|
|
9
9
|
(words[0] === "--version" || words[0] === "-V") &&
|
|
10
10
|
!Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
|
|
11
11
|
) {
|
|
12
|
-
process.stdout.write("0.
|
|
12
|
+
process.stdout.write("0.12.0\n")
|
|
13
13
|
} else {
|
|
14
14
|
// Before the bundle compiles: the bundle's own call comes after its chunks.
|
|
15
15
|
module.enableCompileCache()
|
|
@@ -29,7 +29,7 @@ if (
|
|
|
29
29
|
})
|
|
30
30
|
}
|
|
31
31
|
const running = import("../bundle/clidev.js")
|
|
32
|
-
const chunks = ["../bundle/all-profiles-
|
|
32
|
+
const chunks = ["../bundle/all-profiles-MJ6XSFOO.js","../bundle/anthropic-W5UKBZUB.js","../bundle/app-server-EZ46JAHB.js","../bundle/bun-HB6O2TTT.js","../bundle/bun-sqlite-KBXOW2ES.js","../bundle/decode-AMXUVKNY.js","../bundle/dist-ESHIQU4M.js","../bundle/echarts-GJDMQ2AQ.js","../bundle/embed-L4CRZ2XQ.js","../bundle/embedder-IBGV4M2K.js","../bundle/first-screen-X5IJKBSU.js","../bundle/instructions-YJECS4KN.js","../bundle/mcp-OQBZXELQ.js","../bundle/mcp-RDZGYPSY.js","../bundle/mcp-TEMCENVV.js","../bundle/node-NQG4EVZR.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-BR7F3BLB.js","../bundle/oauth-J7UAWNIK.js","../bundle/open-BR47R5UE.js","../bundle/process-66I7RDPJ.js","../bundle/program-RNGI562F.js","../bundle/prompt-NE5JJ7UP.js","../bundle/recognize-GC3YFVIA.js","../bundle/remote-QELOMKQM.js","../bundle/rerank-BH6TZ2SP.js","../bundle/serve-WWLRNDT2.js","../bundle/server-DE6NLNUF.js","../bundle/server-ZPSQKOAH.js","../bundle/state-2BEGXAMO.js","../bundle/store-AH6WZMCF.js","../bundle/store-maintenance-command-PBXX3IEV.js"]
|
|
33
33
|
// After the server answers its first request, so it starts no later.
|
|
34
34
|
if (serves) setTimeout(() => void Promise.allSettled(chunks.map((chunk) => import(chunk))), 2000).unref()
|
|
35
35
|
await running
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
serveAllProfilesOverHttp,
|
|
7
7
|
serveAllProfilesOverStdio,
|
|
8
8
|
withProfile
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HDY5X3WQ.js";
|
|
10
|
+
import "./chunk-IN3FVRPK.js";
|
|
11
|
+
import "./chunk-IBBN7Z3A.js";
|
|
12
12
|
import "./chunk-5D4AEUVA.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-MJRSEUKG.js";
|
|
14
14
|
import "./chunk-O5EHUB2V.js";
|
|
15
15
|
import "./chunk-EFHLQXG6.js";
|
|
16
16
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
checkedOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PDGXMKJS.js";
|
|
6
6
|
import {
|
|
7
7
|
messagesFor,
|
|
8
8
|
systemFor
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NOVLCHDV.js";
|
|
10
10
|
import {
|
|
11
11
|
Anthropic
|
|
12
12
|
} from "./chunk-ADLS6FVG.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
__name
|
|
22
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// 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/models/anthropic.js
|
|
25
25
|
var options = strictObject({
|
|
26
26
|
stop_sequences: optional(array(string()))
|
|
27
27
|
});
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
PER_RUN,
|
|
5
|
+
envelope
|
|
6
|
+
} from "./chunk-N2Z3MCOF.js";
|
|
7
|
+
import "./chunk-ERKR3VJ5.js";
|
|
8
|
+
import {
|
|
9
|
+
mcpUrlOf
|
|
10
|
+
} from "./chunk-JAOGZMKQ.js";
|
|
11
|
+
import {
|
|
12
|
+
answeredWire
|
|
13
|
+
} from "./chunk-IN3FVRPK.js";
|
|
14
|
+
import {
|
|
15
|
+
answered,
|
|
16
|
+
failed,
|
|
17
|
+
registerCommands,
|
|
18
|
+
runCommandForAgent,
|
|
19
|
+
toolsFromCommands
|
|
20
|
+
} from "./chunk-YJNUDHJD.js";
|
|
21
|
+
import {
|
|
22
|
+
agentJson,
|
|
23
|
+
skillResource
|
|
24
|
+
} from "./chunk-4LURWBVV.js";
|
|
25
|
+
import {
|
|
26
|
+
StdioServerTransport,
|
|
27
|
+
serveStdio
|
|
28
|
+
} from "./chunk-IBBN7Z3A.js";
|
|
29
|
+
import "./chunk-L5WWMP5M.js";
|
|
30
|
+
import "./chunk-FZZIU4B7.js";
|
|
31
|
+
import "./chunk-KJTNT4SW.js";
|
|
32
|
+
import "./chunk-E42W72PQ.js";
|
|
33
|
+
import "./chunk-MFS52LTZ.js";
|
|
34
|
+
import {
|
|
35
|
+
appInstructions
|
|
36
|
+
} from "./chunk-ERGB4NJA.js";
|
|
37
|
+
import {
|
|
38
|
+
McpServer
|
|
39
|
+
} from "./chunk-5D4AEUVA.js";
|
|
40
|
+
import {
|
|
41
|
+
mcpHttpMarker
|
|
42
|
+
} from "./chunk-V3ZTQ24B.js";
|
|
43
|
+
import "./chunk-RUKDZEID.js";
|
|
44
|
+
import "./chunk-OV6PHTAY.js";
|
|
45
|
+
import "./chunk-PBN4RBHS.js";
|
|
46
|
+
import "./chunk-35KYY65W.js";
|
|
47
|
+
import "./chunk-NOVLCHDV.js";
|
|
48
|
+
import "./chunk-IGHEW777.js";
|
|
49
|
+
import "./chunk-MUSYGFCY.js";
|
|
50
|
+
import {
|
|
51
|
+
DEFAULT_OUTPUT_BYTES,
|
|
52
|
+
changesAuthorityAt,
|
|
53
|
+
describeProgram,
|
|
54
|
+
environmentOf,
|
|
55
|
+
fetchesOnlyAt,
|
|
56
|
+
judgedTargets,
|
|
57
|
+
readOnlyLockOf,
|
|
58
|
+
rootOf2 as rootOf
|
|
59
|
+
} from "./chunk-QJ6XW4DM.js";
|
|
60
|
+
import "./chunk-MJRSEUKG.js";
|
|
61
|
+
import "./chunk-O3UXNU3S.js";
|
|
62
|
+
import "./chunk-VYSUKHKL.js";
|
|
63
|
+
import "./chunk-VLNKTMV7.js";
|
|
64
|
+
import "./chunk-O5EHUB2V.js";
|
|
65
|
+
import "./chunk-FDBINRWA.js";
|
|
66
|
+
import "./chunk-QKWRL4OD.js";
|
|
67
|
+
import "./chunk-EGRB55FF.js";
|
|
68
|
+
import "./chunk-IDWW4TU2.js";
|
|
69
|
+
import "./chunk-2B5U4Z5H.js";
|
|
70
|
+
import {
|
|
71
|
+
CliError,
|
|
72
|
+
mcpErrorResult
|
|
73
|
+
} from "./chunk-EFHLQXG6.js";
|
|
74
|
+
import "./chunk-Y5E2WNWB.js";
|
|
75
|
+
import "./chunk-Z7MSIRSQ.js";
|
|
76
|
+
import {
|
|
77
|
+
__name
|
|
78
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
79
|
+
|
|
80
|
+
// 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/mcp/app-server.js
|
|
81
|
+
var EXCLUDED = [["mcp"]];
|
|
82
|
+
var createAppServer = /* @__PURE__ */ __name((command, context, options) => {
|
|
83
|
+
const { app } = options;
|
|
84
|
+
const root = rootOf(command);
|
|
85
|
+
const environment = environmentOf(command);
|
|
86
|
+
if (!environment.runCommand)
|
|
87
|
+
throw new Error("the MCP server runs inside run(), which hands it the program");
|
|
88
|
+
const program = { run: environment.runCommand, commands: describeProgram(root) };
|
|
89
|
+
const flags = command.optsWithGlobals();
|
|
90
|
+
const overrides = flags.permission ?? [];
|
|
91
|
+
const { settings } = context;
|
|
92
|
+
const levels = /* @__PURE__ */ __name(() => options.resolveSettings(flags, { env: context.env }).permissions, "levels");
|
|
93
|
+
const readOnly = /* @__PURE__ */ __name(() => readOnlyLockOf(app, context.env) !== void 0, "readOnly");
|
|
94
|
+
const authority = changesAuthorityAt(root);
|
|
95
|
+
const targets = judgedTargets(root);
|
|
96
|
+
const passed = Object.fromEntries(Object.entries(environment).filter(([key]) => !PER_RUN.has(key)));
|
|
97
|
+
const tools = toolsFromCommands(program.commands, {
|
|
98
|
+
includeUnavailable: true,
|
|
99
|
+
exclude: EXCLUDED,
|
|
100
|
+
levels: settings.permissions,
|
|
101
|
+
currentLevels: levels,
|
|
102
|
+
readOnly: readOnly(),
|
|
103
|
+
authority,
|
|
104
|
+
fetchOnly: fetchesOnlyAt(root),
|
|
105
|
+
permissions: options.permissions
|
|
106
|
+
});
|
|
107
|
+
const availability = /* @__PURE__ */ __name((one) => () => {
|
|
108
|
+
const permitted = one.availability?.() ?? { available: true };
|
|
109
|
+
if (!permitted.available)
|
|
110
|
+
return permitted;
|
|
111
|
+
return options.availability?.(one.path, settings.profile) ?? permitted;
|
|
112
|
+
}, "availability");
|
|
113
|
+
const commands = Object.fromEntries(tools.map((one) => [
|
|
114
|
+
one.command,
|
|
115
|
+
{
|
|
116
|
+
title: one.title,
|
|
117
|
+
description: one.description,
|
|
118
|
+
writes: one.writes,
|
|
119
|
+
availability: availability(one),
|
|
120
|
+
input: one.input,
|
|
121
|
+
run: /* @__PURE__ */ __name(async (input, ctx) => {
|
|
122
|
+
const own = options.availability?.(one.path, settings.profile);
|
|
123
|
+
if (own && !own.available)
|
|
124
|
+
return failed(new CliError("permission_error", `${one.command}: ${own.reason ?? "unavailable for this profile"}`, {
|
|
125
|
+
...own.permission ? { permission: own.permission } : {}
|
|
126
|
+
}), app.errors);
|
|
127
|
+
const traceparent = ctx?.mcpReq?._meta?.traceparent;
|
|
128
|
+
const env = typeof traceparent === "string" ? { ...context.env, TRACEPARENT: traceparent } : context.env;
|
|
129
|
+
const answer = await runCommandForAgent(program, one.path, input, {
|
|
130
|
+
profile: settings.profile,
|
|
131
|
+
readOnly: readOnly(),
|
|
132
|
+
env,
|
|
133
|
+
levels,
|
|
134
|
+
overrides,
|
|
135
|
+
authority,
|
|
136
|
+
permissions: options.permissions,
|
|
137
|
+
environment: passed
|
|
138
|
+
});
|
|
139
|
+
if ("error" in answer)
|
|
140
|
+
return mcpErrorResult(JSON.parse(agentJson(answer.error)));
|
|
141
|
+
try {
|
|
142
|
+
return answered(envelope(one.command, answer.result), DEFAULT_OUTPUT_BYTES, targets);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
return failed(error, app.errors);
|
|
145
|
+
}
|
|
146
|
+
}, "run")
|
|
147
|
+
}
|
|
148
|
+
]));
|
|
149
|
+
const skill = options.skill ? skillResource(app, options.skill) : void 0;
|
|
150
|
+
const build = /* @__PURE__ */ __name(() => {
|
|
151
|
+
const server = new McpServer({ name: app.command, version: app.version }, {
|
|
152
|
+
instructions: appInstructions({
|
|
153
|
+
command: app.command,
|
|
154
|
+
name: options.name,
|
|
155
|
+
profile: settings.profile,
|
|
156
|
+
untrusted: options.untrusted,
|
|
157
|
+
...skill ? { skill: skill.instruction } : {}
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
registerCommands(server, app.command, commands, app.errors, void 0, app.messenger);
|
|
161
|
+
if (skill) {
|
|
162
|
+
const { uri, name, title, description, mimeType, read } = skill;
|
|
163
|
+
server.registerResource(name, uri, { title, description, mimeType }, read);
|
|
164
|
+
}
|
|
165
|
+
return server;
|
|
166
|
+
}, "build");
|
|
167
|
+
return { build, offered: Object.keys(commands) };
|
|
168
|
+
}, "createAppServer");
|
|
169
|
+
var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options) => {
|
|
170
|
+
const { build } = createAppServer(command, context, options);
|
|
171
|
+
const { stdin, stdout, signal } = environmentOf(command);
|
|
172
|
+
const own = stdin && stdout && stdin !== process.stdin;
|
|
173
|
+
const wire = answeredWire(own ? stdin : process.stdin, own ? stdout : process.stdout);
|
|
174
|
+
const handle = serveStdio(build, {
|
|
175
|
+
transport: new StdioServerTransport(wire.input, wire.output),
|
|
176
|
+
onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
|
|
177
|
+
});
|
|
178
|
+
const ended = await new Promise((resolve) => {
|
|
179
|
+
wire.ended.then(() => resolve("input"));
|
|
180
|
+
if (own)
|
|
181
|
+
signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
|
|
182
|
+
else {
|
|
183
|
+
process.once("SIGINT", () => resolve("stopped"));
|
|
184
|
+
process.once("SIGTERM", () => resolve("stopped"));
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
if (ended === "input")
|
|
188
|
+
await wire.answered();
|
|
189
|
+
wire.release();
|
|
190
|
+
await handle.close();
|
|
191
|
+
}, "serveAppOverStdio");
|
|
192
|
+
var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
|
|
193
|
+
const { app } = options;
|
|
194
|
+
const { build } = createAppServer(command, context, options);
|
|
195
|
+
const { serveOverHttp } = await import("./serve-WWLRNDT2.js");
|
|
196
|
+
const listening = await serveOverHttp(build, {
|
|
197
|
+
...http,
|
|
198
|
+
appName: app.command,
|
|
199
|
+
onCode: /* @__PURE__ */ __name((code, expires) => context.renderer.note(context.env[mcpHttpMarker(app.envPrefix)] === void 0 ? `login code for a new browser app: ${code} (until ${expires.toTimeString().slice(0, 5)}; a new one after each login)` : `a new login code for a browser app: \`${app.command} ${context.settings.profile} mcp server status\``), "onCode"),
|
|
200
|
+
onError: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onError")
|
|
201
|
+
}).catch((error) => {
|
|
202
|
+
if (error.code === "EADDRINUSE")
|
|
203
|
+
throw new CliError("configuration_error", `port ${http.port} is in use \u2014 pass another with --port`);
|
|
204
|
+
throw error;
|
|
205
|
+
});
|
|
206
|
+
context.renderer.note(`serving on ${listening.url.href} \u2014 point your tunnel at it; connectors use ${mcpUrlOf(http.publicUrl).href}`);
|
|
207
|
+
await new Promise((resolve) => {
|
|
208
|
+
process.once("SIGINT", resolve);
|
|
209
|
+
process.once("SIGTERM", resolve);
|
|
210
|
+
});
|
|
211
|
+
await listening.close();
|
|
212
|
+
}, "serveAppOverHttp");
|
|
213
|
+
export {
|
|
214
|
+
createAppServer,
|
|
215
|
+
serveAppOverHttp,
|
|
216
|
+
serveAppOverStdio
|
|
217
|
+
};
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Z7MSIRSQ.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// 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/store/sqlite/drizzle/bun.js
|
|
27
27
|
import { Database } from "bun:sqlite";
|
|
28
28
|
var bunSQLiteCodecs = refineSqliteCodecs({
|
|
29
29
|
"integer:boolean": { normalize: booleanFromInteger },
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QBP7OMN5.js";
|
|
7
7
|
import "./chunk-EFHLQXG6.js";
|
|
8
8
|
import {
|
|
9
9
|
importFrom
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
|
|
16
16
|
var customised = false;
|
|
17
17
|
var ownLibrary = /* @__PURE__ */ __name(async () => {
|
|
18
18
|
try {
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// 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/store/driver.js
|
|
11
11
|
var PRAGMAS = `
|
|
12
12
|
PRAGMA busy_timeout = 5000;
|
|
13
13
|
PRAGMA journal_mode = WAL;
|
|
14
14
|
PRAGMA foreign_keys = ON;
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// 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/store/sqlite-warning.js
|
|
18
18
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
19
19
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
20
20
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -35,7 +35,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
35
35
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
36
36
|
}, "isSqliteWarning");
|
|
37
37
|
|
|
38
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// 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/store/open.js
|
|
39
39
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
40
40
|
const database = await openFile(path);
|
|
41
41
|
try {
|
|
@@ -48,12 +48,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
48
48
|
}, "openCache");
|
|
49
49
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
50
50
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
51
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
51
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-KBXOW2ES.js");
|
|
52
52
|
return await openWithBunSqlite(path);
|
|
53
53
|
}, "openUnderBun");
|
|
54
54
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
55
55
|
quietSqliteWarning();
|
|
56
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
56
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-BR7F3BLB.js");
|
|
57
57
|
return openWithNodeSqlite(path);
|
|
58
58
|
}, "openUnderNode");
|
|
59
59
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QKWRL4OD.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-EFHLQXG6.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.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/remote.js
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
16
|
var OPENAI_MODELS = {
|