cc-mirror 1.0.3 → 1.0.4
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/dist/cc-mirror.mjs +19 -38
- package/dist/tui.mjs +19 -46
- package/package.json +1 -1
package/dist/cc-mirror.mjs
CHANGED
|
@@ -2367,21 +2367,13 @@ var ZAI_BLOCKED_MCP_TOOLS = [
|
|
|
2367
2367
|
"mcp__web_reader__webReader"
|
|
2368
2368
|
];
|
|
2369
2369
|
var ZAI_CLI_TEXT = `
|
|
2370
|
-
# ZAI CLI (embedded reference)
|
|
2371
2370
|
Access Z.AI capabilities via 'npx zai-cli'. The CLI is self-documenting - use '--help' at any level.
|
|
2372
2371
|
|
|
2373
|
-
Setup:
|
|
2374
|
-
- Required env: 'Z_AI_API_KEY'
|
|
2375
|
-
- Get a key at: https://z.ai/manage-apikey/apikey-list
|
|
2376
|
-
|
|
2377
2372
|
Commands:
|
|
2378
2373
|
- vision: Analyze images, screenshots, videos (many subcommands)
|
|
2379
2374
|
- search: Real-time web search (domain/recency/location/count filters)
|
|
2380
2375
|
- read: Fetch web pages as markdown/text (format/no-images/with-links/timeout)
|
|
2381
2376
|
- repo: GitHub exploration (tree/search/read). Run npx zai-cli repo --help for subcommands.
|
|
2382
|
-
- tools/tool/call: MCP tool discovery + raw calls (advanced)
|
|
2383
|
-
- code: TypeScript tool chaining (advanced)
|
|
2384
|
-
- doctor: Environment + connectivity checks
|
|
2385
2377
|
|
|
2386
2378
|
Quick start examples:
|
|
2387
2379
|
- npx zai-cli vision analyze ./screenshot.png "What errors do you see?"
|
|
@@ -2389,11 +2381,6 @@ Quick start examples:
|
|
|
2389
2381
|
- npx zai-cli read https://docs.example.com/api
|
|
2390
2382
|
- npx zai-cli repo search facebook/react "server components"
|
|
2391
2383
|
- npx zai-cli repo --help
|
|
2392
|
-
- npx zai-cli doctor
|
|
2393
|
-
|
|
2394
|
-
Output:
|
|
2395
|
-
- Default: data-only (token efficient).
|
|
2396
|
-
- Use '--output-format json' for { success, data, timestamp } wrapping.
|
|
2397
2384
|
`.trim();
|
|
2398
2385
|
var buildZaiContract = (mode) => `
|
|
2399
2386
|
<explicit_guidance>
|
|
@@ -2417,19 +2404,17 @@ Important:
|
|
|
2417
2404
|
<tool_routing priority="critical">
|
|
2418
2405
|
When you need external info, web content, or image understanding, follow this routing (use the Bash tool):
|
|
2419
2406
|
1) Web search:
|
|
2420
|
-
npx
|
|
2407
|
+
npx -y zai-cli search "<query>" --count 5 --output-format json
|
|
2421
2408
|
2) Read a URL:
|
|
2422
|
-
npx
|
|
2409
|
+
npx -y zai-cli read <url> --output-format json
|
|
2423
2410
|
3) Image analysis:
|
|
2424
|
-
npx
|
|
2411
|
+
npx -y zai-cli vision analyze <image_url_or_path> "<prompt>" --output-format json
|
|
2425
2412
|
4) GitHub repo exploration (public repos only):
|
|
2426
|
-
- Search: npx
|
|
2427
|
-
- Tree: npx
|
|
2428
|
-
- Read: npx
|
|
2429
|
-
5) Troubleshooting:
|
|
2430
|
-
npx --yes zai-cli doctor --output-format json
|
|
2413
|
+
- Search: npx -y zai-cli repo search <owner/repo> "<query>" --output-format json
|
|
2414
|
+
- Tree: npx -y zai-cli repo tree <owner/repo> --depth 2 --output-format json
|
|
2415
|
+
- Read: npx -y zai-cli repo read <owner/repo> <path> --output-format json
|
|
2431
2416
|
|
|
2432
|
-
|
|
2417
|
+
The built in WebSearch/WebFetch tools are NOT available.
|
|
2433
2418
|
</tool_routing>
|
|
2434
2419
|
|
|
2435
2420
|
<warning priority="critical">
|
|
@@ -2451,8 +2436,7 @@ ${verbositySpec}
|
|
|
2451
2436
|
`.trim();
|
|
2452
2437
|
var buildZaiExcerpt = () => `
|
|
2453
2438
|
<tool_info>
|
|
2454
|
-
|
|
2455
|
-
- Use Bash + npx --yes zai-cli for web/search/vision.
|
|
2439
|
+
- Use Bash + npx -y zai-cli for web/search/vision.
|
|
2456
2440
|
- Ignore the Z.ai-injected MCP tools listed below (treat them as non-existent).
|
|
2457
2441
|
- No zai-cli skill is installed; do not use Skill for this.
|
|
2458
2442
|
Blocked MCP tool names (treat as non-existent):
|
|
@@ -2486,13 +2470,17 @@ ${verbositySpec}
|
|
|
2486
2470
|
${ZAI_CLI_TEXT}
|
|
2487
2471
|
|
|
2488
2472
|
<explicit_guidance>
|
|
2489
|
-
When you need web/search/vision,
|
|
2473
|
+
When you need web/search/vision, use these exact commands:
|
|
2490
2474
|
- Web search:
|
|
2491
|
-
npx
|
|
2475
|
+
npx -y zai-cli search "<query>" --count 5 --output-format json
|
|
2492
2476
|
- Read a URL:
|
|
2493
|
-
npx
|
|
2494
|
-
- Vision:
|
|
2495
|
-
npx
|
|
2477
|
+
npx -y zai-cli read <url> --output-format json
|
|
2478
|
+
- Vision: analyze images, screenshots, videos
|
|
2479
|
+
npx -y zai-cli vision analyze <image_url_or_path> "<prompt>" --output-format json
|
|
2480
|
+
- GitHub repo exploration (public repos only):
|
|
2481
|
+
- Search: npx -y zai-cli repo search <owner/repo> "<query>" --output-format json
|
|
2482
|
+
- Tree: npx -y zai-cli repo tree <owner/repo> --depth 2 --output-format json
|
|
2483
|
+
- Read: npx -y zai-cli repo read <owner/repo> <path> --output-format json
|
|
2496
2484
|
</explicit_guidance>
|
|
2497
2485
|
|
|
2498
2486
|
<warning priority="critical">
|
|
@@ -2502,12 +2490,12 @@ Prefer zai-cli via Bash for web/search/vision.
|
|
|
2502
2490
|
`.trim(),
|
|
2503
2491
|
webfetch: `
|
|
2504
2492
|
<explicit_guidance>
|
|
2505
|
-
Z.ai routing: prefer Bash + npx
|
|
2493
|
+
Z.ai routing: prefer Bash + npx -y zai-cli read <url> --output-format json.
|
|
2506
2494
|
</explicit_guidance>
|
|
2507
2495
|
`.trim(),
|
|
2508
2496
|
websearch: `
|
|
2509
2497
|
<explicit_guidance>
|
|
2510
|
-
Z.ai routing: prefer Bash + npx
|
|
2498
|
+
Z.ai routing: prefer Bash + npx -y zai-cli search "<query>" --count 5 --output-format json.
|
|
2511
2499
|
</explicit_guidance>
|
|
2512
2500
|
`.trim(),
|
|
2513
2501
|
mcpsearch: `
|
|
@@ -2527,13 +2515,6 @@ var MINIMAX_WEB_SEARCH = "mcp__MiniMax__web_search";
|
|
|
2527
2515
|
var MINIMAX_UNDERSTAND_IMAGE = "mcp__MiniMax__understand_image";
|
|
2528
2516
|
var buildMinimaxContract = (mode) => `
|
|
2529
2517
|
<explicit_guidance>
|
|
2530
|
-
Provider: MiniMax
|
|
2531
|
-
|
|
2532
|
-
<authentication>
|
|
2533
|
-
- Use API-key auth only.
|
|
2534
|
-
- Ignore ANTHROPIC_AUTH_TOKEN if present.
|
|
2535
|
-
</authentication>
|
|
2536
|
-
|
|
2537
2518
|
<tool_routing priority="critical">
|
|
2538
2519
|
MiniMax MCP tools available (and ONLY these for web + vision):
|
|
2539
2520
|
- ${MINIMAX_WEB_SEARCH} (web search)
|
package/dist/tui.mjs
CHANGED
|
@@ -2236,21 +2236,13 @@ var ZAI_BLOCKED_MCP_TOOLS = [
|
|
|
2236
2236
|
"mcp__web_reader__webReader"
|
|
2237
2237
|
];
|
|
2238
2238
|
var ZAI_CLI_TEXT = `
|
|
2239
|
-
# ZAI CLI (embedded reference)
|
|
2240
2239
|
Access Z.AI capabilities via 'npx zai-cli'. The CLI is self-documenting - use '--help' at any level.
|
|
2241
2240
|
|
|
2242
|
-
Setup:
|
|
2243
|
-
- Required env: 'Z_AI_API_KEY'
|
|
2244
|
-
- Get a key at: https://z.ai/manage-apikey/apikey-list
|
|
2245
|
-
|
|
2246
2241
|
Commands:
|
|
2247
2242
|
- vision: Analyze images, screenshots, videos (many subcommands)
|
|
2248
2243
|
- search: Real-time web search (domain/recency/location/count filters)
|
|
2249
2244
|
- read: Fetch web pages as markdown/text (format/no-images/with-links/timeout)
|
|
2250
2245
|
- repo: GitHub exploration (tree/search/read). Run npx zai-cli repo --help for subcommands.
|
|
2251
|
-
- tools/tool/call: MCP tool discovery + raw calls (advanced)
|
|
2252
|
-
- code: TypeScript tool chaining (advanced)
|
|
2253
|
-
- doctor: Environment + connectivity checks
|
|
2254
2246
|
|
|
2255
2247
|
Quick start examples:
|
|
2256
2248
|
- npx zai-cli vision analyze ./screenshot.png "What errors do you see?"
|
|
@@ -2258,11 +2250,6 @@ Quick start examples:
|
|
|
2258
2250
|
- npx zai-cli read https://docs.example.com/api
|
|
2259
2251
|
- npx zai-cli repo search facebook/react "server components"
|
|
2260
2252
|
- npx zai-cli repo --help
|
|
2261
|
-
- npx zai-cli doctor
|
|
2262
|
-
|
|
2263
|
-
Output:
|
|
2264
|
-
- Default: data-only (token efficient).
|
|
2265
|
-
- Use '--output-format json' for { success, data, timestamp } wrapping.
|
|
2266
2253
|
`.trim();
|
|
2267
2254
|
var buildZaiContract = (mode) => `
|
|
2268
2255
|
<explicit_guidance>
|
|
@@ -2286,19 +2273,17 @@ Important:
|
|
|
2286
2273
|
<tool_routing priority="critical">
|
|
2287
2274
|
When you need external info, web content, or image understanding, follow this routing (use the Bash tool):
|
|
2288
2275
|
1) Web search:
|
|
2289
|
-
npx
|
|
2276
|
+
npx -y zai-cli search "<query>" --count 5 --output-format json
|
|
2290
2277
|
2) Read a URL:
|
|
2291
|
-
npx
|
|
2278
|
+
npx -y zai-cli read <url> --output-format json
|
|
2292
2279
|
3) Image analysis:
|
|
2293
|
-
npx
|
|
2280
|
+
npx -y zai-cli vision analyze <image_url_or_path> "<prompt>" --output-format json
|
|
2294
2281
|
4) GitHub repo exploration (public repos only):
|
|
2295
|
-
- Search: npx
|
|
2296
|
-
- Tree: npx
|
|
2297
|
-
- Read: npx
|
|
2298
|
-
5) Troubleshooting:
|
|
2299
|
-
npx --yes zai-cli doctor --output-format json
|
|
2282
|
+
- Search: npx -y zai-cli repo search <owner/repo> "<query>" --output-format json
|
|
2283
|
+
- Tree: npx -y zai-cli repo tree <owner/repo> --depth 2 --output-format json
|
|
2284
|
+
- Read: npx -y zai-cli repo read <owner/repo> <path> --output-format json
|
|
2300
2285
|
|
|
2301
|
-
|
|
2286
|
+
The built in WebSearch/WebFetch tools are NOT available.
|
|
2302
2287
|
</tool_routing>
|
|
2303
2288
|
|
|
2304
2289
|
<warning priority="critical">
|
|
@@ -2320,8 +2305,7 @@ ${verbositySpec}
|
|
|
2320
2305
|
`.trim();
|
|
2321
2306
|
var buildZaiExcerpt = () => `
|
|
2322
2307
|
<tool_info>
|
|
2323
|
-
|
|
2324
|
-
- Use Bash + npx --yes zai-cli for web/search/vision.
|
|
2308
|
+
- Use Bash + npx -y zai-cli for web/search/vision.
|
|
2325
2309
|
- Ignore the Z.ai-injected MCP tools listed below (treat them as non-existent).
|
|
2326
2310
|
- No zai-cli skill is installed; do not use Skill for this.
|
|
2327
2311
|
Blocked MCP tool names (treat as non-existent):
|
|
@@ -2355,13 +2339,17 @@ ${verbositySpec}
|
|
|
2355
2339
|
${ZAI_CLI_TEXT}
|
|
2356
2340
|
|
|
2357
2341
|
<explicit_guidance>
|
|
2358
|
-
When you need web/search/vision,
|
|
2342
|
+
When you need web/search/vision, use these exact commands:
|
|
2359
2343
|
- Web search:
|
|
2360
|
-
npx
|
|
2344
|
+
npx -y zai-cli search "<query>" --count 5 --output-format json
|
|
2361
2345
|
- Read a URL:
|
|
2362
|
-
npx
|
|
2363
|
-
- Vision:
|
|
2364
|
-
npx
|
|
2346
|
+
npx -y zai-cli read <url> --output-format json
|
|
2347
|
+
- Vision: analyze images, screenshots, videos
|
|
2348
|
+
npx -y zai-cli vision analyze <image_url_or_path> "<prompt>" --output-format json
|
|
2349
|
+
- GitHub repo exploration (public repos only):
|
|
2350
|
+
- Search: npx -y zai-cli repo search <owner/repo> "<query>" --output-format json
|
|
2351
|
+
- Tree: npx -y zai-cli repo tree <owner/repo> --depth 2 --output-format json
|
|
2352
|
+
- Read: npx -y zai-cli repo read <owner/repo> <path> --output-format json
|
|
2365
2353
|
</explicit_guidance>
|
|
2366
2354
|
|
|
2367
2355
|
<warning priority="critical">
|
|
@@ -2371,12 +2359,12 @@ Prefer zai-cli via Bash for web/search/vision.
|
|
|
2371
2359
|
`.trim(),
|
|
2372
2360
|
webfetch: `
|
|
2373
2361
|
<explicit_guidance>
|
|
2374
|
-
Z.ai routing: prefer Bash + npx
|
|
2362
|
+
Z.ai routing: prefer Bash + npx -y zai-cli read <url> --output-format json.
|
|
2375
2363
|
</explicit_guidance>
|
|
2376
2364
|
`.trim(),
|
|
2377
2365
|
websearch: `
|
|
2378
2366
|
<explicit_guidance>
|
|
2379
|
-
Z.ai routing: prefer Bash + npx
|
|
2367
|
+
Z.ai routing: prefer Bash + npx -y zai-cli search "<query>" --count 5 --output-format json.
|
|
2380
2368
|
</explicit_guidance>
|
|
2381
2369
|
`.trim(),
|
|
2382
2370
|
mcpsearch: `
|
|
@@ -2396,13 +2384,6 @@ var MINIMAX_WEB_SEARCH = "mcp__MiniMax__web_search";
|
|
|
2396
2384
|
var MINIMAX_UNDERSTAND_IMAGE = "mcp__MiniMax__understand_image";
|
|
2397
2385
|
var buildMinimaxContract = (mode) => `
|
|
2398
2386
|
<explicit_guidance>
|
|
2399
|
-
Provider: MiniMax
|
|
2400
|
-
|
|
2401
|
-
<authentication>
|
|
2402
|
-
- Use API-key auth only.
|
|
2403
|
-
- Ignore ANTHROPIC_AUTH_TOKEN if present.
|
|
2404
|
-
</authentication>
|
|
2405
|
-
|
|
2406
2387
|
<tool_routing priority="critical">
|
|
2407
2388
|
MiniMax MCP tools available (and ONLY these for web + vision):
|
|
2408
2389
|
- ${MINIMAX_WEB_SEARCH} (web search)
|
|
@@ -4441,12 +4422,6 @@ var GoldDivider = ({ width = 60 }) => {
|
|
|
4441
4422
|
// src/tui/components/ui/AsciiArt.tsx
|
|
4442
4423
|
import { Box as Box4, Text as Text4 } from "ink";
|
|
4443
4424
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4444
|
-
var CelebrationCheckmark = () => /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", alignItems: "center", children: [
|
|
4445
|
-
/* @__PURE__ */ jsx4(Text4, { color: colors.success, children: " \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557" }),
|
|
4446
|
-
/* @__PURE__ */ jsx4(Text4, { color: colors.success, children: " \u2551 \u2713 SUCCESS! \u2713 \u2551" }),
|
|
4447
|
-
/* @__PURE__ */ jsx4(Text4, { color: colors.success, children: " \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D" })
|
|
4448
|
-
] });
|
|
4449
|
-
var CelebrationDivider = () => /* @__PURE__ */ jsx4(Box4, { justifyContent: "center", children: /* @__PURE__ */ jsx4(Text4, { color: colors.gold, children: "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u25C6\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501" }) });
|
|
4450
4425
|
var HaikuDisplay = ({ lines }) => /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", alignItems: "center", marginY: 1, children: [
|
|
4451
4426
|
/* @__PURE__ */ jsx4(Text4, { color: colors.textDim, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }),
|
|
4452
4427
|
lines.map((line, i) => /* @__PURE__ */ jsx4(Text4, { color: colors.textMuted, children: line }, i)),
|
|
@@ -5363,8 +5338,6 @@ var CompletionScreen = ({
|
|
|
5363
5338
|
];
|
|
5364
5339
|
const subtitleText = variantName ? `Variant "${variantName}" created` : title;
|
|
5365
5340
|
return /* @__PURE__ */ jsxs16(ScreenLayout, { title: `${icons.check} Success!`, subtitle: subtitleText, borderColor: colors.success, icon: null, children: [
|
|
5366
|
-
/* @__PURE__ */ jsx16(CelebrationCheckmark, {}),
|
|
5367
|
-
/* @__PURE__ */ jsx16(CelebrationDivider, {}),
|
|
5368
5341
|
milestoneMessage && /* @__PURE__ */ jsx16(Box16, { justifyContent: "center", marginY: 1, children: /* @__PURE__ */ jsx16(Text15, { color: colors.gold, children: milestoneMessage }) }),
|
|
5369
5342
|
lateNightActive && !milestoneMessage && /* @__PURE__ */ jsx16(Box16, { justifyContent: "center", marginY: 1, children: /* @__PURE__ */ jsx16(Text15, { color: colors.textMuted, children: LATE_NIGHT_MESSAGE }) }),
|
|
5370
5343
|
/* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", marginY: 1, children: [
|
package/package.json
CHANGED