ccjk 2.2.4 → 2.3.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/dist/chunks/auto-updater.mjs +15 -1
- package/dist/chunks/ccjk-config.mjs +77 -13
- package/dist/chunks/ccr.mjs +7 -10
- package/dist/chunks/ccu.mjs +4 -4
- package/dist/chunks/check-updates.mjs +4 -7
- package/dist/chunks/claude-code-config-manager.mjs +8 -11
- package/dist/chunks/claude-code-incremental-manager.mjs +4 -7
- package/dist/chunks/codex.mjs +416 -17
- package/dist/chunks/commands.mjs +392 -89
- package/dist/chunks/commands2.mjs +109 -0
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +5 -8
- package/dist/chunks/doctor.mjs +6 -6
- package/dist/chunks/features.mjs +654 -35
- package/dist/chunks/help.mjs +339 -0
- package/dist/chunks/index.mjs +1020 -10
- package/dist/chunks/index2.mjs +4 -3
- package/dist/chunks/index3.mjs +1171 -0
- package/dist/chunks/init.mjs +21 -24
- package/dist/chunks/installer.mjs +178 -0
- package/dist/chunks/interview.mjs +6 -6
- package/dist/chunks/mcp-performance.mjs +79 -2
- package/dist/chunks/mcp.mjs +500 -0
- package/dist/chunks/menu.mjs +10 -10
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding.mjs +6 -6
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +10 -10
- package/dist/chunks/prompts.mjs +7 -8
- package/dist/chunks/session.mjs +2 -2
- package/dist/chunks/skills-sync.mjs +2 -2
- package/dist/chunks/uninstall.mjs +4 -5
- package/dist/chunks/update.mjs +4 -7
- package/dist/chunks/upgrade-manager.mjs +2 -2
- package/dist/chunks/version-checker.mjs +88 -7
- package/dist/chunks/workflows.mjs +617 -84
- package/dist/cli.mjs +295 -55
- package/dist/i18n/locales/en/agentBrowser.json +79 -0
- package/dist/i18n/locales/en/cloud-sync.json +147 -0
- package/dist/i18n/locales/en/marketplace.json +32 -1
- package/dist/i18n/locales/en/mcp.json +2 -4
- package/dist/i18n/locales/en/updater.json +3 -1
- package/dist/i18n/locales/zh/agentBrowser.json +79 -0
- package/dist/i18n/locales/zh-CN/cloud-sync.json +147 -0
- package/dist/i18n/locales/zh-CN/common.json +1 -1
- package/dist/i18n/locales/zh-CN/marketplace.json +32 -1
- package/dist/i18n/locales/zh-CN/mcp.json +2 -4
- package/dist/i18n/locales/zh-CN/updater.json +3 -1
- package/dist/index.d.mts +8 -584
- package/dist/index.d.ts +8 -584
- package/dist/index.mjs +9 -13
- package/dist/shared/{ccjk.DJM5aVQJ.mjs → ccjk.ByTIGCUC.mjs} +3 -3
- package/dist/shared/{ccjk.qYAnUMuy.mjs → ccjk.CGTmRqsu.mjs} +2 -3
- package/dist/shared/{ccjk.CUdzQluX.mjs → ccjk.CURU8gbR.mjs} +1 -1
- package/dist/{chunks/mcp-market.mjs → shared/ccjk.D-RZS4E2.mjs} +6 -65
- package/dist/shared/{ccjk.B7169qud.mjs → ccjk.tB4-Y4Qb.mjs} +3 -3
- package/package.json +4 -1
- package/templates/common/skills/en/agent-browser.md +258 -0
- package/templates/common/skills/zh-CN/agent-browser.md +260 -0
- package/dist/chunks/claude-config.mjs +0 -228
- package/dist/chunks/features2.mjs +0 -661
- package/dist/chunks/json-config.mjs +0 -59
- package/dist/chunks/mcp-doctor.mjs +0 -160
- package/dist/chunks/mcp-profile.mjs +0 -220
- package/dist/chunks/mcp-release.mjs +0 -138
- package/dist/chunks/shencha.mjs +0 -320
- package/dist/chunks/tools.mjs +0 -169
- package/dist/shared/ccjk.COdsoe-Y.mjs +0 -64
- package/dist/shared/ccjk.DwDtZ5cK.mjs +0 -266
- package/dist/shared/ccjk.n_AtlHzB.mjs +0 -186
package/dist/chunks/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import './init.mjs';
|
|
2
|
-
import { CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CCJK_GROUPS_DIR, AIDER_DIR, AIDER_CONFIG_FILE, AIDER_ENV_FILE, CODEX_AUTH_FILE, CODEX_DIR, CODEX_CONFIG_FILE, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, CONTINUE_DIR, CONTINUE_CONFIG_FILE } from './constants.mjs';
|
|
2
|
+
import { CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CCJK_GROUPS_DIR, AIDER_DIR, AIDER_CONFIG_FILE, AIDER_ENV_FILE, CODEX_AUTH_FILE, CODEX_DIR, CODEX_CONFIG_FILE, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, CONTINUE_DIR, CONTINUE_CONFIG_FILE, CURSOR_CONFIG_FILE, CLINE_CONFIG_FILE, CLAUDE_DIR, CURSOR_DIR, CLINE_DIR, CODE_TOOL_TYPES, CODE_TOOL_INFO } from './constants.mjs';
|
|
3
3
|
import { S as STATUS, r as renderProgressBar, s as sectionDivider, C as COLORS } from '../shared/ccjk.BhKlRJ0h.mjs';
|
|
4
|
-
import './claude-config.mjs';
|
|
5
4
|
import { r as readCodexConfig, b as backupCodexComplete, w as writeCodexConfig, a as writeAuthFile, d as detectConfigManagementMode } from './codex.mjs';
|
|
6
5
|
import { detectAllConfigs } from './config-consolidator.mjs';
|
|
7
|
-
import '../shared/ccjk.
|
|
6
|
+
import '../shared/ccjk.ByTIGCUC.mjs';
|
|
8
7
|
import { homedir } from 'node:os';
|
|
9
|
-
import
|
|
8
|
+
import process__default, { env } from 'node:process';
|
|
10
9
|
import ansis from 'ansis';
|
|
11
10
|
import ora from 'ora';
|
|
12
11
|
import { exec } from 'tinyexec';
|
|
@@ -21,11 +20,10 @@ import { join } from 'pathe';
|
|
|
21
20
|
import { i18n, ensureI18nInitialized } from './index2.mjs';
|
|
22
21
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
23
22
|
import inquirer from 'inquirer';
|
|
24
|
-
import { readJsonConfig } from './
|
|
23
|
+
import { r as readJsonConfig } from './ccjk-config.mjs';
|
|
25
24
|
import { a as addNumbersToChoices, p as promptBoolean } from '../shared/ccjk.DhBeLRzf.mjs';
|
|
26
25
|
import { pathExists } from 'fs-extra';
|
|
27
26
|
import { m as moveToTrash } from '../shared/ccjk.DGjQxTq_.mjs';
|
|
28
|
-
import '../shared/ccjk.n_AtlHzB.mjs';
|
|
29
27
|
|
|
30
28
|
const loadedPlugins = /* @__PURE__ */ new Map();
|
|
31
29
|
const PLUGIN_CONFIG_FILE = join(CCJK_PLUGINS_DIR, "plugins.json");
|
|
@@ -323,6 +321,831 @@ async function initializePlugins() {
|
|
|
323
321
|
}
|
|
324
322
|
}
|
|
325
323
|
|
|
324
|
+
const cloudSyncSkill = {
|
|
325
|
+
id: "cloud-sync",
|
|
326
|
+
name: {
|
|
327
|
+
"en": "Cloud Sync",
|
|
328
|
+
"zh-CN": "\u4E91\u540C\u6B65\u7BA1\u7406"
|
|
329
|
+
},
|
|
330
|
+
description: {
|
|
331
|
+
"en": "Cross-device synchronization for configurations, skills, and workflows",
|
|
332
|
+
"zh-CN": "\u8DE8\u8BBE\u5907\u540C\u6B65\u914D\u7F6E\u3001\u6280\u80FD\u548C\u5DE5\u4F5C\u6D41"
|
|
333
|
+
},
|
|
334
|
+
category: "devops",
|
|
335
|
+
triggers: ["/sync", "/cloud", "/backup", "/restore"],
|
|
336
|
+
enabled: true,
|
|
337
|
+
version: "1.0.0",
|
|
338
|
+
author: "CCJK Team",
|
|
339
|
+
tags: ["cloud", "sync", "backup", "restore", "configuration"],
|
|
340
|
+
template: `# Cloud Sync Management
|
|
341
|
+
|
|
342
|
+
## Overview
|
|
343
|
+
|
|
344
|
+
Cloud Sync provides seamless cross-device synchronization for your CCJK environment.
|
|
345
|
+
Keep your configurations, skills, and workflows in sync across all your development machines.
|
|
346
|
+
|
|
347
|
+
## Features
|
|
348
|
+
|
|
349
|
+
### Configuration Sync
|
|
350
|
+
- Synchronize CCJK settings across devices
|
|
351
|
+
- Preserve API configurations securely
|
|
352
|
+
- Sync MCP service configurations
|
|
353
|
+
|
|
354
|
+
### Skills Sync
|
|
355
|
+
- Share custom skills between machines
|
|
356
|
+
- Version control for skill updates
|
|
357
|
+
- Conflict resolution for concurrent edits
|
|
358
|
+
|
|
359
|
+
### Workflow Sync
|
|
360
|
+
- Sync workflow states and progress
|
|
361
|
+
- Share workflow templates
|
|
362
|
+
- Collaborative workflow management
|
|
363
|
+
|
|
364
|
+
### Conflict Resolution
|
|
365
|
+
- Intelligent merge for non-conflicting changes
|
|
366
|
+
- Manual resolution UI for conflicts
|
|
367
|
+
- Version history for rollback
|
|
368
|
+
|
|
369
|
+
## Commands
|
|
370
|
+
|
|
371
|
+
### Sync Status
|
|
372
|
+
\`\`\`bash
|
|
373
|
+
/sync status
|
|
374
|
+
\`\`\`
|
|
375
|
+
View current synchronization status, pending changes, and last sync time.
|
|
376
|
+
|
|
377
|
+
### Push Changes
|
|
378
|
+
\`\`\`bash
|
|
379
|
+
/sync push # Push all pending changes
|
|
380
|
+
/sync push --config # Push configuration only
|
|
381
|
+
/sync push --skills # Push skills only
|
|
382
|
+
/sync push --workflows # Push workflows only
|
|
383
|
+
\`\`\`
|
|
384
|
+
|
|
385
|
+
### Pull Changes
|
|
386
|
+
\`\`\`bash
|
|
387
|
+
/sync pull # Pull all remote changes
|
|
388
|
+
/sync pull --force # Force pull, overwrite local
|
|
389
|
+
/sync pull --merge # Merge with local changes
|
|
390
|
+
\`\`\`
|
|
391
|
+
|
|
392
|
+
### Configure Cloud Storage
|
|
393
|
+
\`\`\`bash
|
|
394
|
+
/sync config # Interactive configuration
|
|
395
|
+
/sync config github # Configure GitHub Gist
|
|
396
|
+
/sync config webdav # Configure WebDAV
|
|
397
|
+
/sync config local # Configure local folder sync
|
|
398
|
+
\`\`\`
|
|
399
|
+
|
|
400
|
+
### Backup Management
|
|
401
|
+
\`\`\`bash
|
|
402
|
+
/backup create # Create full backup
|
|
403
|
+
/backup create --name "v1.0" # Create named backup
|
|
404
|
+
/backup list # List all backups
|
|
405
|
+
/backup restore <id> # Restore from backup
|
|
406
|
+
/backup delete <id> # Delete a backup
|
|
407
|
+
\`\`\`
|
|
408
|
+
|
|
409
|
+
### Conflict Management
|
|
410
|
+
\`\`\`bash
|
|
411
|
+
/sync conflicts # List all conflicts
|
|
412
|
+
/sync resolve <id> --local # Keep local version
|
|
413
|
+
/sync resolve <id> --remote # Keep remote version
|
|
414
|
+
/sync resolve <id> --merge # Manual merge
|
|
415
|
+
\`\`\`
|
|
416
|
+
|
|
417
|
+
## Supported Cloud Storage
|
|
418
|
+
|
|
419
|
+
### GitHub Gist (Recommended)
|
|
420
|
+
- Free and reliable
|
|
421
|
+
- Version history built-in
|
|
422
|
+
- Easy to set up with personal access token
|
|
423
|
+
|
|
424
|
+
\`\`\`bash
|
|
425
|
+
/sync config github
|
|
426
|
+
# Enter your GitHub personal access token
|
|
427
|
+
# Token needs 'gist' scope
|
|
428
|
+
\`\`\`
|
|
429
|
+
|
|
430
|
+
### WebDAV
|
|
431
|
+
Compatible with:
|
|
432
|
+
- Nutstore (\u575A\u679C\u4E91)
|
|
433
|
+
- Nextcloud
|
|
434
|
+
- ownCloud
|
|
435
|
+
- Any WebDAV server
|
|
436
|
+
|
|
437
|
+
\`\`\`bash
|
|
438
|
+
/sync config webdav
|
|
439
|
+
# Enter WebDAV URL, username, and password
|
|
440
|
+
\`\`\`
|
|
441
|
+
|
|
442
|
+
### Local Folder
|
|
443
|
+
For manual sync via Dropbox, OneDrive, etc.
|
|
444
|
+
|
|
445
|
+
\`\`\`bash
|
|
446
|
+
/sync config local
|
|
447
|
+
# Enter path to sync folder
|
|
448
|
+
\`\`\`
|
|
449
|
+
|
|
450
|
+
## Usage Examples
|
|
451
|
+
|
|
452
|
+
### First-Time Setup
|
|
453
|
+
\`\`\`bash
|
|
454
|
+
# 1. Configure cloud storage
|
|
455
|
+
/sync config github
|
|
456
|
+
|
|
457
|
+
# 2. Push initial configuration
|
|
458
|
+
/sync push --all
|
|
459
|
+
|
|
460
|
+
# 3. Verify sync status
|
|
461
|
+
/sync status
|
|
462
|
+
\`\`\`
|
|
463
|
+
|
|
464
|
+
### Daily Workflow
|
|
465
|
+
\`\`\`bash
|
|
466
|
+
# Start of day: pull latest changes
|
|
467
|
+
/sync pull
|
|
468
|
+
|
|
469
|
+
# End of day: push your changes
|
|
470
|
+
/sync push
|
|
471
|
+
\`\`\`
|
|
472
|
+
|
|
473
|
+
### Handling Conflicts
|
|
474
|
+
\`\`\`bash
|
|
475
|
+
# Check for conflicts after pull
|
|
476
|
+
/sync conflicts
|
|
477
|
+
|
|
478
|
+
# Review and resolve each conflict
|
|
479
|
+
/sync resolve skill-123 --merge
|
|
480
|
+
\`\`\`
|
|
481
|
+
|
|
482
|
+
### Backup Before Major Changes
|
|
483
|
+
\`\`\`bash
|
|
484
|
+
# Create backup before risky operations
|
|
485
|
+
/backup create --name "before-upgrade"
|
|
486
|
+
|
|
487
|
+
# If something goes wrong
|
|
488
|
+
/backup restore before-upgrade
|
|
489
|
+
\`\`\`
|
|
490
|
+
|
|
491
|
+
## Security
|
|
492
|
+
|
|
493
|
+
### Sensitive Data Handling
|
|
494
|
+
- API keys are encrypted before sync
|
|
495
|
+
- OAuth tokens are never synced (re-authenticate on each device)
|
|
496
|
+
- Local encryption key derived from device-specific identifier
|
|
497
|
+
|
|
498
|
+
### Access Control
|
|
499
|
+
- GitHub: Uses personal access token with minimal scope
|
|
500
|
+
- WebDAV: Supports app-specific passwords
|
|
501
|
+
- All connections use HTTPS/TLS
|
|
502
|
+
|
|
503
|
+
## Best Practices
|
|
504
|
+
|
|
505
|
+
1. **Regular Syncing**: Sync at least daily to avoid large conflicts
|
|
506
|
+
2. **Named Backups**: Create named backups before major changes
|
|
507
|
+
3. **Review Conflicts**: Don't auto-resolve conflicts without review
|
|
508
|
+
4. **Secure Tokens**: Use app-specific passwords when available
|
|
509
|
+
5. **Test Restore**: Periodically test backup restoration
|
|
510
|
+
|
|
511
|
+
## Troubleshooting
|
|
512
|
+
|
|
513
|
+
### Sync Failed
|
|
514
|
+
\`\`\`bash
|
|
515
|
+
# Check connection
|
|
516
|
+
/sync status --verbose
|
|
517
|
+
|
|
518
|
+
# Force re-authentication
|
|
519
|
+
/sync config github --reauth
|
|
520
|
+
\`\`\`
|
|
521
|
+
|
|
522
|
+
### Conflicts Won't Resolve
|
|
523
|
+
\`\`\`bash
|
|
524
|
+
# Reset sync state
|
|
525
|
+
/sync reset
|
|
526
|
+
|
|
527
|
+
# Re-initialize from remote
|
|
528
|
+
/sync pull --force
|
|
529
|
+
\`\`\`
|
|
530
|
+
|
|
531
|
+
### Backup Corrupted
|
|
532
|
+
\`\`\`bash
|
|
533
|
+
# List all backups with integrity check
|
|
534
|
+
/backup list --verify
|
|
535
|
+
|
|
536
|
+
# Delete corrupted backup
|
|
537
|
+
/backup delete <corrupted-id>
|
|
538
|
+
\`\`\`
|
|
539
|
+
`
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
const marketplaceSkill = {
|
|
543
|
+
id: "mcp-marketplace",
|
|
544
|
+
name: {
|
|
545
|
+
"en": "MCP Marketplace",
|
|
546
|
+
"zh-CN": "MCP \u63D2\u4EF6\u5E02\u573A"
|
|
547
|
+
},
|
|
548
|
+
description: {
|
|
549
|
+
"en": "Discover, install and manage MCP plugins",
|
|
550
|
+
"zh-CN": "\u53D1\u73B0\u3001\u5B89\u88C5\u548C\u7BA1\u7406 MCP \u63D2\u4EF6"
|
|
551
|
+
},
|
|
552
|
+
category: "dev",
|
|
553
|
+
triggers: ["/market", "/mcp", "/plugins", "/install"],
|
|
554
|
+
enabled: true,
|
|
555
|
+
version: "1.0.0",
|
|
556
|
+
author: "CCJK Team",
|
|
557
|
+
tags: ["mcp", "marketplace", "plugins", "extensions", "install"],
|
|
558
|
+
template: `# MCP Marketplace Skill
|
|
559
|
+
|
|
560
|
+
## Overview
|
|
561
|
+
|
|
562
|
+
The MCP Marketplace provides a centralized hub for discovering, installing, and managing
|
|
563
|
+
Model Context Protocol (MCP) plugins. It integrates seamlessly with Claude Code and CCJK
|
|
564
|
+
to enhance your AI-assisted development workflow.
|
|
565
|
+
|
|
566
|
+
## Features
|
|
567
|
+
|
|
568
|
+
- **Browse Marketplace**: Discover trending and recommended plugins
|
|
569
|
+
- **Search Plugins**: Search by name, category, or tags
|
|
570
|
+
- **Install Management**: One-click install, update, and uninstall
|
|
571
|
+
- **Security Scanning**: Automatic security checks before installation
|
|
572
|
+
- **Dependency Resolution**: Automatic handling of plugin dependencies
|
|
573
|
+
|
|
574
|
+
## Commands
|
|
575
|
+
|
|
576
|
+
### Search Plugins
|
|
577
|
+
\`\`\`bash
|
|
578
|
+
# Search by keyword
|
|
579
|
+
ccjk market search <query>
|
|
580
|
+
|
|
581
|
+
# Search with filters
|
|
582
|
+
ccjk market search <query> --category ai-tools
|
|
583
|
+
ccjk market search <query> --tag productivity
|
|
584
|
+
\`\`\`
|
|
585
|
+
|
|
586
|
+
### Browse Marketplace
|
|
587
|
+
\`\`\`bash
|
|
588
|
+
# View trending plugins
|
|
589
|
+
ccjk market trending
|
|
590
|
+
|
|
591
|
+
# Browse by category
|
|
592
|
+
ccjk market browse --category dev-tools
|
|
593
|
+
ccjk market browse --category ai-tools
|
|
594
|
+
ccjk market browse --category data-processing
|
|
595
|
+
\`\`\`
|
|
596
|
+
|
|
597
|
+
### Install Plugins
|
|
598
|
+
\`\`\`bash
|
|
599
|
+
# Install a plugin
|
|
600
|
+
ccjk market install <plugin-id>
|
|
601
|
+
|
|
602
|
+
# Install specific version
|
|
603
|
+
ccjk market install <plugin-id>@1.2.0
|
|
604
|
+
|
|
605
|
+
# Install with dependencies
|
|
606
|
+
ccjk market install <plugin-id> --with-deps
|
|
607
|
+
|
|
608
|
+
# Force reinstall
|
|
609
|
+
ccjk market install <plugin-id> --force
|
|
610
|
+
\`\`\`
|
|
611
|
+
|
|
612
|
+
### Update Plugins
|
|
613
|
+
\`\`\`bash
|
|
614
|
+
# Update all plugins
|
|
615
|
+
ccjk market update
|
|
616
|
+
|
|
617
|
+
# Update specific plugin
|
|
618
|
+
ccjk market update <plugin-id>
|
|
619
|
+
|
|
620
|
+
# Check for updates
|
|
621
|
+
ccjk market check-updates
|
|
622
|
+
\`\`\`
|
|
623
|
+
|
|
624
|
+
### Manage Installed Plugins
|
|
625
|
+
\`\`\`bash
|
|
626
|
+
# List installed plugins
|
|
627
|
+
ccjk market list
|
|
628
|
+
|
|
629
|
+
# Show plugin details
|
|
630
|
+
ccjk market info <plugin-id>
|
|
631
|
+
|
|
632
|
+
# Uninstall plugin
|
|
633
|
+
ccjk market uninstall <plugin-id>
|
|
634
|
+
|
|
635
|
+
# Enable/disable plugin
|
|
636
|
+
ccjk market enable <plugin-id>
|
|
637
|
+
ccjk market disable <plugin-id>
|
|
638
|
+
\`\`\`
|
|
639
|
+
|
|
640
|
+
## Categories
|
|
641
|
+
|
|
642
|
+
### AI Tools
|
|
643
|
+
AI-enhanced functionality for code generation, analysis, and optimization.
|
|
644
|
+
- Code completion enhancers
|
|
645
|
+
- AI-powered refactoring
|
|
646
|
+
- Intelligent code review
|
|
647
|
+
|
|
648
|
+
### Development Tools
|
|
649
|
+
Tools to assist with coding and development workflows.
|
|
650
|
+
- Language servers
|
|
651
|
+
- Linters and formatters
|
|
652
|
+
- Build tool integrations
|
|
653
|
+
|
|
654
|
+
### Productivity Tools
|
|
655
|
+
Enhance your development efficiency.
|
|
656
|
+
- Task automation
|
|
657
|
+
- Snippet managers
|
|
658
|
+
- Documentation generators
|
|
659
|
+
|
|
660
|
+
### Data Processing
|
|
661
|
+
Data transformation and analysis tools.
|
|
662
|
+
- Data converters
|
|
663
|
+
- Schema validators
|
|
664
|
+
- API integrators
|
|
665
|
+
|
|
666
|
+
### Integrations
|
|
667
|
+
Third-party service integrations.
|
|
668
|
+
- Cloud service connectors
|
|
669
|
+
- Database integrations
|
|
670
|
+
- CI/CD tool bridges
|
|
671
|
+
|
|
672
|
+
## Security
|
|
673
|
+
|
|
674
|
+
All plugins undergo security scanning before installation:
|
|
675
|
+
|
|
676
|
+
### Security Checks
|
|
677
|
+
- **Permission Analysis**: Detects dangerous permission requests
|
|
678
|
+
- **Vulnerability Scanning**: Checks against known CVE databases
|
|
679
|
+
- **Code Pattern Analysis**: Identifies suspicious code patterns
|
|
680
|
+
- **Dependency Audit**: Scans dependencies for vulnerabilities
|
|
681
|
+
|
|
682
|
+
### Security Levels
|
|
683
|
+
- \`verified\` - Officially verified by CCJK team
|
|
684
|
+
- \`community\` - Community-reviewed plugin
|
|
685
|
+
- \`unverified\` - New or unreviewed plugin
|
|
686
|
+
|
|
687
|
+
### Skip Security (Not Recommended)
|
|
688
|
+
\`\`\`bash
|
|
689
|
+
ccjk market install <plugin-id> --skip-verification
|
|
690
|
+
\`\`\`
|
|
691
|
+
|
|
692
|
+
## Configuration
|
|
693
|
+
|
|
694
|
+
### Plugin Settings
|
|
695
|
+
\`\`\`bash
|
|
696
|
+
# Configure plugin
|
|
697
|
+
ccjk market config <plugin-id> --set key=value
|
|
698
|
+
|
|
699
|
+
# View plugin config
|
|
700
|
+
ccjk market config <plugin-id> --list
|
|
701
|
+
|
|
702
|
+
# Reset plugin config
|
|
703
|
+
ccjk market config <plugin-id> --reset
|
|
704
|
+
\`\`\`
|
|
705
|
+
|
|
706
|
+
### Global Settings
|
|
707
|
+
\`\`\`bash
|
|
708
|
+
# Set default registry
|
|
709
|
+
ccjk market registry set <url>
|
|
710
|
+
|
|
711
|
+
# Enable auto-updates
|
|
712
|
+
ccjk market settings --auto-update true
|
|
713
|
+
|
|
714
|
+
# Set security level
|
|
715
|
+
ccjk market settings --security-level strict
|
|
716
|
+
\`\`\`
|
|
717
|
+
|
|
718
|
+
## Plugin Development
|
|
719
|
+
|
|
720
|
+
### Create a Plugin
|
|
721
|
+
\`\`\`bash
|
|
722
|
+
ccjk market create <plugin-name>
|
|
723
|
+
\`\`\`
|
|
724
|
+
|
|
725
|
+
### Publish to Marketplace
|
|
726
|
+
\`\`\`bash
|
|
727
|
+
ccjk market publish
|
|
728
|
+
\`\`\`
|
|
729
|
+
|
|
730
|
+
### Plugin Manifest Example
|
|
731
|
+
\`\`\`json
|
|
732
|
+
{
|
|
733
|
+
"packageId": "my-plugin",
|
|
734
|
+
"name": "My Plugin",
|
|
735
|
+
"version": "1.0.0",
|
|
736
|
+
"description": "A useful MCP plugin",
|
|
737
|
+
"author": "Your Name",
|
|
738
|
+
"license": "MIT",
|
|
739
|
+
"keywords": ["mcp", "plugin"],
|
|
740
|
+
"mcpServer": {
|
|
741
|
+
"command": "node",
|
|
742
|
+
"args": ["dist/server.js"]
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
\`\`\`
|
|
746
|
+
|
|
747
|
+
## Troubleshooting
|
|
748
|
+
|
|
749
|
+
### Installation Issues
|
|
750
|
+
\`\`\`bash
|
|
751
|
+
# Clear cache and retry
|
|
752
|
+
ccjk market cache clear
|
|
753
|
+
ccjk market install <plugin-id>
|
|
754
|
+
|
|
755
|
+
# Verbose installation
|
|
756
|
+
ccjk market install <plugin-id> --verbose
|
|
757
|
+
\`\`\`
|
|
758
|
+
|
|
759
|
+
### Dependency Conflicts
|
|
760
|
+
\`\`\`bash
|
|
761
|
+
# Check dependencies
|
|
762
|
+
ccjk market deps <plugin-id>
|
|
763
|
+
|
|
764
|
+
# Force resolve conflicts
|
|
765
|
+
ccjk market install <plugin-id> --force-deps
|
|
766
|
+
\`\`\`
|
|
767
|
+
|
|
768
|
+
### Rollback
|
|
769
|
+
\`\`\`bash
|
|
770
|
+
# Rollback to previous version
|
|
771
|
+
ccjk market rollback <plugin-id>
|
|
772
|
+
|
|
773
|
+
# Rollback to specific version
|
|
774
|
+
ccjk market rollback <plugin-id>@1.0.0
|
|
775
|
+
\`\`\`
|
|
776
|
+
|
|
777
|
+
## Best Practices
|
|
778
|
+
|
|
779
|
+
1. **Review Before Install**: Always check plugin ratings and reviews
|
|
780
|
+
2. **Keep Updated**: Regularly update plugins for security patches
|
|
781
|
+
3. **Minimal Plugins**: Only install plugins you actively use
|
|
782
|
+
4. **Backup Config**: Export your plugin configuration before major changes
|
|
783
|
+
5. **Report Issues**: Help improve the ecosystem by reporting bugs
|
|
784
|
+
|
|
785
|
+
## Integration with Claude Code
|
|
786
|
+
|
|
787
|
+
The marketplace integrates directly with Claude Code's MCP system:
|
|
788
|
+
|
|
789
|
+
\`\`\`bash
|
|
790
|
+
# Installed plugins are automatically available in Claude Code
|
|
791
|
+
claude --mcp-list # Shows marketplace-installed plugins
|
|
792
|
+
|
|
793
|
+
# Plugins can be used in conversations
|
|
794
|
+
# Example: Using a database plugin
|
|
795
|
+
"Connect to my PostgreSQL database and show tables"
|
|
796
|
+
\`\`\`
|
|
797
|
+
`
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
const browserSkill = {
|
|
801
|
+
id: "browser-automation",
|
|
802
|
+
name: {
|
|
803
|
+
"en": "Browser Automation",
|
|
804
|
+
"zh-CN": "\u6D4F\u89C8\u5668\u81EA\u52A8\u5316"
|
|
805
|
+
},
|
|
806
|
+
description: {
|
|
807
|
+
"en": "Zero-config headless browser automation for AI agents",
|
|
808
|
+
"zh-CN": "\u96F6\u914D\u7F6E\u7684 AI \u4EE3\u7406\u6D4F\u89C8\u5668\u81EA\u52A8\u5316\u5DE5\u5177"
|
|
809
|
+
},
|
|
810
|
+
category: "dev",
|
|
811
|
+
triggers: ["/browser", "/web", "/browse"],
|
|
812
|
+
enabled: true,
|
|
813
|
+
version: "1.0.0",
|
|
814
|
+
author: "CCJK",
|
|
815
|
+
tags: ["browser", "automation", "web", "scraping", "testing"],
|
|
816
|
+
template: `# Browser Automation Skill
|
|
817
|
+
|
|
818
|
+
## Overview
|
|
819
|
+
This skill provides zero-config headless browser automation powered by agent-browser.
|
|
820
|
+
|
|
821
|
+
## Quick Start
|
|
822
|
+
|
|
823
|
+
### Open a URL
|
|
824
|
+
\`\`\`bash
|
|
825
|
+
ccjk browser open https://example.com
|
|
826
|
+
\`\`\`
|
|
827
|
+
|
|
828
|
+
### Get Page Snapshot (AI-optimized)
|
|
829
|
+
\`\`\`bash
|
|
830
|
+
ccjk browser snapshot -i # Interactive elements only
|
|
831
|
+
ccjk browser snapshot -c # Compact output
|
|
832
|
+
\`\`\`
|
|
833
|
+
|
|
834
|
+
### Interact with Elements
|
|
835
|
+
\`\`\`bash
|
|
836
|
+
ccjk browser click @e1 # Click by ref
|
|
837
|
+
ccjk browser fill @e2 "text" # Fill input
|
|
838
|
+
ccjk browser get text @e3 # Get text content
|
|
839
|
+
\`\`\`
|
|
840
|
+
|
|
841
|
+
### Screenshots
|
|
842
|
+
\`\`\`bash
|
|
843
|
+
ccjk browser screenshot # Viewport
|
|
844
|
+
ccjk browser screenshot --full # Full page
|
|
845
|
+
ccjk browser screenshot output.png # Custom path
|
|
846
|
+
\`\`\`
|
|
847
|
+
|
|
848
|
+
### Wait for Conditions
|
|
849
|
+
\`\`\`bash
|
|
850
|
+
ccjk browser wait 2000 # Wait 2 seconds
|
|
851
|
+
ccjk browser wait @e1 # Wait for element
|
|
852
|
+
ccjk browser wait --text "Success" # Wait for text
|
|
853
|
+
\`\`\`
|
|
854
|
+
|
|
855
|
+
## Common Workflows
|
|
856
|
+
|
|
857
|
+
### Login Flow
|
|
858
|
+
\`\`\`bash
|
|
859
|
+
ccjk browser open https://app.example.com/login
|
|
860
|
+
ccjk browser snapshot -i
|
|
861
|
+
ccjk browser fill @e1 "username"
|
|
862
|
+
ccjk browser fill @e2 "password"
|
|
863
|
+
ccjk browser click @e3
|
|
864
|
+
ccjk browser wait --text "Dashboard"
|
|
865
|
+
\`\`\`
|
|
866
|
+
|
|
867
|
+
### Form Submission
|
|
868
|
+
\`\`\`bash
|
|
869
|
+
ccjk browser open https://example.com/form
|
|
870
|
+
ccjk browser snapshot -i
|
|
871
|
+
ccjk browser fill @e1 "John Doe"
|
|
872
|
+
ccjk browser fill @e2 "john@example.com"
|
|
873
|
+
ccjk browser click @e3 # Submit button
|
|
874
|
+
ccjk browser wait --text "Thank you"
|
|
875
|
+
\`\`\`
|
|
876
|
+
|
|
877
|
+
### Web Scraping
|
|
878
|
+
\`\`\`bash
|
|
879
|
+
ccjk browser open https://example.com/products
|
|
880
|
+
ccjk browser snapshot --json > products.json
|
|
881
|
+
\`\`\`
|
|
882
|
+
|
|
883
|
+
## Session Management
|
|
884
|
+
|
|
885
|
+
### Parallel Sessions
|
|
886
|
+
\`\`\`bash
|
|
887
|
+
ccjk browser --session s1 open site-a.com
|
|
888
|
+
ccjk browser --session s2 open site-b.com
|
|
889
|
+
ccjk browser session list
|
|
890
|
+
\`\`\`
|
|
891
|
+
|
|
892
|
+
## Debug Mode
|
|
893
|
+
\`\`\`bash
|
|
894
|
+
ccjk browser open example.com --headed # Show browser window
|
|
895
|
+
\`\`\`
|
|
896
|
+
|
|
897
|
+
## Element References
|
|
898
|
+
|
|
899
|
+
The snapshot command returns elements with refs like \`@e1\`, \`@e2\`, etc.
|
|
900
|
+
Use these refs to interact with specific elements:
|
|
901
|
+
|
|
902
|
+
- \`@e1\` - First interactive element
|
|
903
|
+
- \`@e2\` - Second interactive element
|
|
904
|
+
- etc.
|
|
905
|
+
|
|
906
|
+
## Tips for AI Agents
|
|
907
|
+
|
|
908
|
+
1. Always run \`snapshot -i\` first to get interactive elements
|
|
909
|
+
2. Use refs from snapshot output for interactions
|
|
910
|
+
3. Wait for page loads with \`wait --text\` or \`wait @ref\`
|
|
911
|
+
4. Use \`--json\` for programmatic parsing
|
|
912
|
+
5. Close browser when done to free resources
|
|
913
|
+
`
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
const workflowSkill = {
|
|
917
|
+
id: "workflow-automation",
|
|
918
|
+
name: {
|
|
919
|
+
"en": "Workflow Automation",
|
|
920
|
+
"zh-CN": "\u5DE5\u4F5C\u6D41\u81EA\u52A8\u5316"
|
|
921
|
+
},
|
|
922
|
+
description: {
|
|
923
|
+
"en": "Subagent-driven development workflow with two-stage review",
|
|
924
|
+
"zh-CN": "Subagent \u9A71\u52A8\u7684\u4E24\u9636\u6BB5\u5BA1\u67E5\u5F00\u53D1\u5DE5\u4F5C\u6D41"
|
|
925
|
+
},
|
|
926
|
+
category: "dev",
|
|
927
|
+
triggers: ["/workflow", "/wf", "/flow"],
|
|
928
|
+
enabled: true,
|
|
929
|
+
version: "1.0.0",
|
|
930
|
+
author: "CCJK",
|
|
931
|
+
tags: ["workflow", "subagent", "review", "automation", "ci"],
|
|
932
|
+
template: `# Workflow Automation Skill
|
|
933
|
+
|
|
934
|
+
## Overview
|
|
935
|
+
|
|
936
|
+
This skill provides Subagent-driven development workflows with automatic two-stage review.
|
|
937
|
+
Inspired by Anthropic's Superpowers architecture for autonomous agent collaboration.
|
|
938
|
+
|
|
939
|
+
## Core Concepts
|
|
940
|
+
|
|
941
|
+
### Two-Stage Review
|
|
942
|
+
1. **Draft Stage**: Subagents work on tasks in parallel
|
|
943
|
+
2. **Review Stage**: Automated quality checks and validation
|
|
944
|
+
3. **Finalize Stage**: Merge approved changes
|
|
945
|
+
|
|
946
|
+
### Workflow States
|
|
947
|
+
- \`idle\` \u2192 \`planning\` \u2192 \`executing\` \u2192 \`reviewing\` \u2192 \`finalizing\` \u2192 \`completed\`
|
|
948
|
+
|
|
949
|
+
## Quick Start
|
|
950
|
+
|
|
951
|
+
### Create a Workflow
|
|
952
|
+
\`\`\`bash
|
|
953
|
+
ccjk workflow create "Implement user authentication"
|
|
954
|
+
\`\`\`
|
|
955
|
+
|
|
956
|
+
### Start Workflow Execution
|
|
957
|
+
\`\`\`bash
|
|
958
|
+
ccjk workflow start <workflow-id>
|
|
959
|
+
\`\`\`
|
|
960
|
+
|
|
961
|
+
### Check Workflow Status
|
|
962
|
+
\`\`\`bash
|
|
963
|
+
ccjk workflow status <workflow-id>
|
|
964
|
+
ccjk workflow list
|
|
965
|
+
\`\`\`
|
|
966
|
+
|
|
967
|
+
## Task Management
|
|
968
|
+
|
|
969
|
+
### Add Tasks to Workflow
|
|
970
|
+
\`\`\`bash
|
|
971
|
+
ccjk workflow task add <workflow-id> "Create login component"
|
|
972
|
+
ccjk workflow task add <workflow-id> "Add authentication API" --depends-on task-1
|
|
973
|
+
\`\`\`
|
|
974
|
+
|
|
975
|
+
### Task Priorities
|
|
976
|
+
\`\`\`bash
|
|
977
|
+
ccjk workflow task add <workflow-id> "Fix security bug" --priority critical
|
|
978
|
+
ccjk workflow task add <workflow-id> "Add tests" --priority high
|
|
979
|
+
\`\`\`
|
|
980
|
+
|
|
981
|
+
### View Task Dependencies
|
|
982
|
+
\`\`\`bash
|
|
983
|
+
ccjk workflow tasks <workflow-id> --graph
|
|
984
|
+
\`\`\`
|
|
985
|
+
|
|
986
|
+
## Subagent Scheduling
|
|
987
|
+
|
|
988
|
+
### Automatic Scheduling
|
|
989
|
+
The scheduler automatically:
|
|
990
|
+
- Assigns tasks to available subagents
|
|
991
|
+
- Respects task dependencies
|
|
992
|
+
- Balances workload across agents
|
|
993
|
+
- Handles failures with retry logic
|
|
994
|
+
|
|
995
|
+
### Manual Assignment
|
|
996
|
+
\`\`\`bash
|
|
997
|
+
ccjk workflow assign <task-id> <subagent-id>
|
|
998
|
+
\`\`\`
|
|
999
|
+
|
|
1000
|
+
### View Subagent Status
|
|
1001
|
+
\`\`\`bash
|
|
1002
|
+
ccjk workflow agents
|
|
1003
|
+
ccjk workflow agent <agent-id> --tasks
|
|
1004
|
+
\`\`\`
|
|
1005
|
+
|
|
1006
|
+
## Review System
|
|
1007
|
+
|
|
1008
|
+
### Automatic Review
|
|
1009
|
+
When tasks complete, the system automatically:
|
|
1010
|
+
1. Runs requirement verification
|
|
1011
|
+
2. Performs code quality checks
|
|
1012
|
+
3. Validates test coverage
|
|
1013
|
+
4. Checks for security issues
|
|
1014
|
+
|
|
1015
|
+
### Review Results
|
|
1016
|
+
\`\`\`bash
|
|
1017
|
+
ccjk workflow review <workflow-id>
|
|
1018
|
+
ccjk workflow review <task-id> --detailed
|
|
1019
|
+
\`\`\`
|
|
1020
|
+
|
|
1021
|
+
### Manual Review Override
|
|
1022
|
+
\`\`\`bash
|
|
1023
|
+
ccjk workflow approve <task-id>
|
|
1024
|
+
ccjk workflow reject <task-id> --reason "Missing tests"
|
|
1025
|
+
\`\`\`
|
|
1026
|
+
|
|
1027
|
+
## Quality Checks
|
|
1028
|
+
|
|
1029
|
+
### Built-in Checks
|
|
1030
|
+
- **Naming Conventions**: camelCase, PascalCase validation
|
|
1031
|
+
- **Code Structure**: Function length, nesting depth
|
|
1032
|
+
- **Error Handling**: Try-catch coverage
|
|
1033
|
+
- **Documentation**: JSDoc/TSDoc presence
|
|
1034
|
+
- **Style**: Consistent formatting
|
|
1035
|
+
|
|
1036
|
+
### Custom Checks
|
|
1037
|
+
\`\`\`bash
|
|
1038
|
+
ccjk workflow check add "No console.log" --pattern "console\\.log"
|
|
1039
|
+
ccjk workflow check add "Max file size" --max-lines 500
|
|
1040
|
+
\`\`\`
|
|
1041
|
+
|
|
1042
|
+
## Workflow Templates
|
|
1043
|
+
|
|
1044
|
+
### Feature Development
|
|
1045
|
+
\`\`\`bash
|
|
1046
|
+
ccjk workflow create --template feature "Add dark mode"
|
|
1047
|
+
\`\`\`
|
|
1048
|
+
|
|
1049
|
+
### Bug Fix
|
|
1050
|
+
\`\`\`bash
|
|
1051
|
+
ccjk workflow create --template bugfix "Fix login timeout"
|
|
1052
|
+
\`\`\`
|
|
1053
|
+
|
|
1054
|
+
### Refactoring
|
|
1055
|
+
\`\`\`bash
|
|
1056
|
+
ccjk workflow create --template refactor "Migrate to TypeScript"
|
|
1057
|
+
\`\`\`
|
|
1058
|
+
|
|
1059
|
+
## Events and Hooks
|
|
1060
|
+
|
|
1061
|
+
### Available Events
|
|
1062
|
+
- \`workflow:created\`
|
|
1063
|
+
- \`workflow:started\`
|
|
1064
|
+
- \`task:assigned\`
|
|
1065
|
+
- \`task:completed\`
|
|
1066
|
+
- \`review:passed\`
|
|
1067
|
+
- \`review:failed\`
|
|
1068
|
+
- \`workflow:completed\`
|
|
1069
|
+
|
|
1070
|
+
### Add Hooks
|
|
1071
|
+
\`\`\`bash
|
|
1072
|
+
ccjk workflow hook add task:completed "npm test"
|
|
1073
|
+
ccjk workflow hook add review:passed "npm run lint"
|
|
1074
|
+
\`\`\`
|
|
1075
|
+
|
|
1076
|
+
## Best Practices
|
|
1077
|
+
|
|
1078
|
+
### 1. Break Down Large Tasks
|
|
1079
|
+
Split complex features into smaller, independent tasks that can run in parallel.
|
|
1080
|
+
|
|
1081
|
+
### 2. Define Clear Dependencies
|
|
1082
|
+
Use \`--depends-on\` to ensure tasks run in the correct order.
|
|
1083
|
+
|
|
1084
|
+
### 3. Set Appropriate Priorities
|
|
1085
|
+
- \`critical\`: Security fixes, blocking issues
|
|
1086
|
+
- \`high\`: Important features, bugs
|
|
1087
|
+
- \`medium\`: Regular development
|
|
1088
|
+
- \`low\`: Nice-to-have improvements
|
|
1089
|
+
|
|
1090
|
+
### 4. Review Before Merge
|
|
1091
|
+
Always check review results before finalizing:
|
|
1092
|
+
\`\`\`bash
|
|
1093
|
+
ccjk workflow review <workflow-id> --summary
|
|
1094
|
+
\`\`\`
|
|
1095
|
+
|
|
1096
|
+
### 5. Use Templates
|
|
1097
|
+
Create custom templates for recurring workflow patterns.
|
|
1098
|
+
|
|
1099
|
+
## Integration with Git
|
|
1100
|
+
|
|
1101
|
+
### Automatic Branch Management
|
|
1102
|
+
\`\`\`bash
|
|
1103
|
+
ccjk workflow create "Feature X" --branch feature/x
|
|
1104
|
+
\`\`\`
|
|
1105
|
+
|
|
1106
|
+
### Worktree Support
|
|
1107
|
+
Each subagent can work in isolated git worktrees:
|
|
1108
|
+
\`\`\`bash
|
|
1109
|
+
ccjk workflow start <id> --worktree
|
|
1110
|
+
\`\`\`
|
|
1111
|
+
|
|
1112
|
+
## Troubleshooting
|
|
1113
|
+
|
|
1114
|
+
### Stuck Workflow
|
|
1115
|
+
\`\`\`bash
|
|
1116
|
+
ccjk workflow diagnose <workflow-id>
|
|
1117
|
+
ccjk workflow retry <task-id>
|
|
1118
|
+
\`\`\`
|
|
1119
|
+
|
|
1120
|
+
### Cancel Workflow
|
|
1121
|
+
\`\`\`bash
|
|
1122
|
+
ccjk workflow cancel <workflow-id>
|
|
1123
|
+
ccjk workflow cancel <workflow-id> --force
|
|
1124
|
+
\`\`\`
|
|
1125
|
+
|
|
1126
|
+
### View Logs
|
|
1127
|
+
\`\`\`bash
|
|
1128
|
+
ccjk workflow logs <workflow-id>
|
|
1129
|
+
ccjk workflow logs <task-id> --tail 100
|
|
1130
|
+
\`\`\`
|
|
1131
|
+
`
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
const BUILTIN_SKILLS = [
|
|
1135
|
+
cloudSyncSkill,
|
|
1136
|
+
browserSkill,
|
|
1137
|
+
marketplaceSkill,
|
|
1138
|
+
workflowSkill
|
|
1139
|
+
];
|
|
1140
|
+
function getBuiltinSkill(id) {
|
|
1141
|
+
return BUILTIN_SKILLS.find((s) => s.id === id);
|
|
1142
|
+
}
|
|
1143
|
+
function getBuiltinSkills() {
|
|
1144
|
+
return [...BUILTIN_SKILLS];
|
|
1145
|
+
}
|
|
1146
|
+
function isBuiltinSkill(id) {
|
|
1147
|
+
return BUILTIN_SKILLS.some((s) => s.id === id);
|
|
1148
|
+
}
|
|
326
1149
|
let registry$1 = null;
|
|
327
1150
|
function ensureSkillsDir() {
|
|
328
1151
|
if (!existsSync(CCJK_SKILLS_DIR)) {
|
|
@@ -339,6 +1162,12 @@ function loadRegistry$1() {
|
|
|
339
1162
|
ensureSkillsDir();
|
|
340
1163
|
const skills = /* @__PURE__ */ new Map();
|
|
341
1164
|
const categories = /* @__PURE__ */ new Map();
|
|
1165
|
+
for (const skill of BUILTIN_SKILLS) {
|
|
1166
|
+
skills.set(skill.id, skill);
|
|
1167
|
+
const categorySkills = categories.get(skill.category) || [];
|
|
1168
|
+
categorySkills.push(skill.id);
|
|
1169
|
+
categories.set(skill.category, categorySkills);
|
|
1170
|
+
}
|
|
342
1171
|
const files = readdirSync(CCJK_SKILLS_DIR).filter((f) => f.endsWith(".json"));
|
|
343
1172
|
for (const file of files) {
|
|
344
1173
|
try {
|
|
@@ -1709,7 +2538,7 @@ async function handleAddProvider() {
|
|
|
1709
2538
|
defaultValue: true
|
|
1710
2539
|
});
|
|
1711
2540
|
if (setAsDefault) {
|
|
1712
|
-
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.
|
|
2541
|
+
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.ai; });
|
|
1713
2542
|
const switched = await switchToProvider(provider.id);
|
|
1714
2543
|
if (switched) {
|
|
1715
2544
|
console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: provider.name })));
|
|
@@ -1904,7 +2733,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
|
|
|
1904
2733
|
defaultValue: false
|
|
1905
2734
|
});
|
|
1906
2735
|
if (setAsDefault) {
|
|
1907
|
-
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.
|
|
2736
|
+
const { switchToProvider } = await import('./codex.mjs').then(function (n) { return n.ai; });
|
|
1908
2737
|
const switched = await switchToProvider(copiedProvider.id);
|
|
1909
2738
|
if (switched) {
|
|
1910
2739
|
console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: copiedProvider.name })));
|
|
@@ -2546,6 +3375,187 @@ function syncSkillsToContinue(skills) {
|
|
|
2546
3375
|
writeContinueConfig(config);
|
|
2547
3376
|
}
|
|
2548
3377
|
|
|
3378
|
+
function getToolConfigPath(tool) {
|
|
3379
|
+
switch (tool) {
|
|
3380
|
+
case "claude-code":
|
|
3381
|
+
return CLAUDE_DIR;
|
|
3382
|
+
case "codex":
|
|
3383
|
+
return CODEX_CONFIG_FILE;
|
|
3384
|
+
case "aider":
|
|
3385
|
+
return AIDER_CONFIG_FILE;
|
|
3386
|
+
case "continue":
|
|
3387
|
+
return CONTINUE_CONFIG_FILE;
|
|
3388
|
+
case "cline":
|
|
3389
|
+
return CLINE_CONFIG_FILE;
|
|
3390
|
+
case "cursor":
|
|
3391
|
+
return CURSOR_CONFIG_FILE;
|
|
3392
|
+
default:
|
|
3393
|
+
return "";
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
function getToolDir(tool) {
|
|
3397
|
+
switch (tool) {
|
|
3398
|
+
case "claude-code":
|
|
3399
|
+
return CLAUDE_DIR;
|
|
3400
|
+
case "codex":
|
|
3401
|
+
return CODEX_DIR;
|
|
3402
|
+
case "aider":
|
|
3403
|
+
return AIDER_DIR;
|
|
3404
|
+
case "continue":
|
|
3405
|
+
return CONTINUE_DIR;
|
|
3406
|
+
case "cline":
|
|
3407
|
+
return CLINE_DIR;
|
|
3408
|
+
case "cursor":
|
|
3409
|
+
return CURSOR_DIR;
|
|
3410
|
+
default:
|
|
3411
|
+
return "";
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
async function isToolInstalled(tool) {
|
|
3415
|
+
try {
|
|
3416
|
+
switch (tool) {
|
|
3417
|
+
case "claude-code": {
|
|
3418
|
+
const ccResult = await exec("claude", ["--version"]);
|
|
3419
|
+
return ccResult.exitCode === 0;
|
|
3420
|
+
}
|
|
3421
|
+
case "codex": {
|
|
3422
|
+
const cxResult = await exec("codex", ["--version"]);
|
|
3423
|
+
return cxResult.exitCode === 0;
|
|
3424
|
+
}
|
|
3425
|
+
case "aider": {
|
|
3426
|
+
const adResult = await exec("aider", ["--version"]);
|
|
3427
|
+
return adResult.exitCode === 0;
|
|
3428
|
+
}
|
|
3429
|
+
case "continue":
|
|
3430
|
+
return existsSync(CONTINUE_DIR);
|
|
3431
|
+
case "cline":
|
|
3432
|
+
return existsSync(CLINE_DIR);
|
|
3433
|
+
case "cursor": {
|
|
3434
|
+
const cuResult = await exec("cursor", ["--version"]);
|
|
3435
|
+
return cuResult.exitCode === 0;
|
|
3436
|
+
}
|
|
3437
|
+
default:
|
|
3438
|
+
return false;
|
|
3439
|
+
}
|
|
3440
|
+
} catch {
|
|
3441
|
+
return false;
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
async function getToolVersion(tool) {
|
|
3445
|
+
try {
|
|
3446
|
+
switch (tool) {
|
|
3447
|
+
case "claude-code": {
|
|
3448
|
+
const result = await exec("claude", ["--version"]);
|
|
3449
|
+
return result.stdout.trim();
|
|
3450
|
+
}
|
|
3451
|
+
case "codex": {
|
|
3452
|
+
const result = await exec("codex", ["--version"]);
|
|
3453
|
+
return result.stdout.trim();
|
|
3454
|
+
}
|
|
3455
|
+
case "aider": {
|
|
3456
|
+
const result = await exec("aider", ["--version"]);
|
|
3457
|
+
return result.stdout.trim();
|
|
3458
|
+
}
|
|
3459
|
+
case "cursor": {
|
|
3460
|
+
const result = await exec("cursor", ["--version"]);
|
|
3461
|
+
return result.stdout.trim();
|
|
3462
|
+
}
|
|
3463
|
+
default:
|
|
3464
|
+
return null;
|
|
3465
|
+
}
|
|
3466
|
+
} catch {
|
|
3467
|
+
return null;
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
async function getToolStatus(tool) {
|
|
3471
|
+
const configPath = getToolConfigPath(tool);
|
|
3472
|
+
const installed = await isToolInstalled(tool);
|
|
3473
|
+
const version = installed ? await getToolVersion(tool) : void 0;
|
|
3474
|
+
return {
|
|
3475
|
+
tool,
|
|
3476
|
+
installed,
|
|
3477
|
+
version: version || void 0,
|
|
3478
|
+
configExists: existsSync(configPath),
|
|
3479
|
+
configPath,
|
|
3480
|
+
lastChecked: /* @__PURE__ */ new Date()
|
|
3481
|
+
};
|
|
3482
|
+
}
|
|
3483
|
+
async function getAllToolsStatus() {
|
|
3484
|
+
const statuses = [];
|
|
3485
|
+
for (const tool of CODE_TOOL_TYPES) {
|
|
3486
|
+
statuses.push(await getToolStatus(tool));
|
|
3487
|
+
}
|
|
3488
|
+
return statuses;
|
|
3489
|
+
}
|
|
3490
|
+
async function getInstalledTools() {
|
|
3491
|
+
const installed = [];
|
|
3492
|
+
for (const tool of CODE_TOOL_TYPES) {
|
|
3493
|
+
if (await isToolInstalled(tool)) {
|
|
3494
|
+
installed.push(tool);
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
return installed;
|
|
3498
|
+
}
|
|
3499
|
+
async function installTool(tool) {
|
|
3500
|
+
const info = CODE_TOOL_INFO[tool];
|
|
3501
|
+
try {
|
|
3502
|
+
const parts = info.installCmd.split(" ");
|
|
3503
|
+
const cmd = parts[0];
|
|
3504
|
+
const args = parts.slice(1);
|
|
3505
|
+
const result = await exec(cmd, args);
|
|
3506
|
+
if (result.exitCode === 0) {
|
|
3507
|
+
const version = await getToolVersion(tool);
|
|
3508
|
+
return {
|
|
3509
|
+
tool,
|
|
3510
|
+
success: true,
|
|
3511
|
+
message: `${info.name} installed successfully`,
|
|
3512
|
+
version: version || void 0
|
|
3513
|
+
};
|
|
3514
|
+
} else {
|
|
3515
|
+
return {
|
|
3516
|
+
tool,
|
|
3517
|
+
success: false,
|
|
3518
|
+
message: `Failed to install ${info.name}: ${result.stderr}`
|
|
3519
|
+
};
|
|
3520
|
+
}
|
|
3521
|
+
} catch (error) {
|
|
3522
|
+
return {
|
|
3523
|
+
tool,
|
|
3524
|
+
success: false,
|
|
3525
|
+
message: `Failed to install ${info.name}: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
3526
|
+
};
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3529
|
+
function getToolInfo(tool) {
|
|
3530
|
+
return CODE_TOOL_INFO[tool];
|
|
3531
|
+
}
|
|
3532
|
+
function getAllToolsInfo() {
|
|
3533
|
+
return CODE_TOOL_INFO;
|
|
3534
|
+
}
|
|
3535
|
+
function getToolsByCategory(category) {
|
|
3536
|
+
return CODE_TOOL_TYPES.filter((tool) => CODE_TOOL_INFO[tool].category === category);
|
|
3537
|
+
}
|
|
3538
|
+
function formatToolStatus(status) {
|
|
3539
|
+
const info = CODE_TOOL_INFO[status.tool];
|
|
3540
|
+
const icon = status.installed ? "\u2705" : "\u274C";
|
|
3541
|
+
const version = status.version ? ` (${status.version})` : "";
|
|
3542
|
+
const config = status.configExists ? "\u{1F4C4}" : "\u26A0\uFE0F";
|
|
3543
|
+
return `${icon} ${info.name}${version} ${config}`;
|
|
3544
|
+
}
|
|
3545
|
+
function getRecommendedTools(projectType) {
|
|
3546
|
+
switch (projectType) {
|
|
3547
|
+
case "typescript":
|
|
3548
|
+
case "javascript":
|
|
3549
|
+
return ["claude-code", "aider", "continue"];
|
|
3550
|
+
case "python":
|
|
3551
|
+
return ["aider", "continue", "claude-code"];
|
|
3552
|
+
case "fullstack":
|
|
3553
|
+
return ["claude-code", "cursor", "aider"];
|
|
3554
|
+
default:
|
|
3555
|
+
return ["claude-code", "aider"];
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
|
|
2549
3559
|
async function checkClaudeCodeInstallation() {
|
|
2550
3560
|
try {
|
|
2551
3561
|
const versionInfo = await checkClaudeCodeVersion();
|
|
@@ -2754,7 +3764,7 @@ function checkPermissions() {
|
|
|
2754
3764
|
}
|
|
2755
3765
|
async function checkDiskSpace() {
|
|
2756
3766
|
try {
|
|
2757
|
-
if (
|
|
3767
|
+
if (process__default.platform === "win32") {
|
|
2758
3768
|
return {
|
|
2759
3769
|
name: "Disk Space",
|
|
2760
3770
|
status: "info",
|
|
@@ -3079,4 +4089,4 @@ function showStatus(type, message) {
|
|
|
3079
4089
|
console.log(STATUS[type](message));
|
|
3080
4090
|
}
|
|
3081
4091
|
|
|
3082
|
-
export {
|
|
4092
|
+
export { writeAiderConfig as $, getRegistry$1 as A, importSkills as B, isBuiltinSkill as C, refreshRegistry$1 as D, removeSkill as E, searchSkills as F, setSkillEnabled as G, addGroup as H, disableGroup as I, enableGroup as J, ensureGroupsDir as K, exportGroups as L, getAllGroups as M, getEnabledAgents as N, getEnabledSkillIds as O, getGroup as P, getRegistry as Q, importGroups as R, isGroupEnabled as S, refreshRegistry as T, removeGroup as U, searchGroups as V, isAiderInstalled as W, getAiderVersion as X, installAider as Y, ensureAiderDir as Z, readAiderConfig as _, getPluginInfo as a, configureAiderApi as a0, getAiderModelPresets as a1, runAider as a2, configureIncrementalManagement as a3, addProviderToExisting as a4, editExistingProvider as a5, deleteProviders as a6, validateProviderData as a7, CodexUninstaller as a8, ensureContinueDir as a9, runDoctor as aA, MenuBuilder as aB, showQuickMenu as aC, confirm as aD, showStatus as aE, codexProviderManager as aF, codexConfigSwitch$1 as aG, codexUninstaller as aH, isContinueConfigured as aa, readContinueConfig as ab, writeContinueConfig as ac, addContinueModel as ad, removeContinueModel as ae, getContinueProviderPresets as af, configureContinueApi as ag, addContinueMcpServer as ah, addContinueCustomCommand as ai, enableContinueContextProvider as aj, syncSkillsToContinue as ak, getToolConfigPath as al, getToolDir as am, isToolInstalled as an, getToolVersion as ao, getToolStatus as ap, getAllToolsStatus as aq, getInstalledTools as ar, installTool as as, getToolInfo as at, getAllToolsInfo as au, getToolsByCategory as av, formatToolStatus as aw, getRecommendedTools as ax, runHealthCheck as ay, displayHealthReport as az, listPlugins as b, enablePlugin as c, discoverPlugins as d, ensurePluginsDir as e, disablePlugin as f, getLoadedPlugins as g, getPluginWorkflows as h, getPluginAgents as i, getPluginMcpServices as j, getPluginOutputStyles as k, loadPlugin as l, getPluginSkills as m, initializePlugins as n, addSkill as o, createBatchSkills as p, ensureSkillsDir as q, readPluginConfig as r, exportSkills as s, getAllSkills as t, unloadPlugin as u, getBatchCategories as v, writePluginConfig as w, getBuiltinSkill as x, getBuiltinSkills as y, getSkill as z };
|